crystal reports print summary of a group in another group footer

588 Views Asked by At

I am trying to print a report of this format:

Name (Formula: Lname,FName)
Details for that Name group
     Summary of Group1(by week)
     Sumary of Group2 (By Name)
      Summary of group 3 in group2 footer

I want a consolidated summary of one group Eg:

Somerset, Mark

  6-12-2009 Writer      $400

  7-12-2009 Actor       $500

            Year 1     $900          

  6-12-2010 Unemployed  $0

 7-12-2010  Writer      $600

             Year 2     $900


             Writer     $1000
             Actor      $500
             Unemployed $0 
Somerset, William

  5-12-2009 Writer      $300

  7-12-2009 Actor       $300

            Year 1      $600          

  5-12-2010 Unemployed  $0

  6-12-2010  Writer     $800

             Year 2     $800


             Writer     $1100
             Actor      $300
             Unemployed $0 

The report is grouped by Name which is a formula. So I cannot create a subreport! Can anyone please help!

2

There are 2 best solutions below

1
On

Create two more formulas and place those in details after your regular fields and take summary in the section you require and supress the detail formulas and only display summary formula.

Create a formula @Writer

if databasefield="writer"
then value
else 0

Create a formula @Actor

if databasefield="Actor"
then value
else 0
0
On

I found the answer in partially a new idea and rest another thread: 1. I can group the report and sub report by a field"Candidate Key" I did not think of this earlier because Candidate Key is not being displayed on the report and I thought I could not use it!(duh !) 2. rest is a normal process of creating a sub report. But to link them I found the answer in one of the threds. I am re posting here though: You have to link the subreport to the main report: right-click on the subreport and choose "Edit subreport links". Here you can select the fields to use to link the main report and the subreport.

Edit Subreport and in Menu, Click Report -> Select Expert and click show formula button. By default it shows Record Selection radio button.

You copy that formula and choose Group Selection and paste and give ok.

It will work :-)