cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

whilereadingrecords and whileprintingrecords

Former Member
0 Likes
28,946

Hi All, I am trying to figured out the difference between while reading records and whileprintingrecords.

I created two formulas for running totals like this.Both are giving same result.

WhileReadingRecords;

numbervar x:=x+1;

WhileprintingRecords;

numbervar x:=x+1;

Please suggest what is the difference

View Entire Topic
Former Member
0 Likes

you would not notice any difference in such a formula, since the variable x is simply incremented and it does not matter which pass is being used.

however, if you prefix a running total evaluation-formula (that typically sums up cumulative group summaries) with whilereadingrecords, it will show 'this formula needs to be evaluated at a later pass' error. It will need a whileprintingrecords since the group-summaries are calculated in pass-1 whereas whilereadingrecords is executed in pre-pass 1.

I am guessing that you are preparing for an interview, is it the case?

If yes, then please use the learning resources avaialble at the left-hand side menu.

If no, then please post the issue that you're facing in the report with snapshots.

-Prathamesh

Former Member
0 Likes

Hi Prathamesh,

I am not preparing for any interview.In my report I created two formulas for WRR and WPR.

If I kept WPR formula alone I am getting correct result.If I kept WRR and WPR I am getting WPR as a continoution of WRR.

I Just want to know what is happening here.

PFA

abhilash_kumar
Active Contributor
0 Likes

That's because the value of x is '14' before the WPR formula starts evaluating.

-Abhilash