We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon
Starting in 2019, the Reporting control is no longer included in Essential Studio. If you're experiencing issues with the Syncfusion Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion and appreciate your understanding.

Unable to set parameters with SetParamters method

Hello,

We're using Syncfusion 14.4.0.20 and a fresh UWP application which we started just to test out the SfReportViewer control following the steps indicated on the UWP documentation.
And we're trying to set parameters to a basic RDLC report which contains just one paramter and four fields as dummy. It has no Datasets or Data sources at all and everything is done programatically, except the control which is done via XAML.

We are not sure why on UWP the SetParameters or GetParameters methods breaks with the following output: Object reference not set to an instance of an object.
As we've created a simple List with a ReportParameter type and then tried to use SetParameters to pass the only parameter which we defined. Or when doing GetParameters it should return one parameter ClientField which we created on the RDLC.

As last step we also tried creating the same application on a WPF project doing exactly the same steps and almost exactly the same code and everything worked perfectly fine.
We would like to use RDLC reports on UWP.

One last problem which we found on UWP was while trying to use the ReportPath property instead of LoadReport, the SfReportViewer control seems to get stuck on an infinite loading loop while on WPF it works.

I've attached a rar containing both sample projects (UWP and WPF) so you can check it out and maybe see the misake which we made. Or maybe we could get a sample on UWP using RDLC reports.

Have a nice day.

Attachment: SyncfusionReports_89b6097b.rar

3 Replies

VS Vinoth Srinivasan Syncfusion Team February 3, 2017 10:50 AM UTC

Hi Alexandru, 
 
Thanks for contacting Syncfusion support. 
 
Query 
Response 
We are not sure why on UWP the SetParameters or GetParameters methods breaks with the following output: Object reference not set to an instance of an object. 
The report processing gets completed in WPF when report path value is given and ReportModel and parsing is done, so you can set parameter in WPF after reportpath property. But, UWP runs in asynchronous process, so models and parsing are done asynchronously due to this we need to set parameters in the “ReportLoaded” event of the SfReportViewer. We have modified your sample based on this and it can be downloaded from the below location. 
One last problem which we found on UWP was while trying to use the ReportPath property instead of LoadReport, the SfReportViewer control seems to get stuck on an infinite loading loop while on WPF it works. 
In UWP we cannot directly access the physical drive path, so we have used stream of reports embedded to the application. You can create WebApi service to load report using report path in our control. Please refer our UWP reportviewer UG documentation for loading report using service. 
 
Regards, 
Vinoth S. 



AP Alexandru Pastor Opris February 3, 2017 01:01 PM UTC

Hi Vinoth,

Thanks a lot for the answer and the updated sample, tried it and worked perfectly without any issue.

Have a nice day,
Alex.


VS Vinoth Srinivasan Syncfusion Team February 6, 2017 07:14 AM UTC

Hi Alexandru, 
 
Thanks for your update. Please let us know if you require any further assistance on this. 
 
Regards, 
Vinoth S. 


Loader.
Live Chat Icon For mobile
Up arrow icon