0
votes

I have a SSRS report that looks like the following:

Report Header:
Page X of Total Page Y (based on change of Customer ID)
Customer ID (Referring to ReportItem!CustomerID)

Report Body:
A tablix page break by change of group Customer ID

Tablix Header:        Date    |  Price | Quantities | Description | Hidden Column Customer ID
Tablix Details:    YYYY-MM-DD |  1.00  | 500        | Blah Blah   | Customer ID (used for page header referring)
Row outside group: Empty
Row outside Group: Sum of Price
Row outside Group: Sum of Quantities
Row outside group: Empty
Row outside group: *** END OF RECORDS ***

Report Footer:
Company address

Occasionally, the Row outside group will go to next page if the report body for the tablix details are full, which causing in the next page, only some of the rows outside group will be displayed (e.g. * END OF RECORDS *).

Then, in the report header, the Customer ID field cannot get the value of ReportItem!CustomerID which leave it blank.

Is there anyway to solve the blank issue? Or make the row outside group must attach to the tablix details in the same page? For some reason, I cannot limit the number of rows display per page. Thanks.

2
Is this report run for 1 customer at a time or multiples?StevenWhite
@StevenWhite, it runs for multiple customers at a time. And it is exported in PDF format. Thanks.TinySimonH

2 Answers

0
votes

Maybe you can try throwing in another hidden copy of the final "Customer ID" somewhere on the "END OF RECORDS" group row and then use an IIF to call that one if the original hidden "Customer ID" you have isn't present on the final page.

0
votes

You can control when the page breaks occur and keep the elements together, but it's not very intuitive. First, don't use actual Headers and Footers. Just use textboxes that will appear at the beginning and end of each Customer's data. Second, you need to wrap everything in a grouped rectangle. This will be grouped by customer with page breaks set to happen between instances.

See my answer here for more details on how to do this.