Subreport not calling stored procedure but shows other data

Posted by: dbassion on 2 December 2024, 5:14 pm EST

  • Posted 2 December 2024, 5:14 pm EST

    In ActiveReports 17, I have a report that contains a subreport. Both the report and subreport have a dataset set up to pull data into the report. The main report is pulling data in and displaying it, but the subreport won’t even call the stored procedure that’s set up for the Dataset. I have the parameters in the main report feeding the parameters in the subreport. The layout of the subreport displays (lines, text fields, etc). I’ve verified that the parameters for the stored procedure have data by displaying them on the subreport. I have the data fields that come from the Dataset in the subreport inside of a table so that multiple items will display, but nothing shows up. I’ve adding error tracking to the stored procedure to see if it’s even being called and it’s not. Any ideas what the issue could be?

  • Posted 3 December 2024, 6:53 am EST

    Hi David,

    It looks like you may not have specified the Parameters for your SubReports controls correctly, in your MainReport select the ‘SubReport’ control and open its ‘Parameters’ property dialog box, in the dialog box add the SubReport’s parameter name (Not the StoredProcedure’s parameter name) and bind a field from your main report to the SubReport’s parameter.

    Now in the SubReport’s DataSet add a new DataSet parameter and bind it to the Report parameter then you can use this DataSet parameter in the query like: ‘EXEC StoredProcedureName @DataSetParameterName’.

    Please find attached our sample using the stored procedure in SubReports along with a sample Database file for reference.

    You may also refer to this video demonstrating how we are using Parameters in our SubReport for our stored procedure call.

    Regards,

    Anand

    SubReport.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels