Wednesday, March 21, 2012

dataset in main report and subreport

This is a multi-part message in MIME format.
--=_NextPart_000_0009_01C6B485.898E4410
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
We have a main report that calls a subreport. The subreport is being = passed the appropriate parameters.
The subreport works correctly in isolation in the preview mode. However, = when it is called
in a main report it stops working. I get the message
"Error: Subreport could not be shown."
The main report is NOT using a shared dataset, but subreport is. Initially the main report was using a shared dataset and the subreport = was working correctly.
However, since we need to create report columns on the fly (for ad-hoc = reports) so we have to generate the RDL at run-time and use = ReportExecutionService.LoadReportDefinition method to load RDLto report = server. This method requires RDL to use private data source/dataset.
Am I required to do some kind of special handling for these kind of = subreports?
Thanks
--=_NextPart_000_0009_01C6B485.898E4410
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi,
We have a main report that calls a subreport. The subreport is = being passed the appropriate parameters.The subreport works correctly in = isolation in the preview mode. However, when it is calledin a main report it stops = working. I get the message"Error: Subreport could not be shown."The main = report is NOT using a shared dataset, but subreport is. Initially the main = report was using a shared dataset and the subreport was working correctly.

However, since we need to create report columns on the fly (for = ad-hoc reports) so we have to generate the RDL at run-time and use ReportExecutionService.LoadReportDefinition method to load RDLto report = server. This method requires RDL to use private data source/dataset.
Am I required to do some kind of special handling for these = kind of subreports?

Thanks
</FONT></FONT>
--=_NextPart_000_0009_01C6B485.898E4410--Hi spamme,
Thank you for using MSDN Managed Newsgroup Support.
From your description, my understanding of this issue is: You could not see
your subreport and you get the error "Error: Subreport could not be
shown.". If I misunderstood your concern, please feel free to let me know.
I would like to get the Report Error log file to troubleshot this issue. By
default, the log file is located at \Microsoft SQL Server\<SQL Server
Instance>\Reporting Services\LogFiles.
Please post the error in the log file so that I could provide further
assistance.
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.)|||This is a multi-part message in MIME format.
--=_NextPart_000_0007_01C6B59D.95D1DED0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Wei,
Here are the errors from report server log file: (the two always came =together)
We changed to have both main report and subreport use private data =sources, but we were still getting same error.
w3wp!webserver!1!08/01/2006-16:46:18:: i INFO: Processed report. =Report=3D'/', Stream=3D''
w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to CreateDataSource( ='MyReport', '/Data Sources', dataSourceDefinition )
w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to CreateReport( ='BudgetAdHoc', '/EventReports', def)
w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to =SetReportDefinition( '/EventReports/BudgetAdHoc', def )
w3wp!library!1!08/01/2006-16:49:39:: e ERROR: Throwing =Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found., ;
Info: =Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found.
w3wp!processing!1!08/01/2006-16:49:39:: e ERROR: An error has occurred =while retrieving datasources for a sub-report. Details: The item ='/GenericSubreportEventDetails' cannot be found. Stack trace:
at =Microsoft.ReportingServices.Library.RSService.GetCompiledDefinition(Strin=g originalItemPath, String itemPath, ItemType& type, ReportSnapshot& =compiledDefinition, Guid& executionSnapshotID, String& properties, =String& description, Byte[]& secDesc, Guid& reportID, Int32& =execOptions)
at =Microsoft.ReportingServices.Library.RSService.ProcessingGetDataSources(Ca=talogItemContext reportContext, String subreportPath, =CatalogItemContext& subreportContext, GetReportChunk& =getCompiledDefinition, DataSourceInfoCollection& dataSources)
at =Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CheckCreden=tials(Report report, DataSourceInfoCollection dataSources, =CatalogItemContext reportContext, SubReportDataSourcesCallback =subReportCallback, RuntimeDataSourceInfoCollection allDataSources, Int32 =subReportLevel, Boolean checkIfUsable, ServerDataSourceSettings =serverDatasourceSettings)
w3wp!library!1!08/01/2006-16:49:41:: i INFO: Call to RenderFirst( '' )
w3wp!library!1!8/1/2006-16:49:41:: e ERROR: Throwing =Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found., ;
Info: =Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found.
w3wp!processing!1!8/1/2006-16:49:41:: e ERROR: An error has occurred =while processing a sub-report. Details: The item ='/GenericSubreportEventDetails' cannot be found. Stack trace:
at =Microsoft.ReportingServices.Library.RSService.ProcessingGetSubreport(Cata=logItemContext reportContext, String subreportPath, CatalogItemContext& =subreportContext, String& description, GetReportChunk& =getCompiledDefinition, ParameterInfoCollection& parameters)
at =Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICo=llection.RetrieveSubReport(SubReport subReport, ProcessingContext =processingContext, ProcessingErrorContext subReportErrorContext, Boolean =isProcessingPrefetch)
It is important to know that we use LoadReportDefinition to load RDL for =this kind of ad-hoc report (columns were created on the fly based on =user's selections). If I understand correctly, the LoadReportDefinition =method requires RDL use private data source. I believe the second error =(ItemNotFoundException) was actually caused by the first error (failed =to create the subreport item due to the error while retrieving data =sources).
Since the main report and sub report both use private data source, I =only see one data source was created from report server log. I expect to =see two data sources created, one for main report and one for sub =report. Can this be the reason, or something to do with data source =credential ?
Thanks
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message =news:ktCgbCRtGHA.2500@.TK2MSFTNGXA01.phx.gbl...
> Hi spamme,
> > Thank you for using MSDN Managed Newsgroup Support.
> > From your description, my understanding of this issue is: You could =not see > your subreport and you get the error "Error: Subreport could not be > shown.". If I misunderstood your concern, please feel free to let me =know.
> > I would like to get the Report Error log file to troubleshot this =issue. By > default, the log file is located at \Microsoft SQL Server\<SQL Server > Instance>\Reporting Services\LogFiles. > > Please post the error in the log file so that I could provide further > assistance.
> > Sincerely,
> > Wei Lu
> > Microsoft Online Community Support
> > ==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> > Get notification to my posts through email? Please refer to > =http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#no=
tif
> 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.
> > ==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> (This posting is provided "AS IS", with no warranties, and confers no > rights.)
>
--=_NextPart_000_0007_01C6B59D.95D1DED0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Hi Wei,
Here are the errors from report server =log file: (the two always came together)
We changed to have both main report and =subreport use private data sources, but we were still getting same =error.
w3wp!webserver!1!08/01/2006-16:46:18:: i INFO: Processed =report. Report=3D'/', Stream=3D''w3wp!library!1!08/01/2006-16:49:36:: i =INFO: Call to CreateDataSource( 'MyReport', '/Data Sources', dataSourceDefinition )w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to CreateReport( 'BudgetAdHoc', '/EventReports', =def)w3wp!library!1!08/01/2006-16:49:36:: i INFO: Call to SetReportDefinition( '/EventReports/BudgetAdHoc', def )w3wp!library!1!08/01/2006-16:49:39:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found.w3wp!processing!1!08/01/2006-16:49:39:: e ERROR: An error has =occurred while retrieving datasources for a sub-report. Details: The item '/GenericSubreportEventDetails' cannot be found. Stack =trace: at Microsoft.ReportingServices.Library.RSService.GetCompiledDefinition(Strin=g originalItemPath, String itemPath, ItemType& type, =ReportSnapshot& compiledDefinition, Guid& executionSnapshotID, String& =properties, String& description, Byte[]& secDesc, Guid& reportID, =Int32& execOptions) at Microsoft.ReportingServices.Library.RSService.ProcessingGetDataSources(Ca=talogItemContext reportContext, String subreportPath, CatalogItemContext& =subreportContext, GetReportChunk& getCompiledDefinition, DataSourceInfoCollection& =dataSources) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CheckCreden=tials(Report report, DataSourceInfoCollection dataSources, CatalogItemContext =reportContext, SubReportDataSourcesCallback subReportCallback, =RuntimeDataSourceInfoCollection allDataSources, Int32 subReportLevel, Boolean checkIfUsable, ServerDataSourceSettings serverDatasourceSettings)w3wp!library!1!08/01/2006-16:49:41:: i =INFO: Call to RenderFirst( '' )w3wp!library!1!8/1/2006-16:49:41:: e ERROR: =Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found., ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.ItemNotFoundException: =The item '/GenericSubreportEventDetails' cannot be found.w3wp!processing!1!8/1/2006-16:49:41:: e ERROR: An error has =occurred while processing a sub-report. Details: The item ='/GenericSubreportEventDetails' cannot be found. Stack trace: at Microsoft.ReportingServices.Library.RSService.ProcessingGetSubreport(Cata=logItemContext reportContext, String subreportPath, CatalogItemContext& =subreportContext, String& description, GetReportChunk& getCompiledDefinition, ParameterInfoCollection& parameters) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeRICo=llection.RetrieveSubReport(SubReport subReport, ProcessingContext processingContext, ProcessingErrorContext subReportErrorContext, Boolean isProcessingPrefetch)
It is important to know that we use LoadReportDefinition to load RDL for this kind of ad-hoc report (columns =were created on the fly based on user's selections). If I understand =correctly, the LoadReportDefinition method requires RDL use private data source. I =believe the second error (ItemNotFoundException) was actually caused by the =first error (failed to create the subreport item due to the error while =retrieving data sources).
Since the main report and sub report =both use private data source, I only see one data source was created =from report server log. I expect to see two data sources created, one for main =report and one for sub report. Can this be the reason, or something to do with =data source credential ?
Thanks
"Wei Lu [MSFT]" wrote in message news:ktCgbCRtGHA.2500@.TK2MSFTNGXA01.phx.gbl...> =Hi spamme,> > Thank you for using MSDN Managed Newsgroup Support.> > From your description, my understanding of =this issue is: You could not see > your subreport and you get the error ="Error: Subreport could not be > shown.". If I misunderstood your =concern, please feel free to let me know.> > I would like to get =the Report Error log file to troubleshot this issue. By > default, the log =file is located at \Microsoft SQL Server\ =Instance>\Reporting Services\LogFiles. > > Please post the error in the log =file so that I could provide further > assistance.> > Sincerely,> > Wei Lu> > Microsoft Online =Community Support> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=> > Get notification to my posts through email? Please refer to > =http://msdn.microsoft.com/subscriptions/managednewsgroups/defaul=t.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 => .> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=> (This posting is provided "AS IS", with no warranties, and confers no > rights.)>

--=_NextPart_000_0007_01C6B59D.95D1DED0--|||Hi spamme,
Thank you for your response.
Would you please provide some sample code of how you use
LoadReportDefinition to load the RDL file? Is the RDL file in the local
file system?
Also, you may try to test whether other main report with the sub-report you
use have the same issue. Please let me know the result.
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.)|||This is a multi-part message in MIME format.
--=_NextPart_000_0015_01C6BA07.8BE13F10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Wei,
Just want to provide a quick update on this issue. According to BOL =http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingservice=
swebservice.rsexecutionservice2005.reportexecutionservice.loadreportdefin=ition.aspx, Subreports and data source references with relative paths are not =supported using this method. However, absolute paths to catalog items =can be used
As soon as we changed to use absolute path, the problem was resolved
Thanks
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message =news:vzBRjwftGHA.2504@.TK2MSFTNGXA01.phx.gbl...
> Hi spamme,
> > Thank you for your response.
> > Would you please provide some sample code of how you use > LoadReportDefinition to load the RDL file? Is the RDL file in the =local > file system?
> > Also, you may try to test whether other main report with the =sub-report you > use have the same issue. Please let me know the result.
> > Sincerely,
> > Wei Lu
> > Microsoft Online Community Support
> > ==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> > Get notification to my posts through email? Please refer to > =http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#no=
tif
> 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.
> > ==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> (This posting is provided "AS IS", with no warranties, and confers no > rights.)
>
--=_NextPart_000_0015_01C6BA07.8BE13F10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Wei,
Just want to provide a quick update =on this issue. According to BOL http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reporti=ngserviceswebservice.rsexecutionservice2005.reportexecutionservice.loadre=portdefinition.aspx,
Subreports and data source references =with relative paths are not supported using this method. However, absolute =paths to catalog items can be used
As soon as we changed to use absolute =path, the problem was resolved
Thanks
"Wei Lu [MSFT]" wrote in message news:vzBRjwftGHA.2504@.TK2MSFTNGXA01.phx.gbl...> =Hi spamme,> > Thank you for your response.> > =Would you please provide some sample code of how you use > =LoadReportDefinition to load the RDL file? Is the RDL file in the local > file =system?> > Also, you may try to test whether other main report with the =sub-report you > use have the same issue. Please let me know the =result.> > Sincerely,> > Wei Lu> > Microsoft =Online Community Support> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=> > Get notification to my posts through email? Please refer to > =http://msdn.microsoft.com/subscriptions/managednewsgroups/defaul=t.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 => .> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=> (This posting is provided "AS IS", with no warranties, and confers no > rights.)>

--=_NextPart_000_0015_01C6BA07.8BE13F10--