Joined: 13 Aug 2010
Location: United States
Online Status: Offline
Posts: 8
Topic: Using a subreport total to do a calculation in the Posted: 05 Nov 2013 at 7:28am
I have a sub-report linked to my main report to pull an account balance. I then need to use that sub-report account balance and subtract that from a figure in the main report. How do I do that?
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Posted: 10 Dec 2013 at 5:01am
I would assume you figured it out, but the answer would be shared variables, in the main before the call to the subreport you would have the reset:
shared numbervar x:=0;
"" //hides the reset
in the subreport, probably the report footer
shared numbervar x;
x:= however you calculated the balance
"" //again to hide the balance
in the main report, after the subreport
shared numbervar x;
//use x however needed in the main report
sorry this is late, I don't monitor this forum very often.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Posted: 10 Dec 2013 at 5:21am
Actually, except for how you actually use the variable, it is CR syntax...native syntax, not Visual Basic.
All that I am showing is how to declare, set, and access a shared variable...since I have no idea of what the database/datatable structure is or how you need/plan to use the value.
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