Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summing Value In Main Report that was Passed From SubReport

Status
Not open for further replies.

candio

Programmer
Apr 2, 2007
1
0
0
US
Hi,
I have a report that is making me pull my hair out!! I'm way past my due date and seriously stressed. Can someone take pity on me and help with what I know is an easy thing for someone who is familiar with this type of issue?

I have passed a value from a subreport back to the main report, and I can accumulate this value, but I cannot get the formulas set up correctly in the main report to reset this value at the appropriate group change. My report looks like this:
Group Header #1 District
Group Header #2 Site
Group Header #3 Project
Group Header #4 Program
Details
Group Footer #4a Subreport (displays data and shares the subreport total with the main report)
Group Footer #4b Program (Subtotal for this program and displays the subreport total)
Group Footer #3 Project (Subtotal for this project and [highlight #EF2929]should display the subreport total for the project[/highlight])
Group Footer #2 Site (Subtotal for this site and should display the subreport total for the project)
Group Footer #1 District (Subtotal for this district and should display the subreport total for the district)
Report Footer Grand Total

The areas in red are the ones that I cannot get to work correctly. I know that I need formulas to accumulate the value and reset the value, but I am completely out of ideas on how to get this to work. Some expert advice would be greatly appreciated!
By the way, I am using Crystal 2016. Thanks!
 
In the accumulation formula in your subreport, add a separate shared variable for each group level, and have it accumulate the same way you accumulate for the program level. Then create four reset formulas corresponding to each group level and place the appropriate reset formula in the corresponding group header. Create four display formulas, one for each group footers and corresponding to the variable for that group.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top