Joined: 17 Feb 2010
Online Status: Offline
Posts: 8
Topic: Yet another questions about subreport totals Posted: 10 May 2012 at 2:03pm
I have a variable from a sub report being passed to the main report. That variable is a sum of a column in the sub report. I'm then summing the sum in the main report using a global variable and that is all working fine.
But, the data in the sub report is being filtered not just by the default parameter linking sub report to main report, but also by a user input parameter on a column in the sub report.
The end result is the main report is displaying the proper lines from the sub report that I want (although there is a blank detail line with a header from the sub report where the user input parameter doesn't match.)
The problem is the variables are including the data that is hidden on the main report, summing the values that are filtered by the user input parameter.
I hope this makes sense, very difficult to explain this properly. Can anyone help me with this?
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 11 May 2012 at 4:14am
sounds like you need to adjust the logic for the shared variable in the subreport.
if you are just using SUM in the subreport, it will report everything, including items that were suppressed. To correct this, you would want to increment your shared variable for each line of detail that is displayed, then the variable will always represent what the user is seeing on the report.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum