Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Topic: Using a passed value in a Running total? Posted: 06 Feb 2013 at 9:07am
Hi
I have a value passed from a subreport to the main report but I then want to use that value in a running total forumala, but it isn't in the list to use?
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 06 Feb 2013 at 10:04am
I think the sub report return happens in a data pass that occurs after the running total pass. You should be able to use it in a shared variable formula
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 06 Feb 2013 at 10:15am
when i go to use it in a formula in a running total it is not an option. If I try to use a formula to evaluate it then use that formula in a running total it again drops it off the list of choices in the formual in the running total
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 06 Feb 2013 at 12:01pm
sorry im a bit lost..
So I am looking at clients sorted by client and service date for a month
I need a subreport which goes and checks if an event happened on that service date on the main report if it does it moves a 'Yes' to the main report
I have running totals for each day DatePart ("d",{RECORDED_SERVICE.STARTTIME}) =1 then move an X to it I want to add "and "sharedvar(passed from subreport) = 'yes' soit will leave it blank if sharedvar is not YES right now it shows all service dates that happened
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 07 Feb 2013 at 4:29am
Hi
So I combined into 1 and still cant add the formula to the running to here is what i have:
Group1 is Client name Group2 is service date
I but this formula in the G2 Header WhilePrintingRecords; NumberVar sum:=0; sum := 0
I put this in Detail: WhilePrintingRecords; NumberVar sum;
sum := sum + if(cdate({RECORDED_SERVICE.STARTTIME}) in cdate({CLIENT_TREATMENT_HISTORY.ADMITDATE}) to cdate({@CHDischargeDAte})) then 1
I put this in GF2 : WhilePrintingRecords;
NumberVar sum;
I think I have the order messed up?
The ultimate goal is on GF2 (service date) I haveOne running total for each day of the month) I look at the day of the month in the running total if "sum " = 0 then I move an "X" to it if it is greater than 0 then I want blank
Then on GF1 (Client I display all 31 running total and it should have an X for each day that had a sum of zero
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