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

View report on window load

Good morning.
I'm having problems that i can't get over with the ReportViewer for WPF.
I created a report for which i need to set the values ​​of some parameters and that i have to display when the window opens without the need of user interaction.
I set the parameters in the following way:
  • Load the report by setting the ReportPath on the control
  • Obtain the parameters using the GetParameters method (When closing the window i create a file with the name of the parameter and value set by the user to be able to reopen the report with the last values ​​set)
  • Create a new parameter list with the desired values (including a hidden parameter set directly without the possibility of user modification)
  • Pass the list using the SetParameters method
  • Call the RefreshReport method
With this procedure the report is loaded correctly but to view it the user must press the "View Report" button.
I looked for a way to immediately show the report without having to press the button and the only way i could find was to call the RefreshReport method twice in a row but doing so the report is displayed correctly only a few times, often it is displayed wrong or it is not displayed at all with exceptions loading it.
If the report is displayed by pressing the button without the consecutive calls of the method it is always displayed correctly but i need to show it directly without user interaction, is there a way to get the desired behavior?

1 Reply

VS Vinoth Srinivasan Syncfusion Team April 24, 2019 09:54 AM UTC

Hi Fabio, 
Thanks for your interest in Syncfusion Components. 
We have validated your reported scenario and we suspect that the problem occurs when you are specifying value for the parameter before report has been loaded. So, we suggest you set parameters in “ReportLoaded” event. We have prepared a simple report viewer sample based on your requirement and it can be downloaded from the below location. 
If you still face problem, then please modify the above the sample to reproduce the problem at our end. It will be helpful for us to provide the solution at the earliest. 
Vinoth S. 

Live Chat Icon For mobile
Up arrow icon