Jedi Master Spooky
Jedi Master Spooky

Reputation: 5809

Summary fields in Crystal Report VS2008

I need to have a summary field in each page of the report and in page 2 and forward the same summary has to appear at the top of the page. Anyone know how to do this? Ex:

> 
> Page 1
> 
> Name Value 
>  a     1 
>  b     3 
>  Total 4
> 
> Page 2 
> Name         Value 
> Total Before  4 
>  c             5 
>  d            1 
>  Total         10

Upvotes: 0

Views: 3015

Answers (2)

Phillip Wells
Phillip Wells

Reputation: 7662

Create a new Running Total Field called, for example "RTotal". In "Field to summarize" select "Value", in "Type of summary" select "sum", under "Evaluate" select "For each record". You can then drag this field into your report to use as the "Total" at the bottom of each page.

You cannot use this running total field in the page header too, however, because Crystal will add the value in the first row on the page to it first (so in your example it would show 9 rather than 4 at the top of page 2). To work around this, create a formula field which subtracts the current value of the Value field from the running total (e.g. {#RTotal}-{TableName.Value}), and put this formula field in your page header.

Upvotes: 1

Carlton Jenke
Carlton Jenke

Reputation: 3025

I do not understand your question all the way.

If you need an overall summary that is repeated, you would need a sub-report that have shown in the report multiple times.

Upvotes: 0

Related Questions