cancel
Showing results for 
Search instead for 
Did you mean: 

Sum a forumla in Group level

Former Member
0 Kudos

Hi All,

I have a forumla which is {OrderAmountBeforeTax.OrderTotalBeforeTax} - {@AmtWithDeposit}, named AmtWoInv .

I place this forumla in the Detail section and wanted to so a sum in the group header section but unable to do that.

Can anyone advice please?

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Mavis,

You cannot show the sum on the Group Header unfortunately however, it can be show on the Group Footer.

What you can also do is move all your fields from the Group Header to Group Footer if that works.

The formula would be:

whileprintingrecords;

numbervar subtotal := subtotal + ({OrderAmountBeforeTax.OrderTotalBeforeTax} - {@AmtWithDeposit});


And one more formula to display the subtotals that should go on the Group Footer:


whileprintingrecords;

numbervar subtotal;


-Abhilash


Former Member
0 Kudos


Hi Abhilash,

I tried to move all the fields to the group footer but it doesnt work for me.

The presentation is wrong.

Is there anyway that i can put in header cos all my Sum amount is in he Group header.

Thanks

abhilash_kumar
Active Contributor
0 Kudos

Any Sum that is displayed on the Group Header can also be displayed on the Group Footer.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

I cant get the value for the below as shown in the image.

1. A-B

2. A Total

3. A Grand Total

4. Total Of A-B

5. Grand Total of A-B

In the Detail section, A-B is working but when i pulling them to Group Footer is not working.

Same as A Total.

I have done as per your advice to move all field from Group Header to Footer.

Can you advice how can i get all the 5 fields?

Thanks

Former Member
0 Kudos

Sorry the A total and A Grand Total should be B Total and B Grand Total.

Thanks.

abhilash_kumar
Active Contributor
0 Kudos

Fields in the Details Section should not be moved to the Group Footer. Just move fields from the Group Header to the Group Footer. Instead of 'displaying' fields on the header, you're now using the Footer to show them.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

I didnt move the fields from Detail to Group Footer.

I moved the fields from Group Header to Group Footer as what you have advice.

I still cant get the value for the below 5 fields as shown in the image.

1. A-B

2. B Total (A total change to B total in the image)

3. B Grand Total (A Grand total change to B Grand total in the image)

4. Total Of A-B

5. Grand Total of A-B

abhilash_kumar
Active Contributor
0 Kudos

Forget the A-B part. After moving the fields to the Group Footer, does the report show data as expected?

If yes, then send me the report with saved data and I'll take a look at it.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

I have moved all the fields to the Group Footer and the report is showing the data as expected.

I have sent the report with saved data to your email.

Please help.

Thanks.

Former Member
0 Kudos

Hi Abhilash,

I need the below information for the report as well but i cant get it.

I tried using the forumla Sum({AmtWithDeposit}) but it does not allow me to use this forumla.

2. B Total (A total change to B total in the image)

3. B Grand Total (A Grand total change to B Grand total in the image)

Will you be able to help?

Thanks

Answers (2)

Answers (2)

former_member477249
Participant
0 Kudos

Place a formula with the following code in the details section and suppress it.

whileprintingrecords;

numbervar ShowSum:= ShowSum + @AmtWoInv;

Now, place a formula with the following code in the group footer:

whileprintingrecords;

numbervar ShowSum;

And finally, place another formula with the following code in the group header and suppress it:

whileprintingrecords;

numbervar ShowSum:=0;

-Prathamesh

Former Member
0 Kudos

Hi Mavis,

Do you have any summary functions inside the formula  @AmtWithDeposit    

Former Member
0 Kudos


Hi Vissu,

In the group level there are @AmtWithDeposit and SumofOrderAmountBeforeTax.OrderTotalBeforeTax.

The formula for @AmtWithDeposit as shown below.

If Maximum({@FInv}, ({@EventDescAndEventID})) = "x" then

     0

else

     Maximum({@Dep}, ({@EventDescAndEventID}))