Click here to Skip to main content
15,893,722 members

Comments by Aciobanita Costel (Top 12 by date)

Aciobanita Costel 22-Oct-12 2:09am View    
The paging is done by Stampa Reports, and in the design of the page the table accept only 45 record (set by me).

I don't know how to do paging the datagridview, i will search to see it. tanks
Aciobanita Costel 22-Oct-12 1:44am View    
i use Stampa reports.
Aciobanita Costel 22-Oct-12 1:44am View    
OK,

I have the following table.

No. Column1 Column2 Column3 Column4
1 some data some data 20 30
2 some data some data 20 30
3 some data some data 20 30
................................................
45 some data some data 20 30
46 some data some data 20 30
................................................
89 some data some data 20 30
90 some data some data 20 30
................................................

To calculate the SUM of column3 for all rows i use:
for (int i = 0; i < datagridview.Rows.Count; ++i)
{
suminchise += Convert.ToDouble(datagridview.Rows[i].Cells[3].Value);
}
But, in my printing are displayed only 45 record on every page, and i need to calculate the sum of the column3 only for the first 45 row, and for page to for record 46 to 90, next 91 to 135, etc...
Aciobanita Costel 21-Oct-12 12:30pm View    
I populate my datagrid from a datatable. The content of my datagrid is printed in report, on a page i can display only 45 record from my datagridview, and in the bottom of the printed page a want to display the SUM of a column only for the record in that page. On the next page are displayed the next 45 rows, and the end the sum for the record that are displayed on the second page, ETC. The number of the record isn't know, Can be 2 or 500,
Aciobanita Costel 16-Oct-12 9:16am View    
OK,
I have two table in my database. One table contains entry for payments etc., and the second table contains entry form mathematics calculation from all payments from Table1 for every day.

Every time when the program is executed or closed the code above check the date of the system, if the date of the system is equal with the date of the last record from TABLE2, are selected all record from TABLE1 with that specific date and do the calculation, and update the result in table2 on the specific raw.
If the date of the system is greeter then the date of the last record from TABLE1, the code select all record from last day, and update that record, and insert a new record in table1.