-
DATABASE query
hi i am working on a database connected with c# code, i want to show crystal report, i have made a connection with SQLite database file,now my "report1.rdlc" looks like
Code:
NAME ADDRESS CONTACT AMOUNT
now i want to add all the amounts in the AMOUNT column but confused how to do that....
kindly help me out
-
Perhaps write a loop to read each row of the DB, then total the AMOUNT column?
-
this is my form1 code
Code:
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'DataBDataSet.Accounts' table. You can move, or remove it, as needed.
this.AccountsTableAdapter.Fill(this.DataBDataSet.Accounts);
this.reportViewer1.RefreshReport();
}
i am going to save the result in textbox in report viewer,if i access database here in this event i cannot access the textbox in which i have to show the result...
and i just want that amount having certain criteria means the amount of year 2010 by deploying a check then the results i get,want to show that amount having year 2010 so i have to search through the fields of report viewer