1

I have an SSRS 2019 report which runs via a URL, generating a PDF document, in a web application. It has come to my attention that the report will fail - either the URL will fail with an "Err_Invalid_Response", or the PDF will download, but it will be unreadable.

The thing is, this report works if the document prints to 2-3 pages max. If the generated PDF is larger, I get the error. I don't know how much larger it needs to be; my failing test case renders a 6-page document. The report works, even with extra pages, if I'm running it in Report Builder.

I've tried checking the Report Server logs, going to the "ExecutionLogStorage" table in my ReportServer database, and the record for a failed instance shows a status of "rsProcessingError". The XML in the "AdditionalInfo" column doesn't show anything apart from confirming that the various datasets were accessed.

My report URL is the standard format: http://[servername]/ReportServer?/[ReportName]&[parms]&rs:Format=PDF

So far I have tried editing the Reporting Services web.config file per this old blog post, changing the httpRuntime ExecutionTimeout setting to 20000 (it was 9000 previously), and increasing the maxRequestLength value as well. PDFs still render corrupted.

bmurrell30
  • 565
  • 8
  • 23

1 Answers1

1

Turns out the problem was a visibility rule I had set on a tablix within my report. Reviewing the most recent "ReportingServicesService" log in "C:\Program Files\Microsoft SQL Server Reporting Services\SSRS\LogFiles", I found an error was being thrown when my report ran.

The visibility rule was =Fields!line.Value = Last(Fields!line.Value, "[DataSet Name]")

The error thrown was The Hidden expression for the tablix 'Tablix2' contains an error: The expression references the field 'line', which does not exist in the Fields collection. Expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.

...which makes no sense to me, since the dataset in question was the one attached that particular tablix, it does contain a column called "line", and the column didn't contain any null values in that case. Short term, I'm removing the visibility rule and the report works now.

bmurrell30
  • 565
  • 8
  • 23