Report parameter not being passed in production?

1 Answer 73 Views
Report Designer (standalone) Report Parameters
Taras
Top achievements
Rank 3
Iron
Iron
Veteran
Taras asked on 02 Feb 2023, 03:15 PM

I have a report that includes a sub-report.  The sub-report is a list of events related to the report.

In standalone designer, when I preview the report, the sub-report's contents relate to the report correctly.  I think that's because the parameter value is set.

In production, running from an application (Asp.Net Core 5) the sub-report shows the events for the parameter set in the designer.  The main report contains the correct information.

Both report and sub-report use the same database connection and the same parameter name.

This seemed to start a few months ago.  Not when the reports were first created/deployed.

Any idea what's happening?

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 07 Feb 2023, 09:06 AM

Hello Taras,

Thank you for the provided information!

By default, the parameter value of the main will not be passed to the subreport, which has to be explicitly set in the SubReport.ReportSource property, please refer to the SubReport - Defining the Parameters article for more details.

For example:

In this case, the Subreport item's report - Dashboard, has a report parameter named ReportYear. The main report also has a report parameter with that name and we use it to pass it down to the Subreport item's report parameters collection. Also, the names of the report parameters do not have to be the same.

I hope the provided information and examples will help, please let me know if you have any further questions.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Taras
Top achievements
Rank 3
Iron
Iron
Veteran
commented on 07 Feb 2023, 03:46 PM

I had this report working correctly previously.  I don't know what I did to delete the parameter.

Thanks

Tags
Report Designer (standalone) Report Parameters
Asked by
Taras
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Dimitar
Telerik team
Share this question
or