0
votes

I have a report with two subreports inside. The main report has keeptogether true and page break checked in a group. Both subreports has keeptogether false and no page break.

My environment is SSRS 2008 and VS 2013 (Reportviewer 11)

I got two (separate) issues:

  1. the page break is not working when I display the reports in reportviewer in browser. But it works when I export it into pdf.

  2. if the main+subreports cannot fit to one page. then it basically cut the main report and subreport into different page (even though keeptogether in mainreport is true and subreport is false)

Is there someone that can suggest what is going on? Some post stated that this is a default behaviour, if yes, is there any workaround for this?

Thanks before!

1

1 Answers

0
votes
  1. The default DisplayMode of the ReportViewer is set on Normal, try changing this to PrintLayout.

    myReportViewer.SetDisplayMode(DisplayMode.PrintLayout);
    

  1. When the report content exceeds the maximum page size it will break to a new page, there is no way of stopping this, in the designer the property even says "Keep together on one page if possible".

As your description of your actual report isn't completely clear, I'll assume that your main report has some data above the two subreports that you wish to be kept together.
To achieve this wrap that data inside a new Rectangle and set the KeepTogether property on True.

If I misunderstood you in anyway, just let me know and i'll update my answer.