Showing posts with label preview. Show all posts
Showing posts with label preview. Show all posts

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.)
>

Monday, March 19, 2012

Nested Lists and Printing

Is there something I need to do to get Nested Lists to print correctly?
When I preview the report, it displays correctly, grouped by Year,
Resource and Part. Yet when I print it or even print preview it,
instead of printing on one page:
Year 2005
Resource A
Part 1
Part 2
Part 3
Resource B
Part 4
Part 5
It prints two pages:
Year 2005
Resource A
Resource B
as page one and:
Part 1
Part 2
Part 3
Part 4
Part 5
as page two.
If I place page one over page two and hold it up to the light, the
formatting and grouping is correct!
I'm using SQL Server 2000 Reporting Services and Visual Studio.NET 2003.Looks to me like you have a page break on the group... Edit the group and
ensure that page break before and after group is NOT selected.
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"josef@.wainz.net" wrote:
> Is there something I need to do to get Nested Lists to print correctly?
> When I preview the report, it displays correctly, grouped by Year,
> Resource and Part. Yet when I print it or even print preview it,
> instead of printing on one page:
> Year 2005
> Resource A
> Part 1
> Part 2
> Part 3
> Resource B
> Part 4
> Part 5
> It prints two pages:
> Year 2005
> Resource A
>
>
> Resource B
>
> as page one and:
> Part 1
> Part 2
> Part 3
>
> Part 4
> Part 5
> as page two.
> If I place page one over page two and hold it up to the light, the
> formatting and grouping is correct!
> I'm using SQL Server 2000 Reporting Services and Visual Studio.NET 2003.
>|||Thanks for the suggestions Wayne, but that was one of the first things
I looked at.
I had to address the objects and their relationships.
This heirarchy works:
ReportHeader[Rectangle]
lstYear[List] (Grouping on Year)(Shows "Year 2005", "Year 2006" ...)
lstResource[List] (Grouping on Resource)
GroupHeader0[Rectangle] (Shows "Resource A", "Resource B" ...)
Detail[List] (Displaying "Part 1", "Part 2" ...)
There is still an issue concerning blank pages between filled pages,
but the odd grouping is resolved.|||After all the above work with objects and nesting, it may in fact be
related to page size and margins. The problem occurred again, but I
went through and adjusted page and object sizes and margins, making
sure everything fit inside of 8.5 inches and voila the problem went
away.