cancel
Showing results for 
Search instead for 
Did you mean: 

CR2011 - Can we place a Running Total Field in a Header i/o Footer?

leon_laikan
Participant
0 Kudos

Hi everybody

I am working on a Crystal Report (vers. 2011)

It has: GH3

           Details

            GF3

I have 1 column called "Qty"

In GF3, I have a Running Total Field called X, which is reset at each change of group.

X gives the correct total so long as I place it in the footer.

If I move X from GF3 to GH3, it no longer gives the correct total.

I want X to be placed in the header GH3 instead of in GF3, as I need it for formatting purposes.

How can this be done?

Thanks a lot

Leon Lai

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Leon,

You cannot move it to the header unless the running total can be replaced with a 'simple' summary field.

Another way to do this is to add a Subreport and place it on the GH3 - if you're OK with the added performance hit.

Could you post an example of the logic you've used in the Running Total please? Maybe there's a way to change that to a summary.

-Abhilash

leon_laikan
Participant
0 Kudos

Hi Abhilash

Thanks for your reply,

I attach a .jpg snapshot of my screen.

A BELL (wingding) appears on all GH3 whenever the total Qty for all groups does not become zero.

This is fine, but to make the screen more user-friendly, I chose to make the Bell DEEP RED if the total Qty is <.> 0 for the particular group, and FAINT RED if the Total Qty = 0 for the particular group.

That's why I wish to place the Bell in the Header i.o footer (and also to save space ... I can then suppress the GF3)

To make the bell faint or deep red, I use this formula in the X-2 Box for Font

IF {#Tot_QtyOnHand} = 0 THEN Color (255,204,204)  // very pale red

ELSE IF {#Tot_QtyOnHand} <> 0 THEN crRed

Is there any trick I can use to achieve what I want to do?

You cannot move it to the header unless the running total can be replaced with a 'simple' summary field.

Could you explain more fully what you mean by 'simple' summary field?

My summary field is just a sum of Qty, which is reset on each change of group

Thanks

Leon Lai

abhilash_kumar
Active Contributor
0 Kudos

Hi Leon,

You don't need a Running Total to be able to do this.

Move the BELL to the GH3 and change the color formula to:

IF Sum({Qty_on_hand}, {Group_3_field}) = 0 THEN Color (255,204,204)  // very pale red

ELSE IF Sum({Qty_on_hand}, {Group_3_field}) <> 0 THEN crRed

-Abhilash

leon_laikan
Participant
0 Kudos

Hi Abhilash

I am very happy to tell you that your formula works like a charm!

It is exactly what I needed.

Thanks a lot and Best Regards

Leon Lai

closing

Answers (0)