SSRS 2008 R2: Object reference not set to an instance of an object

We have a report in SSRS 2008 which calls multiple sub-reports. One of the sub-reports contains a data region (tablix)  in which one of the column is populated by another sub-report i.e. the sub-report will render for each row of the tablix. This report is working fine in 2008.

As part of migration to SSRS 2008 R2, I opened the report in BIDS 2008 R2 and hit the preview. The report rendered but the tablix column contained error Error:subreport could not be shown for each row.

Hitting The View -> Error List had the error

e ERROR: An error has occurred while processing a sub-report. Details: Object reference not set to an instance of an object.

After spending nearly two days in digging, I came across this KB Article which talks about similar issue in SSRS 2008. Though this is for SSRS 2008, the work-around mentioned in the article fixed the issue.  The solution is to place the main sub-report in a list control mapped to a dummy dataset with one row.

Advertisements

About Suresh Kumar D

Hardcore SQL Developer and aspiring Database Architect.
This entry was posted in SSRS and tagged . Bookmark the permalink.

2 Responses to SSRS 2008 R2: Object reference not set to an instance of an object

  1. Skyler says:

    Hi Suresh,

    I have been struggling to resolve this issue. Please see my thread in MSDN Forums, http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/b756911f-7b08-46db-b03d-d06f3a85077d.

    I have placed the top-level sub report in a list control and mapped it to a dummy data set. It hasn’t worked. Am I doing something wrong?

    • Hi Skyler,

      In my case I had only 3 level of nesting

      Main Report
      Main Sub Report
      Child Sub Report (called from tablix)

      and I had placed the main sub report in a list control i.e. I have placed the sub-report which has atleast one child sub report in a list control.

      In your case, I would suggest the same thing.. try placing all the sub reports , which have atleast one child, in a list control. This is just a suggestion.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s