I have an old report written by someone else and don't want to change it too much. Each data row has a field at the beginning that is populated with the Category name if it is the first record for that Category and is left blank for all the others. A total line follows at the end of a Category开发者_开发知识库 section.
I works fine except when there is a page break between the first record and the last. In this case it is hard to tell what the category is since it is on the previous page.
My question is if there is a way to tell if a row is the first on a page? I tried
=IIf( (RowNumber(Nothing) = 1), Fields!DepartmentDescription.Value, "")
but that only shows the category for the first record in the category (which is already done using).
RowNumber("tblMain_DepartmentGroup") = 1
Not the first record on the page.
Thanks for any help.
You could have easily used the First()
function. It literally receives and uses the first value it gets from the data collection.
Yes, it's possible. No, it's not easy. It would require some custom VBscript code (to be found in Report Properties). You might be trying a wrong approach.
In this case I would recommend to repeat some of the heading on new pages. Select 'Advanced Mode' at the little arrow next to Column Groups. In your row groups, a couple of extra (Static) items appear. Select the correct ones, and set 'RepeatOnNewPage' to true.
To give us some more context, it might be useful to know what you want to achieve with this.
精彩评论