Wednesday, March 21, 2012

Line numbers in Report Builder

I have a report in which the user community would like line numbers associated with each row. Has anyone done this or have any ideas how to accomplish this?

Line Item Manufacturer
1 Mazda
2 Ford
3 BMW

ThanksThis seems like something you want to do in the sql query rather than the report. Not sure, exactly how...|||Since you drag elements into the design area and Report Builder is not based on a query, there is no way to create line item numbers within Report Builder.

Is that what you are saying?|||Hi,

You can use RunningValue function as the text value of the line number column.

If you want a numbering for rows within a dataset, you can use

=RunningValue(1, SUM, "Employees")

where Employees is the dataset name.

If you have groups in your reports, say one of the groups has a name "EmployeesByCity", then you can replace the last part of the RunningValue with this group name shown as below

=RunningValue(1, SUM, "EmployeesByCity")

You can check the below link for a sample

http://www.kodyaz.com/article.aspx?ArticleID=40

Eralper|||Thank you for your assistance. "RunningValue" is not available in Report Builder.|||

I've got a similar issue that RunningValue won't work for. Basically, what the business users want is a line number for each line in the report. Independant of the groupings. I believe this has to be done during the rendering of the report as it has to cross groups after all the report processing has been done. Here's a small sample of what they want it to look like.

Column A Column B Column C

1 Group 1 Header

2 Group 2 Header

3 Detail

4 Detail

5 Detail

6 Group 2 Footer

7 Group 1 Footer

The count can reset at the begging of each page, or continue, doesn't really matter. I'm trying everything I can think of.

Any ideas out there?

|||

If you add RowNumber("DSName") in the first column then it should work...

|||

Unfortunately, it's not that easy. Doing that, you get the total #f rows for each group on the group level headers. I need the count to be a straight rendered line number count and not be tied the underlying data set or grouping structure.

No comments:

Post a Comment