SQL Server Performance

Error processing subreports

Discussion in 'SQL Server 2005 Reporting Services' started by bijesh, Jun 8, 2007.

  1. bijesh New Member

    Hi All,

    I have a problem processing subreport. Here is the situation. I have two reports 1) Report1.Rdl, 2)Report2.Rdl.
    Report1.Rdl acts as the main report and includes Report2.Rdl as a subreport inside.
    Both of these reports query SQL Database and fetches data. Report2.Rdl receives parameters passed from report1.rdl.
    The error I am getting is whenever there are situations where there are no records for the parameters passed to report.rdl, the placeholder inside report1.rdl displays "Error : Subreport could not be displayed". But there is no error when report2.rdl is run separately with same parameters passed.
    This error occurs in the BI report designer environment as well.

    Any of your help will be appreciated.
    Thanks,
    Bijesh
  2. dineshasanka Moderator

    Probably you sub report may expect some values.
    Check you sub report data sets. Set some default values for them
  3. Adriaan New Member

    Not sure how this works in other environments, but for example in Access you have to force the order in which subform are loaded, to avoid this type of problem. For example when subform 1's recordsource refers to a control on subform 2, you have to keep the subform controls unbound, and then in in the main form's current event, run code to insert subform 2 into its control, before inserting subform 1.
  4. satya Moderator

    Say if the ReportViewer could not find the relevant .RDLC file as you are calling that sub-report that expects another parameter that is required in that report calling method. To supply data to the subreport you have to handle the SubreportProcessing event.

Share This Page