rashleighp
rashleighp

Reputation: 1226

Sub-reports won't render to file SSRS

I have several server reports with sub reports. My problem is that I want to save these as PDF documents to the server. I do so using:

ReportViewer.ServerReport.Render("PDF", null, out mimeType, out encoding,
   out extension, out streams, out warnings);

And then saving the resulting bytes to a file with the correct extension.

When I render in this way and then look at the resultant PDF there is just blank space where the sub-reports should be.

Weirdly I had forgotten to set a sub-report parameter from the parent on one attempt and the PDF contained a message altering me. When I added the parameter, re-uploaded the report, and tried to generate it again again I just got the blank space.

Upvotes: 1

Views: 1485

Answers (1)

Jeroen
Jeroen

Reputation: 63729

SSRS has behaved very weirdly for me in the past when re-uploading reports where the parameters have changed. You could try to:

  • delete the report first, then re-upload the subreport? (same for main report)
  • temporarily duplicate the sub-report with a new name, upload that and retry?
  • check the Reporting Services Web Frontend and try to preview / export the report there?

Just as a small but important final question: have you checked that the sub-reports aren't just empty (and are rendering normally, but empty)? E.g. put a static textbox in it or something alike.

Upvotes: 2

Related Questions