0
votes

I created a running total for my report, we will named it RT1. Now i created again another running total to get the sum of RT1 but i get the wrong answer. Any advice on how to correctly do this?

I have this formula in my first Running Total
//Formula1

@SpTotalReset
WhilePrintingRecords;
numbervar sp := 0;
//I placed it in my GroupHeader Date

//Formula2

@SpRunningTotal
WhilePrintingRecords;
numbervar sp;
sp := sp + {Sec/Pc};
//I placed it in my Details

//Formula3

@SpTotalDisplay
WhilePrintingRecords;
numbervar sp;
//I placed it in my GroupFooter Date

This is the formulas of my second running total
//Formula1

@MoTotalReset
WhilePrintingRecords;
numbervar mo := 0;
//I placed it in my GroupHeader Date

//Formula2

@MoRunningTotal
WhilePrintingRecords;
numbervar mo;
mo := mo + {@SpTotalDisplay};
//I placed it in my GroupFooter Date beside @SpTotalDisplay

//Formula3

@MoTotalDisplay
WhilePrintingRecords;
numbervar mo;
//I placed it in my GroupFooter Name
1
Can you elaborate more on the issue? also what is expected and what you got? - Siva
@Siva : i made formula fields to get a daily output which i got it correct but i also want to summarize the daily output and display it as a monthly output in my report. I did the exact same thing as what i did in getting my daily output but the result when i made the monthly output is wrong. - Ralph
In second running total what options you used to summarize and where did you reset? - Siva
Siva : heres my report in second running total WhilePrintingRecords; numbervar x; x := x + {@SpTotalDisplay}; <-- this is the Display of my first running total. I place my running total beside of @SpTotalDisplay. I reset in my Group Header Date. - Ralph
the situation now is my second running total is not adding the next value just like my first running total. it just displays the value of @SpTotalDisplay. - Ralph

1 Answers

0
votes

Change like this:

@MoTotalReset

WhilePrintingRecords;
Shared numbervar mo := 0;
//I placed it in my GroupHeader Name

And apply shared for all formulas. This should work.