1

I have this report structure

MasterReport

master report

SubReport

subreport

Each tablix in the subreport is hidden if it doens't have rows

HIDDEN: =CountRows() = 0

Moreover each tablix should be on a new page. So I've added for all the tablix the PageBreak setting as follows

PageBreak setting

The problem is that I have an extra blank page at the end of the report if the last tablix has rows an is visualized as a consequence.

So I've tried to play with last tablix PageBreak.Disabled option but with no success so far. My original idea was to disable page break if current page is last page ( mapped to Report.Code the global parameters so that I can use them in Body as suggested in this SO answer, but page numbers returned are not correct as ther are always 1) and it didn't work.

gipinani
  • 14,038
  • 12
  • 56
  • 85
  • 1
    why are you using a subreport? is the additional page problem also present in the subreport? when page setting doesnt work for me, i dispable pagebreaks, but turn on keept together on the parts that should be on one page, and fill a dedicated textfield with newlines till there fits nothing else on the page (dependent on rowcount of your block) – Bacon Jan 16 '20 at 14:39
  • Thanks @Bacon for your comment. I'm using a subreport because the master report loop on all available laboratories. For each laboratory the 4 tablix in the subreport could be generated. Every tablix in a dedicated page (even if the tablix has 1 row it must be in its own page) – gipinani Jan 16 '20 at 14:42
  • 1
    dublicating the output by lab could also be achieved by grouping also there is the option for breaking between groups so there is no extra pagebreak at the end – Bacon Jan 16 '20 at 14:47
  • Well, grouping seems to do the trick. I've rewritten the whole structure using only one report. Thanks or your hint. – gipinani Jan 16 '20 at 15:14
  • i recomend you answer your own question then – Bacon Jan 17 '20 at 10:34

1 Answers1

1

At the end, as suggested by @Bacon, I solved using a group on each tablix, putting them directly in the main report.

Subreport was used as a way to iterate on result set, as suggested the same goal could be achieved with tablix grouping.

gipinani
  • 14,038
  • 12
  • 56
  • 85