all groups > sql server reporting services > july 2006 >
You're in the

sql server reporting services

group:

dataset in main report and subreport


dataset in main report and subreport InvalidLastName
7/31/2006 9:41:45 AM
sql server reporting services:
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.=20
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?

RE: dataset in main report and subreport weilu NO[at]SPAM online.microsoft.com
8/1/2006 2:17:00 AM
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.)
Re: dataset in main report and subreport InvalidLastName
8/1/2006 7:06:24 PM
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




[quoted text, click to view]
=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=

[quoted text, click to view]
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#no=
tif
[quoted text, click to view]
=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=

[quoted text, click to view]
Re: dataset in main report and subreport weilu NO[at]SPAM online.microsoft.com
8/2/2006 6:23:02 AM
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.)
Re: dataset in main report and subreport InvalidLastName
8/7/2006 9:54:58 AM
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,=20
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




[quoted text, click to view]
=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=

[quoted text, click to view]
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#no=
tif
[quoted text, click to view]
=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=

[quoted text, click to view]
AddThis Social Bookmark Button