SSRS2008 Subreport not found

551 views Asked by At

I have a main report that calls two instances of the same subreport with only a single parameter difference. Both the main report and the subreport can be viewed on the report server and exist in the same folder and use the same datasource and have the same permissions.

The report runs normally when viewed in the visual studio report project, but do not run when deployed.

EDIT: I've discovered the issue lies somewhere in the subreport having 4 or more parameters. After removing the multivalue parameters (down to 3) the report ran correctly. Adding a non-multivalue parameter to the subreport causes the issue to resurface.

I get the following error from the SQL Server logs:

processing!ReportServer_0-1!5884!11/20/2014-13:31:51:: e ERROR: An error has occurred while processing a sub-report. Details: Object reference not set to an instance of an object. Stack trace:
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.IsAllDataShared(SubReport subReport, Boolean canShareDataSets)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.FetchSubReports(Report report, IChunkFactory getReportChunks, ErrorContext errorContext, OnDemandMetadata odpMetadata, CatalogItemContext parentReportContext, OnDemandSubReportCallback subReportCallback, Int32 subReportLevel, Boolean snapshotProcessing, Boolean processWithCachedData, Boolean canShareDataSets, GlobalIDOwnerCollection globalIDOwnerCollection, ParameterInfoCollection parentQueryParameters)
reportrendering!ReportServer_0-1!5884!11/20/2014-13:31:51:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.RenderingObjectModelException: The subreport 'rptCombinedItems' could not be found at the specified location /HVAC_STAGING/subrptQuoteLineItems. Please verify that the subreport has been published and that the name is correct., ;
 Info: Microsoft.ReportingServices.ReportProcessing.RenderingObjectModelException: The subreport 'rptCombinedItems' could not be found at the specified location /HVAC_STAGING/subrptQuoteLineItems. Please verify that the subreport has been published and that the name is correct.
processing!ReportServer_0-1!5884!11/20/2014-13:31:51:: e ERROR: An error has occurred while processing a sub-report. Details: The subreport 'rptCombinedItems' could not be found at the specified location /HVAC_STAGING/subrptQuoteLineItems. Please verify that the subreport has been published and that the name is correct. Stack trace:
   at Microsoft.ReportingServices.OnDemandReportRendering.SubReport.CheckRetrievalStatus(Status status)
   at Microsoft.ReportingServices.OnDemandReportRendering.SubReport.RetrieveSubreport()

As for parameter passing, the main report uses

<Parameters>
  <Parameter Name="OfficeCopy">
     <Value>=Parameters!OfficeCopy.Value</Value>
  </Parameter>
  <Parameter Name="QuoteProfile">
     <Value>=Parameters!QuoteProfile.Value</Value>
  </Parameter>
  <Parameter Name="isBreakout">
     <Value>=NOT(Parameters!ShowTotal.Value)</Value>
  </Parameter>
  <Parameter Name="quoteIDs">
     <Value>=Parameters!quoteIDs.Value</Value>
  </Parameter>
  <Parameter Name="printOptions">
     <Value>=Parameters!printOptions.Value</Value>
  </Parameter>

And the subreport takes:

  <ReportParameters>
    <ReportParameter Name="OfficeCopy">
      <DataType>Boolean</DataType>
      <Prompt>OfficeCopy</Prompt>
    </ReportParameter>
    <ReportParameter Name="QuoteProfile">
      <DataType>Integer</DataType>
      <Prompt>QuoteProfile</Prompt>
    </ReportParameter>
    <ReportParameter Name="isBreakout">
      <DataType>Boolean</DataType>
      <Prompt>isBreakout</Prompt>
    </ReportParameter>
    <ReportParameter Name="quoteIDs">
      <DataType>Integer</DataType>
      <Prompt>quoteIDs</Prompt>
      <MultiValue>true</MultiValue>
    </ReportParameter>
    <ReportParameter Name="printOptions">
      <DataType>Integer</DataType>
      <Prompt>printOptions</Prompt>
      <MultiValue>true</MultiValue>
    </ReportParameter>
  </ReportParameters>

Finally, this is being called by Report Viewer 9.0.0.0 in a .NET 4.5.2 application, and the report server is running 10.0.5520.0. The server is running Server 2008.

0

There are 0 answers