Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Row is inheriting value from previous row in report output 1

Status
Not open for further replies.

awhawh

Technical User
Jul 31, 2008
7
GB
I’m trying to create a report that takes a number of rows (grouped by Process ID) and to output them on one row.

Process ID SLA Name Days taken
100 Test1 10
100 Test2 15
100 Test3 20
200 Test1 5
200 Test2 4

I’ve managed to achieve this by creating formulas in the detail section of the report (suppressed from the report output) and additional formulas in the ‘Process ID’ group footer.
However, I’m experiencing a problem where a row is inheriting values from the previous row when the value should be NULL:

100 Test1 10, Test2 15, Test3 20
200 Test1 5, Test2 4, Test3 20

On the second line, for process ID 200 the ‘Test3’ is being displayed even though there is no such value for this process. This value is the same as on the previous row.

It should display it as:

100 Test1 10, Test2 15, Test3 20
200 Test1 5, Test2 4


For your information, this is what my formula looks like:

shared numbervar Actual;
shared numbervar FooterActual1;
shared numbervar FooterActual2;
shared numbervar FooterActual3;

If {WorkManager.Process ID (Process instance)} <> Previous({WorkManager.Process ID (Process instance)}) then
Actual := 1
else if
{WorkManager.Process ID (Process instance)} = Previous({WorkManager.Process ID (Process instance)}) then
Actual := Actual+1;

if Actual =1 then
FooterActual1 := {WorkManager.Actual days taken (SLA)}
else
if Actual =2 then
FooterActual2 := {WorkManager.Actual days taken (SLA)}
Else
if Actual =3 then
FooterActual3 := {WorkManager.Actual days taken (SLA)}
 
As you are grouping on ProcessID, you need to reset the variables in the Group header. Place this formual in suppressed header

@Reset

shared numbervar Actual:=0;
shared numbervar FooterActual1:=0;
shared numbervar FooterActual2:=0;
shared numbervar FooterActual3:=0;
 
Excellant, that works great.

Thanks for your help Ian.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top