Search code examples
crystal-reports

Crystal Report Group Fields Summery in Header?


I have four groups. I am trying to do an accumulative summation between grownups.

Ex:

group1: A = 140
 group2: A = 70
  group3: A = 20
   group4: 
     A = 10 
   group4:
     A = 10
  group3: A = 50
   group4: 
     A = 20
   group4:
     A = 30
 group2: A = 70
  group3: A = 20
   group4: 
     A = 10 
   group4:
     A = 10
  group3: A = 50
   group4: 
     A = 20
   group4:
     A = 30

Here is a snapshot of my real report: enter image description here

I have tried to using Summerize fields to sum the first level and it worked. I then tried to sum the Summzrize fields, but its not possible to sum those. I tried TotalRunningFields, but they display the results in the footer only. I tried using custom formula, but i wasn't successfully.

Can anybody give me a way of doing this. Also, if an example would be great.


Solution

  • Actually after a while, i tried to think of another way to implement the report. Crystal Report tells you not to do any grouping on the data but makes it hard for you to implement your logic based on grouping.

    What i did in th end is that i have created a view, and then created several procedures that selects from this view. Each select have the necessary grouping. After that, i made sure that each select contains the ID's that can implement the hierarchy i want.

    I mapped the all procedures and used the SMART Linking feature in the Crystal Report. This relived me from implementing any formulas or any extra logic in the report it self.