Error processing subreports | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Error processing subreports

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
Probably you sub report may expect some values.
Check you sub report data sets. Set some default values for them

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

]]>