|
Yes!
Program can run in the background and task bar on startup. I've used keyboard and mouse hooks to monitor activity.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Threw it together. Working great. Thanks everyone for all the help (and the knowledge!)
Andy
|
|
|
|
|
Hi all, suppose I've queried a data source and let's say 10 thousand records are supposed to come back. If I want to pause the reception of the data at a particular record and then resume the data reception on button click is there a way to do this using C#? Thanks in advance.
|
|
|
|
|
Unless you're using a DataReader, no there isn't.
Unless you doing processing on all those records, returning 10,000 records to display them is just stupid. Use paging instead so you're not sitting around waiting for that many records to load and be bound to a visual control.
|
|
|
|
|
Besides "paging", the other keyword here is "virtualization" (often used in the context of list and grid controls)
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have this windows service application installed on my windows server.
It's job is to check a specific table from sql database every 5 minutes and send me a notification via email when the table has new records inserted on it. My windows service is set to start automatically however, when the server is restarted, the service wont run until I logged in.
Long story short, what i want is to start my windows service automatically even if i don't login.
I want it to run when my windows server is on logon screen after restart.
Thanks to anyone who can help me.. I really need this and tried to google for a day and no luck for me.
|
|
|
|
|
I think you need to set it up to run under the Windows account rather than your own.
|
|
|
|
|
Thanks for this. Tried to set up with Network Service account and works like a charm.
|
|
|
|
|
|
To add to what Eddy said: If your service depends on other services, you may want to use Automatic (delayed start).
Arguing with a woman is like reading the Software License Agreement. In the end, you ignore everything and click "I agree".
Anonymous
|
|
|
|
|
Im already using Automatic (Delayed Start) how ever it seems that i need to set it up with other account rather my own local account so the service can run automatically on start up.
|
|
|
|
|
Sounds a bit odd. If the service is set to start automatically, then firstly what account is it running under (2nd page of options in the SCM if I remember rightly)?
Second question - is there anything showing as an error in the eventlog (eventvwr from start)?
Regards,
Rob Philpott.
|
|
|
|
|
I am trying for a long..that when three or more players are connected to each other and any one of them clicks on the play button then it should be start on all others clients screen.Please help me.. that how can i do that.
|
|
|
|
|
Not a good idea.
And you would at least need to provide a lot more background information.
I also suggest that you look at Jackbox games to see what they have -- it might be similar to what you desire.
|
|
|
|
|
It's called a botnet.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Hi,
I'm trying to pull data xml and display in datagridview.
here's an example of the XML -
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<ramp>
<header>
<version>2</version>
<checksum>18290949</checksum>
</header>
<colors>
<deep_red>
<point>
<intensity>0</intensity>
<time>0</time>
</point>
<point>
<intensity>0</intensity>
<time>360</time>
</point>
<point>
<intensity>19</intensity>
<time>480</time>
</point>
<point>
<intensity>37</intensity>
<time>490</time>
</point>
<point>
<intensity>51</intensity>
<time>500</time>
</point>
<point>
<intensity>47</intensity>
<time>510</time>
</point>
<point>
<intensity>60</intensity>
<time>520</time>
</point>
<point>
<intensity>60</intensity>
<time>530</time>
</point>
<point>
<intensity>51</intensity>
<time>540</time>
</point>
<point>
<intensity>37</intensity>
<time>550</time>
</point>
<point>
<intensity>56</intensity>
<time>560</time>
</point>
<point>
<intensity>47</intensity>
<time>570</time>
</point>
<point>
<intensity>51</intensity>
<time>580</time>
</point>
<point>
<intensity>47</intensity>
<time>590</time>
</point>
<point>
<intensity>65</intensity>
<time>600</time>
</point>
<point>
<intensity>23</intensity>
<time>610</time>
</point>
<point>
<intensity>9</intensity>
<time>620</time>
</point>
<point>
<intensity>42</intensity>
<time>630</time>
</point>
<point>
<intensity>33</intensity>
<time>640</time>
</point>
<point>
<intensity>37</intensity>
<time>650</time>
</point>
<point>
<intensity>47</intensity>
<time>660</time>
</point>
<point>
<intensity>51</intensity>
<time>670</time>
</point>
<point>
<intensity>14</intensity>
<time>680</time>
</point>
<point>
<intensity>70</intensity>
<time>690</time>
</point>
<point>
<intensity>33</intensity>
<time>700</time>
</point>
<point>
<intensity>23</intensity>
<time>710</time>
</point>
<point>
<intensity>19</intensity>
<time>720</time>
</point>
<point>
<intensity>0</intensity>
<time>730</time>
</point>
<point>
<intensity>0</intensity>
<time>740</time>
</point>
<point>
<intensity>0</intensity>
<time>750</time>
</point>
<point>
<intensity>0</intensity>
<time>760</time>
</point>
<point>
<intensity>0</intensity>
<time>770</time>
</point>
<point>
<intensity>0</intensity>
<time>780</time>
</point>
<point>
<intensity>0</intensity>
<time>790</time>
</point>
<point>
<intensity>0</intensity>
<time>800</time>
</point>
<point>
<intensity>0</intensity>
<time>810</time>
</point>
<point>
<intensity>0</intensity>
<time>820</time>
</point>
<point>
<intensity>0</intensity>
<time>830</time>
</point>
<point>
<intensity>0</intensity>
<time>840</time>
</point>
<point>
<intensity>0</intensity>
<time>850</time>
</point>
<point>
<intensity>0</intensity>
<time>860</time>
</point>
<point>
<intensity>0</intensity>
<time>870</time>
</point>
<point>
<intensity>0</intensity>
<time>880</time>
</point>
<point>
<intensity>0</intensity>
<time>910</time>
</point>
<point>
<intensity>0</intensity>
<time>930</time>
</point>
<point>
<intensity>0</intensity>
<time>950</time>
</point>
<point>
<intensity>0</intensity>
<time>970</time>
</point>
<point>
<intensity>0</intensity>
<time>1020</time>
</point>
<point>
<intensity>0</intensity>
<time>1110</time>
</point>
<point>
<intensity>0</intensity>
<time>1130</time>
</point>
<point>
<intensity>0</intensity>
<time>1140</time>
</point>
<point>
<intensity>0</intensity>
<time>1150</time>
</point>
<point>
<intensity>0</intensity>
<time>1160</time>
</point>
<point>
<intensity>0</intensity>
<time>1170</time>
</point>
<point>
<intensity>0</intensity>
<time>1180</time>
</point>
<point>
<intensity>0</intensity>
<time>1190</time>
</point>
<point>
<intensity>0</intensity>
<time>1220</time>
</point>
<point>
<intensity>0</intensity>
<time>1270</time>
</point>
<point>
<intensity>0</intensity>
<time>1290</time>
</point>
</deep_red>
<uv>
<point>
<intensity>0</intensity>
<time>0</time>
</point>
<point>
<intensity>0</intensity>
<time>360</time>
</point>
<point>
<intensity>22</intensity>
<time>480</time>
</point>
<point>
<intensity>55</intensity>
<time>490</time>
</point>
<point>
<intensity>77</intensity>
<time>500</time>
</point>
<point>
<intensity>98</intensity>
<time>510</time>
</point>
<point>
<intensity>119</intensity>
<time>520</time>
</point>
<point>
<intensity>161</intensity>
<time>530</time>
</point>
<point>
<intensity>192</intensity>
<time>540</time>
</point>
<point>
<intensity>211</intensity>
<time>550</time>
</point>
<point>
<intensity>230</intensity>
<time>560</time>
</point>
<point>
<intensity>249</intensity>
<time>570</time>
</point>
<point>
<intensity>279</intensity>
<time>580</time>
</point>
<point>
<intensity>297</intensity>
<time>590</time>
</point>
<point>
<intensity>315</intensity>
<time>600</time>
</point>
<point>
<intensity>332</intensity>
<time>610</time>
</point>
<point>
<intensity>349</intensity>
<time>620</time>
</point>
<point>
<intensity>377</intensity>
<time>630</time>
</point>
<point>
<intensity>404</intensity>
<time>640</time>
</point>
<point>
<intensity>420</intensity>
<time>650</time>
</point>
<point>
<intensity>435</intensity>
<time>660</time>
</point>
<point>
<intensity>391</intensity>
<time>670</time>
</point>
<point>
<intensity>442</intensity>
<time>680</time>
</point>
<point>
<intensity>433</intensity>
<time>690</time>
</point>
<point>
<intensity>433</intensity>
<time>700</time>
</point>
<point>
<intensity>479</intensity>
<time>710</time>
</point>
<point>
<intensity>451</intensity>
<time>720</time>
</point>
<point>
<intensity>386</intensity>
<time>730</time>
</point>
<point>
<intensity>414</intensity>
<time>740</time>
</point>
<point>
<intensity>386</intensity>
<time>750</time>
</point>
<point>
<intensity>363</intensity>
<time>760</time>
</point>
<point>
<intensity>414</intensity>
<time>770</time>
</point>
<point>
<intensity>367</intensity>
<time>780</time>
</point>
<point>
<intensity>419</intensity>
<time>790</time>
</point>
<point>
<intensity>358</intensity>
<time>800</time>
</point>
<point>
<intensity>330</intensity>
<time>810</time>
</point>
<point>
<intensity>312</intensity>
<time>820</time>
</point>
<point>
<intensity>381</intensity>
<time>830</time>
</point>
<point>
<intensity>386</intensity>
<time>840</time>
</point>
<point>
<intensity>326</intensity>
<time>850</time>
</point>
<point>
<intensity>400</intensity>
<time>860</time>
</point>
<point>
<intensity>284</intensity>
<time>870</time>
</point>
<point>
<intensity>326</intensity>
<time>880</time>
</point>
<point>
<intensity>372</intensity>
<time>910</time>
</point>
<point>
<intensity>293</intensity>
<time>930</time>
</point>
<point>
<intensity>288</intensity>
<time>950</time>
</point>
<point>
<intensity>242</intensity>
<time>970</time>
</point>
<point>
<intensity>237</intensity>
<time>1020</time>
</point>
<point>
<intensity>237</intensity>
<time>1110</time>
</point>
<point>
<intensity>195</intensity>
<time>1130</time>
</point>
<point>
<intensity>163</intensity>
<time>1140</time>
</point>
<point>
<intensity>158</intensity>
<time>1150</time>
</point>
<point>
<intensity>144</intensity>
<time>1160</time>
</point>
<point>
<intensity>130</intensity>
<time>1170</time>
</point>
<point>
<intensity>149</intensity>
<time>1180</time>
</point>
<point>
<intensity>70</intensity>
<time>1190</time>
</point>
<point>
<intensity>19</intensity>
<time>1220</time>
</point>
<point>
<intensity>0</intensity>
<time>1270</time>
</point>
<point>
<intensity>0</intensity>
<time>1290</time>
</point>
</uv>
<deep_blue>
<point>
<intensity>0</intensity>
<time>0</time>
</point>
<point>
<intensity>0</intensity>
<time>480</time>
</point>
<point>
<intensity>967</intensity>
<time>770</time>
</point>
<point>
<intensity>1000</intensity>
<time>780</time>
</point>
<point>
<intensity>1000</intensity>
<time>1020</time>
</point>
<point>
<intensity>0</intensity>
<time>1320</time>
</point>
</deep_blue>
<violet>
<point>
<intensity>0</intensity>
<time>0</time>
</point>
<point>
<intensity>0</intensity>
<time>360</time>
</point>
<point>
<intensity>22</intensity>
<time>480</time>
</point>
<point>
<intensity>66</intensity>
<time>490</time>
</point>
<point>
<intensity>76</intensity>
<time>500</time>
</point>
<point>
<intensity>108</intensity>
<time>510</time>
</point>
<point>
<intensity>140</intensity>
<time>520</time>
</point>
<point>
<intensity>171</intensity>
<time>530</time>
</point>
<point>
<intensity>202</intensity>
<time>540</time>
</point>
<point>
<intensity>210</intensity>
<time>550</time>
</point>
<point>
<intensity>229</intensity>
<time>560</time>
</point>
<point>
<intensity>259</intensity>
<time>570</time>
</point>
<point>
<intensity>288</intensity>
<time>580</time>
</point>
<point>
<intensity>351</intensity>
<time>590</time>
</point>
<point>
<intensity>391</intensity>
<time>600</time>
</point>
<point>
<intensity>441</intensity>
<time>610</time>
</point>
<point>
<intensity>503</intensity>
<time>620</time>
</point>
<point>
<intensity>553</intensity>
<time>630</time>
</point>
<point>
<intensity>602</intensity>
<time>640</time>
</point>
<point>
<intensity>651</intensity>
<time>650</time>
</point>
<point>
<intensity>856</intensity>
<time>660</time>
</point>
<point>
<intensity>800</intensity>
<time>670</time>
</point>
<point>
<intensity>674</intensity>
<time>680</time>
</point>
<point>
<intensity>586</intensity>
<time>690</time>
</point>
<point>
<intensity>637</intensity>
<time>700</time>
</point>
<point>
<intensity>651</intensity>
<time>710</time>
</point>
<point>
<intensity>805</intensity>
<time>720</time>
</point>
<point>
<intensity>647</intensity>
<time>730</time>
</point>
<point>
<intensity>647</intensity>
<time>740</time>
</point>
<point>
<intensity>805</intensity>
<time>750</time>
</point>
<point>
<intensity>605</intensity>
<time>760</time>
</point>
<point>
<intensity>600</intensity>
<time>770</time>
</point>
<point>
<intensity>772</intensity>
<time>780</time>
</point>
<point>
<intensity>656</intensity>
<time>790</time>
</point>
<point>
<intensity>665</intensity>
<time>800</time>
</point>
<point>
<intensity>716</intensity>
<time>810</time>
</point>
<point>
<intensity>605</intensity>
<time>820</time>
</point>
<point>
<intensity>609</intensity>
<time>830</time>
</point>
<point>
<intensity>698</intensity>
<time>840</time>
</point>
<point>
<intensity>533</intensity>
<time>850</time>
</point>
<point>
<intensity>628</intensity>
<time>860</time>
</point>
<point>
<intensity>702</intensity>
<time>870</time>
</point>
<point>
<intensity>549</intensity>
<time>880</time>
</point>
<point>
<intensity>758</intensity>
<time>910</time>
</point>
<point>
<intensity>688</intensity>
<time>930</time>
</point>
<point>
<intensity>623</intensity>
<time>950</time>
</point>
<point>
<intensity>912</intensity>
<time>970</time>
</point>
<point>
<intensity>763</intensity>
<time>1020</time>
</point>
<point>
<intensity>684</intensity>
<time>1110</time>
</point>
<point>
<intensity>693</intensity>
<time>1130</time>
</point>
<point>
<intensity>572</intensity>
<time>1140</time>
</point>
<point>
<intensity>535</intensity>
<time>1150</time>
</point>
<point>
<intensity>372</intensity>
<time>1160</time>
</point>
<point>
<intensity>344</intensity>
<time>1170</time>
</point>
<point>
<intensity>219</intensity>
<time>1180</time>
</point>
<point>
<intensity>195</intensity>
<time>1190</time>
</point>
<point>
<intensity>107</intensity>
<time>1220</time>
</point>
<point>
<intensity>47</intensity>
<time>1270</time>
</point>
<point>
<intensity>0</intensity>
<time>1290</time>
</point>
</violet>
<cool_white>
<point>
<intensity>0</intensity>
<time>0</time>
</point>
<point>
<intensity>0</intensity>
<time>360</time>
</point>
<point>
<intensity>19</intensity>
<time>480</time>
</point>
<point>
<intensity>42</intensity>
<time>490</time>
</point>
<point>
<intensity>74</intensity>
<time>500</time>
</point>
<point>
<intensity>149</intensity>
<time>510</time>
</point>
<point>
<intensity>144</intensity>
<time>520</time>
</point>
<point>
<intensity>121</intensity>
<time>530</time>
</point>
<point>
<intensity>116</intensity>
<time>540</time>
</point>
<point>
<intensity>130</intensity>
<time>550</time>
</point>
<point>
<intensity>135</intensity>
<time>560</time>
</point>
<point>
<intensity>93</intensity>
<time>570</time>
</point>
<point>
<intensity>79</intensity>
<time>580</time>
</point>
<point>
<intensity>112</intensity>
<time>590</time>
</point>
<point>
<intensity>102</intensity>
<time>600</time>
</point>
<point>
<intensity>70</intensity>
<time>610</time>
</point>
<point>
<intensity>56</intensity>
<time>620</time>
</point>
<point>
<intensity>56</intensity>
<time>630</time>
</point>
<point>
<intensity>37</intensity>
<time>640</time>
</point>
<point>
<intensity>41</intensity>
<time>650</time>
</point>
<point>
<intensity>40</intensity>
<time>660</time>
</point>
<point>
<intensity>39</intensity>
<time>670</time>
</point>
<point>
<intensity>38</intensity>
<time>680</time>
</point>
<point>
<intensity>37</intensity>
<time>690</time>
</point>
<point>
<intensity>36</intensity>
<time>700</time>
</point>
<point>
<intensity>35</intensity>
<time>710</time>
</point>
<point>
<intensity>0</intensity>
<time>720</time>
</point>
<point>
<intensity>0</intensity>
<time>730</time>
</point>
<point>
<intensity>0</intensity>
<time>740</time>
</point>
<point>
<intensity>0</intensity>
<time>750</time>
</point>
<point>
<intensity>0</intensity>
<time>760</time>
</point>
<point>
<intensity>0</intensity>
<time>770</time>
</point>
<point>
<intensity>0</intensity>
<time>780</time>
</point>
<point>
<intensity>0</intensity>
<time>790</time>
</point>
<point>
<intensity>0</intensity>
<time>800</time>
</point>
<point>
<intensity>0</intensity>
<time>810</time>
</point>
<point>
<intensity>0</intensity>
<time>820</time>
</point>
<point>
<intensity>0</intensity>
<time>830</time>
</point>
<point>
<intensity>0</intensity>
<time>840</time>
</point>
<point>
<intensity>0</intensity>
<time>850</time>
</point>
<point>
<intensity>0</intensity>
<time>860</time>
</point>
<point>
<intensity>0</intensity>
<time>870</time>
</point>
<point>
<intensity>0</intensity>
<time>880</time>
</point>
<point>
<intensity>0</intensity>
<time>910</time>
</point>
<point>
<intensity>0</intensity>
<time>930</time>
</point>
<point>
<intensity>0</intensity>
<time>950</time>
</point>
<point>
<intensity>0</intensity>
<time>970</time>
</point>
<point>
<intensity>0</intensity>
<time>1020</time>
</point>
<point>
<intensity>0</intensity>
<time>1110</time>
</point>
<point>
<intensity>0</intensity>
<time>1130</time>
</point>
<point>
<intensity>0</intensity>
<time>1140</time>
</point>
<point>
<intensity>0</intensity>
<time>1150</time>
</point>
<point>
<intensity>0</intensity>
<time>1160</time>
</point>
<point>
<intensity>0</intensity>
<time>1170</time>
</point>
<point>
<intensity>0</intensity>
<time>1180</time>
</point>
<point>
<intensity>0</intensity>
<time>1190</time>
</point>
<point>
<intensity>0</intensity>
<time>1220</time>
</point>
<point>
<intensity>0</intensity>
<time>1270</time>
</point>
<point>
<intensity>0</intensity>
<time>1290</time>
</point>
</cool_white>
</colors>
</ramp>
Here is the screenshot of the datagridview that I have
[^]
here's the code -
int i = 0;
foreach(XmlNode node in doc.SelectNodes(query))
{
row = results.NewRow();
XmlNode Element = (XmlNode)node;
foreach (XmlNode node1 in Element)
{
XmlNode Element1 = (XmlNode)node1;
results.Columns.Add(Element1.Name, typeof(string));
}
foreach (XmlNode node2 in Element)
{
XmlNode Element2 = (XmlNode)node2;
foreach (XmlNode node3 in Element2)
{
XmlNode Element3 = (XmlNode)node3;
foreach (XmlNode node4 in Element3)
{
XmlNode Element4 = (XmlNode)node4;
if (Element4.Name == "intensity")
{
row[i] = Element4.InnerText.ToString();
results.Rows.Add(row);
row = results.NewRow();
}
}
}
i++;
}
}
return results;
problem is that the datagridview is not formatting the text correctly, as you can see it keeps creating a new row for each result set for a color.. I need it to show correctly?
thanks
Craig.
|
|
|
|
|
What is in query and can you share the declarations for row and results.
Also - shortening the amount of XML we have to copy would be nice.
When you say "show it correctly" what do you mean by "correctly"?
modified 19-Apr-17 7:25am.
|
|
|
|
|
row[i] indicates a "column" (indexed via i).
One needs to populate all columns in a (datatable) row that you're writing; you're only populating one column at a time.
You need to populate each column as you retrieve the (xml) values for that column and row.
You're also attempting to do this in the crudest way possible (no xml deserialization; no datarow column naming).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
hi
here is my code Rdlc not binding data's in reportviewer pls any one help
protected void btnSearch_Click(object sender, EventArgs e)
{
DivReport.Visible = true;
GetMonthWiseReports();
}
private void GetMonthWiseReports()
{
string LocationName = string.Empty, CompanyName = string.Empty;
try
{
rptvw.Reset();
rptvw.ProcessingMode = ProcessingMode.Local;
rptvw.LocalReport.ReportPath = Server.MapPath("~/Reports/RDLC/MonthWiseLedger.rdlc");
string accname = string.Empty;
Int64 AccNo = 0;
//string frmdate = string.Empty;
//string todate = string.Empty;
//frmdate = Convert.ToDateTime(rdFrmDate.SelectedDate).ToString("yyyy-MM-dd");
//todate = Convert.ToDateTime(rdToDate.SelectedDate).ToString("yyyy-MM-dd");
DataTable dt_PurchaseData = SerLedgerMaster.GetMonthwiseledgerReport(AccNo).Tables[0];
dt_PurchaseData.Columns.Add("Serial_No");
Int32 RowCount = 0;
foreach (DataRow dr in dt_PurchaseData.Rows)
{
RowCount++;
dr["Serial_No"] = RowCount;
}
ReportDataSource rptSource = new ReportDataSource("MonthWiseLedger", dt_PurchaseData);
rptvw.LocalReport.DataSources.Add(rptSource);
rptvw.LocalReport.Refresh();
}
catch (Exception ex)
{
throw (ex);
}
}
public static DataSet GetMonthwiseledgerReport(Int64 accname)
{
try
{
MySqlConnection mySQLConnection = new MySqlConnection(ConfigurationManager.ConnectionStrings["MMDBConn"].ToString());
DataSet objDataSet = new DataSet();
MySqlCommand command = new MySqlCommand();
command.Connection = mySQLConnection;
command.CommandType = CommandType.StoredProcedure;
command.CommandTimeout = 600;
command.CommandText = "USP_GetMonthWiseLedger";
command.Parameters.Add("@AccNo", MySqlDbType.Int64).Value = accname;
mySQLConnection.Open();
MySqlDataAdapter SqlDa = new MySqlDataAdapter(command);
SqlDa.Fill(objDataSet);
int count = objDataSet.Tables[0].Rows.Count;
return objDataSet;
}
catch (Exception ex)
{
throw (ex);
}
}
|
|
|
|
|
I'm sorry I don't understand. Can you rephrase your question please?
|
|
|
|
|
Hi here is my code, i want to show data in the report for selected accno in the dropdown list
thank you for ur reply
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
CurUserID = Convert.ToInt64(Session["UserID"]);
CurrLocID = Convert.ToInt64(HttpContext.Current.Session["LocID"]);
CurrCompID = Convert.ToInt64(HttpContext.Current.Session["CompID"]);
if (CurUserID == 0)
{
Response.Redirect("~/Logout.aspx");
}
else
{
BindAccounDetails();
GetMonthWiseReports();
}
}
}
private void BindAccounDetails()
{
CurrLocID = Convert.ToInt64(HttpContext.Current.Session["LocID"]);
CurrCompID = Convert.ToInt64(HttpContext.Current.Session["CompID"]);
try
{
DataTable dt = new DataTable();
SerChequePaymentDetails SerObjChq = new SerChequePaymentDetails();
dt = SerObjChq.BindAccounDetails(CurrLocID, CurrCompID);
ddlAccname.DataSource = dt;
ddlAccname.DataTextField = "Acc_Name";
ddlAccname.DataValueField = "Acc_No";
ddlAccname.DataBind();
RadComboBoxItem item = new RadComboBoxItem("Select", "0");
ddlAccname.Items.Insert(0, item);
}
catch (Exception ex)
{
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
DivReport.Visible = true;
GetMonthWiseReports();
}
private void GetMonthWiseReports()
{
string LocationName = string.Empty, CompanyName = string.Empty;
try
{
rptvw.Reset();
rptvw.ProcessingMode = ProcessingMode.Local;
rptvw.LocalReport.ReportPath = Server.MapPath("~/Reports/RDLC/MonthWiseLedger.rdlc");
string accname = string.Empty;
Int64 AccNo = 0;
DataTable dt_PurchaseData = SerLedgerMaster.GetMonthwiseledgerReport(AccNo).Tables[0];
dt_PurchaseData.Columns.Add("Serial_No");
Int32 RowCount = 0;
foreach (DataRow dr in dt_PurchaseData.Rows)
{
RowCount++;
dr["Serial_No"] = RowCount;
}
ReportDataSource rptSource = new ReportDataSource("MonthWiseLedger", dt_PurchaseData);
rptvw.LocalReport.DataSources.Add(rptSource);
rptvw.LocalReport.Refresh();
}
catch (Exception ex)
{
throw (ex);
}
}
public static DataSet GetMonthwiseledgerReport(Int64 accname)
{
try
{
MySqlConnection mySQLConnection = new MySqlConnection(ConfigurationManager.ConnectionStrings["MMDBConn"].ToString());
DataSet objDataSet = new DataSet();
MySqlCommand command = new MySqlCommand();
command.Connection = mySQLConnection;
command.CommandType = CommandType.StoredProcedure;
command.CommandTimeout = 600;
command.CommandText = "USP_GetMonthWiseLedger";
command.Parameters.Add("@AccNo", MySqlDbType.Int64).Value = accname;
mySQLConnection.Open();
MySqlDataAdapter SqlDa = new MySqlDataAdapter(command);
SqlDa.Fill(objDataSet);
int count = objDataSet.Tables[0].Rows.Count;
return objDataSet;
}
catch (Exception ex)
{
throw (ex);
}
}
|
|
|
|
|
Ok - I get what you want to do, I get that you have some code. But what is the actual problem? (or question)
|
|
|
|
|
hi
report structure only visible i click the button...nothing data inside my report that is problem
|
|
|
|
|
Have you seen the suggestion from vinod.jangle below? You do not appear to have used DataBind()
|
|
|
|
|
I have no much idea on reports but don't you need "
DataBind(); " for your reportviewer control?
modified 20-Sep-20 21:01pm.
|
|
|
|