Reporting Services - Group Name in Page Header

后端 未结 3 2143
暗喜
暗喜 2021-02-10 16:25

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 t

相关标签:
3条回答
  • 2021-02-10 16:32

    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.

    0 讨论(0)
  • 2021-02-10 16:44

    I am actually doing this in the footer and it worked! Thanks! Just wanted to add if you have multiple values you are trying to display in the header or footer, you can string them together with a delimiter in the pagename expression like

    =Fields!FIELD1.Value + "|" + Fields!FIELD2.Value + "|" + Fields!FIELD3.Value + "|" + Fields!FIELD4.Value
    

    Then you can create new fields (one for each value) and parse out each field like

    =(Split(Globals!PageName, "|")).GetValue(0)
    =(Split(Globals!PageName, "|")).GetValue(1)
    =(Split(Globals!PageName, "|")).GetValue(2)
    =(Split(Globals!PageName, "|")).GetValue(3) 
    
    0 讨论(0)
  • 2021-02-10 16:49

    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.

    0 讨论(0)
提交回复
热议问题