JD136
JD136

Reputation: 175

How to show group header only once per page in SSRS when page breaking is conditionally disabled?

I have a Tablix Row Group in which I have set the PageBreak.BreakLocation property to "Between". In this same Row Group, I have set the PageBreak.Disabled property to an expression that sometimes evaluates to True and sometimes to False.

(The user has asked for this, since some groups of records are logically distinct from other groups of records and thus should be displayed on their own page vs. a separate page.)

This is working great, however, the Header on the Tablix associated with the Row Group should be displaying in a way that corresponds to this page breaking behavior. Right now, I set the Static Tablix Member (that is, the header) properties like this:

This behaves as expected for the groups where page breaking is not disabled - I get the header once on each page. However, for the groups where page breaking is disabled, I am getting the header for each group, which almost always translates to the header displaying multiple times on each page.

I have tried numerous things.

  1. I was going to set the PageName property of the group to a certain value and then put the header in the Header of the report. However, I already had a PageName set that I was using in the report Footer. I then supplied a "PageNameTwo" to the report but there is only one "Page Name" global variable which I can use... I want to use the current PageName variable as it is

  2. I set the "KeepTogether" property for the Static Tablix Member (the header) to True

  3. I set the "KeepWithGroup" property for the Static Tablix Member (the header) to None and Before

  4. Reviewed this post but the answer and questions are somewhat vague, but also seem to be different than my problem (my report is not using a sub-report, for example)

I've searched numerous times using different wording and even tried an AI tool but I can't seem to find a relevant response to this question. I'll keep looking but any insight or recommendations would be welcome!

Upvotes: 0

Views: 37

Answers (0)

Related Questions