In a message dated 00-03-16 07:03:14 EST, you write:
Need a tip on using row nos., actually serial numbers for a block & the
serial numbers should restart on a new value if a break is applied on the block.
Example : Lets say I have a report with Country, Resort & Revenue in a block. Now I break on Country. The block should have serial numbers independently for each country.
Any tip / help is highly appreciated.
There’s a fairly easy solution for this. The trick is to recognize the need to “reset” the counter on a break. That should bring to mind the various “Running” functions provided by the reporter module.
Recall that the COUNT function will only count unique values if you count a dimension. But you can use it to count actual rows by using the formula
=Count ( Body )
The “Body” keyword is a synonym for “rows”. The formula above translates into count ( rows ). This is a start.
Each aggregate function also appears as a “Running” function. (Average, RunningAverage, Sum, RunningSum, Count, and - you guessed it - RunningCount). The difference between the Count and RunningCount is that the RunningCount does not reset at each break level automatically. You can, in fact, specify just when you want it to reset.
Combining these two ideas provides the answer. I created a report with Country, Resort, Year, and Revenue. I added a new variable to the document called RunningRowCount with the formula shown below:
=RunningCount(Body; )
The syntax says Count Rows, reset the count for each Country. The text version of the report is shown below. “RN” is shorthand for Row Number. If you view the text in a fixed width font (use Windows Notepad, for example) then the columns should show up in their proper alignment. The values for RN restart at one for each country.
Regards,
Dave Rathbun
Integra Solutions
www.islink.com
Country RN Resort Year Revenue
France 1 French Riviera FY93 295,940.00
2 French Riviera FY94 280,310.00
3 French Riviera FY95 259,170.00
Country RN Resort Year Revenue
US 1 Bahamas Beach FY93 287,929.00
2 Bahamas Beach FY94 307,400.00
3 Bahamas Beach FY95 376,115.00
4 Hawaiian Club FY93 479,685.00
5 Hawaiian Club FY94 519,530.00
6 Hawaiian Club FY95 480,445.00
Listserv Archives (BOB member since 2002-06-25)