COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Veronis on 24 Feb 2011 03:29:49 PM

Title: Page Number in header should be easy...
Post by: Veronis on 24 Feb 2011 03:29:49 PM
The Layout Calculation that follows is supposed to display the page number on ALL pages except page 1. Such a simple task for any coding language to compare a "1" with another number.

Apparently not. ;)

Query Calculation in header: IF (PageNumber()>1) THEN (PageNumber()) ELSE ('')

fails with errors RSV-VAL-0002 and CRX-API-0003.

If I replace this with: IF (PageNumber()>1) THEN ('TEST?') ELSE ('')

it works fine. But I want the page number, not static text.

Any ideas?
Title: Re: Page Number in header should be easy...
Post by: PRIT AMRIT on 24 Feb 2011 09:14:55 PM
How about using a conditional block?

Create Boolean: PageNumber()>1
Associate the Boolean Variable with Conditional Block
If Yes, drag lay out calculation into Conditional block and define the expression as PageNumber()
If No, drag a text object and define whatever you want :)

Hope should do?

Thanks
Prit