Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 04 Mar 2013 at 10:12am
if the subreport is run before (in a section above) the field you want to bold and you return the value or some flag based on all of the values as a chared variabl then you can use the shared variable in the main report as your condition for bolding
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 04 Mar 2013 at 10:20am
thanks for getting back
the sub is display in the detal section I created this formula in the subreport whileprintingrecords; shared numbervar totals:=Sum ({@Monday}, {@client})+Sum ({@Tuesday}, {@client})+Sum ({@Wednesday}, {@client})+Sum ({@Thursday}, {@client})+Sum ({@Friday}, {@client})
which gives me the correct total
and I have this formula in the main report WHILEPRINTINGRECORDS; SHARED NUMBERVAR TOTalS; TOTalS
then i conditionally format the field
// This conditional formatting formula must return one of the following Font Style Constants: // // crRegular // crBold // crItalic // crBoldItalic // if {@PASSED}<> 0 then crBold
which all seems to work EXCEPT if first name is a total of 22 and the next is 0 the passed value still has 22
Joined: 17 Feb 2011
Online Status: Offline
Posts: 219
Posted: 04 Mar 2013 at 10:41am
sorry I'm really screwing this up!!!!
It seems that I have things in the wrong place Subreport I have the formula that passes the sums to the mainreport in GF1 I display data in GF2 (The sub does not display detail section)
Mainreport I have the formula in detailsb and the data in detailsa
I get this
Client 1 - has total of 29(in sub) but passes 0 to main client 2 - has total of 23 but passes 29 client 3 has total of 0 but passes 23 etc.....
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 04 Mar 2013 at 10:49am
move the sub report to the GH1a. You can technically hide it if you want to as there is a trick for that but for now just get it to work then worry about suppressing.
Place the shared variable formula in the main report on GH1b. This also can be suppressed but make sure it gives you the correct value before hiding it.
now your bolded field should be details A and it should work 'correctly'. You dont need a Details B anymore (I think).
Basically just rememember this flows from top to bottom always. You can never reverse the flow of it. So your flow right now has the bolding condition looking at the value form the last group because the variable is being set up in the GF.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 04 Mar 2013 at 10:50am
If you need to display values in the group footer you can pass other shared variables from the GH sub report and use them to display in the GF or you could insert another version of the subreport into the GF (much less efficient).
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