SSRS '08 Object reference not set to an instance of an object?

I figured out a solution. The sub-report is being passed 4 parameters, one of these had a value referring to the value a table-cell on the master report. Changing this parameter to be the value of the expression that was setting that table-cell fixed the issue.

I have no idea why this is a solution, but it is.

Up vote 0 down vote favorite share g+ share fb share tw.

Full error from Preview window in Visual Studio '08 (BIDS): "An error occurred during local report processing. Object reference not set to an instance of an object. " There are no further errors/warnings detailed in the Error List or Output windows.

Background: On this report I am using a table to display a sub-report x number of times, dependant on the number of related objects that exist in the SQL database. That is to say that the sub-report is set within one of the cells (the only cell) of the table, in a row that repeats for each item returned in a dataset. Removing the sub-report allows the master report to compile and run, so I feel the issue is related to the arrangement of the sub-report.

If the sub-report only displays once, then the master report compiles and runs fine, it is only when a second instance is required that the issue arises. When testing the sub-report separately, it compiles and runs when given the parameters for each instance it is being asked to render from the master report. So I can rule out the idea that the data for the second instance is causing it to fail (in some div-by-0 type way).

Given the lack of detail from the error and that the sub-report works on it's own, I do not understand why this is happening. Does anyone have any ideas for debugging or suggested solutions? Thanks Brian tldr: Master report fails when a sub-report repeats more than once.

Reporting-services ssrs-2008 link|improve this question asked Aug 10 '11 at 10:00Brian736613 100% accept rate.

I figured out a solution. The sub-report is being passed 4 parameters, one of these had a value referring to the value a table-cell on the master report. Changing this parameter to be the value of the expression that was setting that table-cell fixed the issue.

I have no idea why this is a solution, but it is. In more detail: table_cell_a had an expression computing it's value. Parameter_a for the sub report was set as "=ReportItems("table_cell_a").

Value", when I changed the expression for parameter_a to mirror the expression for table_cell_a, everything worked again. This is messed up, and I can't even begin to understand why it behaves like this. If table_cell_a was not being computed before the calls were made to the sub-reports, I could understand.

But if that was the case, how come the report worked when there was only one sub-report? If anyone can provide an explanation, I would be most grateful. Brian.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions