cancel
Showing results for 
Search instead for 
Did you mean: 

Count not suppressed detail rows

Uli_Stoeckl
Participant
0 Kudos

Hello,

I am facing a problem with counting detail rows if not suppressed. What I try to do is to build a formula like this:

If suppress-condition = true Then 0 Else 1

Thus I could count all displayed elements. My problem is the instance that I have to use a WhilePrintingRecods formula for suppressing some unwanted details:

WhileprintingRecords;

shared stringvar array str;

NOT ({InfoObject/0coorder}

IN shared stringvar array str)


Up to now I have not found a way to realize this If-them-else formula. Does anyone have an idea how to reach this goal?

Thanks all,

Uli

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Uli,

What is the logic for suppressing unwanted rows?

If you could paste that here, I can suggest a count formula.

-Abhilash

Uli_Stoeckl
Participant
0 Kudos

Hi Abhilash,

the used shared variable compares retrieved projects (in details) with a also suppressed list of projects in the report header. If the project (in details) is not in the first list from the report header, then it is suppressed.

This is done with the formula:

WhileprintingRecords;

shared stringvar array str;

NOT ({ZCR0000000000310577027.PSP-Element (Stufe1)\PSP-Element (Stufe1) - PSP-Element (Stufe1) (Schlüssel)}

IN shared stringvar array str)

Thanks for your help,

Uli

abhilash_kumar
Active Contributor
0 Kudos

Hi Uli,

1) Create a formula with this code and place this on the details section:

WhileprintingRecords;

Numbervar count;

shared stringvar array str;

If ({ZCR0000000000310577027.PSP-Element (Stufe1)\PSP-Element (Stufe1) - PSP-Element (Stufe1) (Schlüssel)}

IN shared stringvar array str) then

count := count + 1;

"";

2) create another formula with thise code and place this on the footer:

Whileprintingrecords;

Numbervar count;

-Abhilash

Uli_Stoeckl
Participant
0 Kudos

Hi Abhilash,

great, your proposal works fine. But I forgot to mention - sorry - this report contains some groups. One group per office.

The solution works great for a placement in the report footer, but I fail with it in the group footer. Is there any possibility to adapt the variable?

Thanks in advance,

Uli

abhilash_kumar
Active Contributor
0 Kudos

Place the second formula on the Group Footer.

Create a reset formula with this code:

WhileprintingRecords;

Numbervar count := 0;

And place this on the Group Header.

-Abhilash

Uli_Stoeckl
Participant
0 Kudos

Hi Abhilash,

the reset formula has solved my problem with the groups.

Great help, as always.

Thanks

Uli

Answers (0)