Wednesday, March 21, 2012

Nested subreports in a list

When I reference a nested subreport within a list, the subreport fails to
render. The preview page says "Error: Subreport could not be shown", and the
debug output says "An error occurred while executing the subreport
â'subreport2â': Object reference not set to an instance of an object." I have
already spent most of a day on this problem and I'm out of ideas.
I've managed to reduce it to the following simple case:
1) Create a new report called Report1.rdl. Put a text box on it with a
message.
2) Create anothier report called Report2.rdl. Put a subreport on it and
have it reference Report1.
3) Create a third report called Report3.rdl. Create a simple DataSet and a
list that references it. Within the list, add a subreport that references
Report2.
4) Go to the Preview pane for Report3. This is when I see the error.
Any idea on what might be causing this or how I might be able to work around
it?Hello Dave,
This is a known issue and will be fixed in SQL 2005 SP2.
There is a workaround for this issue now:
In "Report2", you could add a List control and bound to a dataset which
have only one record. Then put the subreport for "Report1" in the list
control.
Then in the "Report3", you could add the subreport and put it in to the
list control without any error.
You could refer this thread in the newsgroup which I have replied the same
issue.
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/brow
se_frm/thread/d4a097536e77cb44/c210ed9fe6eb0f75
Hope this will be helpful.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Works for me.
Thanks.
"Wei Lu [MSFT]" wrote:
> Hello Dave,
> This is a known issue and will be fixed in SQL 2005 SP2.
> There is a workaround for this issue now:
> In "Report2", you could add a List control and bound to a dataset which
> have only one record. Then put the subreport for "Report1" in the list
> control.
> Then in the "Report3", you could add the subreport and put it in to the
> list control without any error.
> You could refer this thread in the newsgroup which I have replied the same
> issue.
> http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/brow
> se_frm/thread/d4a097536e77cb44/c210ed9fe6eb0f75
> Hope this will be helpful.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>

No comments:

Post a Comment