Subtotal on current page, SQL datasource
-
- Posts: 3
- Joined: Mon Feb 09, 2015 5:17 pm
Subtotal on current page, SQL datasource
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.
Re: Subtotal on current page, SQL datasource
Hello,
Can you please send us your report with test data for analysis.
Thank you.
Can you please send us your report with test data for analysis.
Thank you.
-
- Posts: 3
- Joined: Mon Feb 09, 2015 5:17 pm
Re: Subtotal on current page, SQL datasource
Hi,
I've exported the sql data to a csv file to use. Although this will not replicate any problems encountered due to the fact that data is being retrieved from sql.
The STKC_QTY running total is giving the total for the page before, I would like to have the total displayed for the current page rather than the page before.
I'd also like to know how to get a subtotal per page, so it each page would display 8 rather than 8, 16, 24, etc.
I have the data file and the mrt but I'm not sure how to attach them to this post.
edit: I've attached the mrt and example data.
I've exported the sql data to a csv file to use. Although this will not replicate any problems encountered due to the fact that data is being retrieved from sql.
The STKC_QTY running total is giving the total for the page before, I would like to have the total displayed for the current page rather than the page before.
I'd also like to know how to get a subtotal per page, so it each page would display 8 rather than 8, 16, 24, etc.
I have the data file and the mrt but I'm not sure how to attach them to this post.
edit: I've attached the mrt and example data.
- Attachments
-
- example.zip
- (3.83 KiB) Downloaded 254 times
Re: Subtotal on current page, SQL datasource
Hello,
We couldn't reproduce this bug.
Please try to check the last build.
Thank you.
We couldn't reproduce this bug.
Please try to check the last build.
You can use the following expression:I'd also like to know how to get a subtotal per page, so it each page would display 8 rather than 8, 16, 24, etc.
Code: Select all
{cSum(DataDataSource1,DataSource1.STKC_QTY)}
- Attachments
-
- Capture.PNG (43.64 KiB) Viewed 3143 times
-
- Posts: 3
- Joined: Mon Feb 09, 2015 5:17 pm
Re: Subtotal on current page, SQL datasource
Thank you for your response. We are using an older version which would explain the issue. There is a property against the text field called "Process at End". In our version this can only be set to true or false, however in the latest version it seems you can set this to "end of page" and "end of report". Setting it to "end of page" gives the results you posted.
Re: Subtotal on current page, SQL datasource
Hello,
Let us know if you need any additional help.
Thank you.
Let us know if you need any additional help.
Thank you.