0
votes

I have a report I've built in BIDS. There are a few text boxes at the top of the report, followed by a table which displays all the results from one of my datasets. When this table is populated with enough data that there would be multiple pages in the export, it won't export to PDF in either the BIDS preview, or when the report is uploaded to the server. In BIDS I get this error:

An error occurred during local report processing.
An error occurred during rendering of the report.
An error occurred during rendering of the report.
Object reference not set to an instance of an object.

I've narrowed the problem down to a particular item in the table which comes from a text column in a SQL Server database view. The values in this column contain line breaks. If I replace the line breaks with spaces, the report will export to PDF without a problem, but if I leave them in or even if I replace them within the text box expression in the report with VbCRLF or something like that, I am getting the error.

If I try to export to Excel, I get this slightly different error:

An error occurred during local report processing.
An error occurred during rendering of the report.
An error occurred during rendering of the report.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

There is no parameter called 'index' in my report.

It will export to all other formats without an error.

I can force it to error by using this in the SELECT of my dataset, rather than the actual data:

SELECT 'this is a first line' + char(13) + char(10) + ' this is the second line' as Notes

But again, if there aren't enough rows to cause multiple pages in the PDF, it doesn't cause the error.

Can anyone suggest a fix for this? I've been searching for hours but haven't even been able to find anyone with the same problem.

1

1 Answers

0
votes

This error can be caused by there being insufficient space to display the header or footer. Have you got an image in your header/footer which is a fixed size larger than the width of your header/footer.

Maybe a textbox...

Take a look at the components within your header/footers and see if the sum of the widths (or indeed heights) is greater than the available space.