COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: barrysaab on 11 May 2011 12:14:37 PM

Title: Conditional Formatting first and last row of the report
Post by: barrysaab on 11 May 2011 12:14:37 PM
 I have requirement such that i need to format dynamically first and last row of each page.My data source is dimensional and it is list report.Appreciate your help.Thanks
Title: Re: Conditional Formatting first and last row of the report
Post by: MFGF on 12 May 2011 04:07:38 AM
Are these detail rows embedded within the list, or are they summary rows?  If they are summaries, you may find the task a little easier.

Regardless, you need to find a way of identifying the rows to be highlighted - is there anything unique about them?  If not, you may have to resort to adding a running count and figuring out how many rows fit each page, then base your condition around that.  It may be a little messy though.

Regards,

MF.
Title: Re: Conditional Formatting first and last row of the report
Post by: barrysaab on 12 May 2011 09:40:37 AM
Thanks,MFGF.It is actually Quantity measure,and records change dynamically,irrespective of no of  records appear on the page,i want to conditional format with color first and last row of each page.As you said ,it seems bit messy and i think i got a task out here.
Title: Re: Conditional Formatting first and last row of the report
Post by: cognostechie on 12 May 2011 01:02:30 PM
Maybe limit each page to show only 20 rows and create a calculation to determine the remainder after dividing the
row number by 20. If the remainder is 0 and the value achieved after division is integer, then it is probably the last row.

So... if row number = 1 or row number = <the logic above> then 'Highlight' else 'DontHighlight'.
This is a pseudo code for the conditional variable.

Not sure if it work, just passing on the idea.