C#/WPF exporting report with parameters

0 Answers 23 Views
.NET Core Programming Rendering Report Parameters
Aaron
Top achievements
Rank 1
Aaron asked on 03 May 2022, 05:58 PM

Hello,

I'm new to Telerik Reporting and hope you can point me in the right direction.

I'm working on a WPF application that will need to export a report to PDF. The user does not need to see the report directly prior to it being exported.

 

Currently I have a report file saved as a .trdp file, which I am able to export to PDF based of of existing examples.

Additionally, I've been able to add data to the report prior to printing successfully. I'm simply wondering if what I'm doing is the best way to accomplish my results.

 

I currently create a new UriReportSource and set the Uri to the local trdp file.

I think add parameters, one at a time to the reportSource...

reportSource.Parameters.Add(new Telerik.Reporting.Parameter("LogDate", "5/3/2022"));

 

Once the parameters have been added I use a report processor to render the report.

While this appears to work perfectly fine, I'm wondering if there's a more efficient method, such as passing a JSON string to a report.

If not that's fine and I'll make this work.

 

Any insight is appreciated.

 

Neli
Telerik team
commented on 06 May 2022, 10:07 AM

Hi Aaron,

You have selected the correct approach. More details can be found in the Embedded Report Engine article.

No answers yet. Maybe you can help?

Tags
.NET Core Programming Rendering Report Parameters
Asked by
Aaron
Top achievements
Rank 1
Share this question
or