Reporting Services - Group Name in Page Header

蹲街弑〆低调 提交于 2019-12-05 02:52:58

问题


I have a report with one group (Office Name) which page breaks between each group - so the data for only one Office can appear on a given page. How do I get that Office Name to appear in the page header?

I tried creating a hidden textbox in the details section of the report which has the Office Name value and then referencing that in the Page Header, but I get the last Office Name value on page 1 and then it is blank on every other page.


回答1:


Today, at last I found another way to do this.

On the group that you specified the page break, in the properties window, expand the Group section. See Pagination in Reporting Services (Report Builder and SSRS)

You can set the BreakLocation property in the Tablix Properties, Rectangle Properties, or Group Properties dialog boxes, but you must set the Disabled, ResetPageNumber, and PageName properties in the Report Builder Properties pane.

You should see a PageName field. This field can be set to that of one of the field data values from the dataset used by the tablix.

Once you have set the PageName field, you can add a textbox to the Page Header/Footer and set the expression to use the PageName field. Built-in Globals and Users References (Report Builder and SSRS)

=Globals!PageName

This should then change on each group change, and be visible on each page.

I have realy struggled finding a good solution for this, so if I need to clear up the answer, please feel free to suggest this.




回答2:


I got it to work and I'll post the answer in case someone else runs across this issue.

For some reason referencing the text box did not work, but when I put a hidden column in the table with the same value, I could then reference that in the Page Header.



来源:https://stackoverflow.com/questions/632215/reporting-services-group-name-in-page-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!