Subtotal on current page, SQL datasource
Posted: Tue Feb 10, 2015 10:15 am
Hi,
I am trying to get a subtotal for the current page of an SQL column that has data returned to a panel. If the number of rows returned from the sql is split across more than one page, I would like to display the subtotal of each page's results at the bottom of the page.
I have tried using an example that is not for sql:
http://forum.stimulsoft.com/viewtopic.php?t=3655
Where you use cSumRunning. This is for a running total, but it does not work exactly as I intended either as it will display the total of page 1 on page 2, and the total of page 1 + 2 on page 3, and so on. What I would expect is to have the total of page 1 on page 1, then the total of page 1 + 2 on page 2.
Can you give me any advice on how to get the current page total when using an sql server database as a datasource?
Many thanks,
Mital
P.S. Apologies if this is the wrong forum.
I am trying to get a subtotal for the current page of an SQL column that has data returned to a panel. If the number of rows returned from the sql is split across more than one page, I would like to display the subtotal of each page's results at the bottom of the page.
I have tried using an example that is not for sql:
http://forum.stimulsoft.com/viewtopic.php?t=3655
Where you use cSumRunning. This is for a running total, but it does not work exactly as I intended either as it will display the total of page 1 on page 2, and the total of page 1 + 2 on page 3, and so on. What I would expect is to have the total of page 1 on page 1, then the total of page 1 + 2 on page 2.
Can you give me any advice on how to get the current page total when using an sql server database as a datasource?
Many thanks,
Mital
P.S. Apologies if this is the wrong forum.