Joined: 07 Jun 2010
Online Status: Offline
Posts: 40
Topic: Accumulate a numeric variable in same footer Posted: 28 May 2013 at 2:21am
This might be an easy one but I cannot for the life of me work out how to get it to work. Basically I have a couple of sections under group footer 1 which gets suppressed or shown depending on certain situations. I need a variable to increment and display on the sections that are not suppressed.
E.g.
Section Suppressed Variable displayed GF1a No 1 GF1b Yes N/A GF1c No 2 GF1d Yes N/A GF1e Yes N/A GF1d No 3
I'm using the following formula on each of the sections to display the variable: shared numbervar v-number; v-number := v-number + 1; v-number;
But they all just show 1 - how do i get it to show as per above? I tried using whileprintingrecords but that doesn't seem to work either... Help!
It is displaying always 1 just because your group is getting processed only once. In order to get the desired results you need to write formulas for each row based on your suppress condition.
Ex: 1st line formula.
numbervar x;
If Suppressed = 'Yes' Then
x:=x+0;
Else
x:=x+1
2nd line formula :
numbervar x;
numbervar y;
If Suppressed = 'Yes' Then
y:=0;
Else
y:=y+1;
x:=x+y;
Joined: 07 Jun 2010
Online Status: Offline
Posts: 40
Posted: 29 May 2013 at 5:01am
Hi Thanks for that. I wanted to get around creating a formula for each row as there are quite a few rows and the suppression conditions on each row is different. This means that the formular for the later rows get quite big. Is there any other way around this? I had thought that whileprintingrecords would work for such situations?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum