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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

View report on window load

Thread ID:

Created:

Updated:

Platform:

Replies:

144167 Apr 23,2019 09:47 AM UTC Apr 24,2019 09:54 AM UTC WPF 1
loading
Tags: ReportViewer
Fabio
Asked On April 23, 2019 09:47 AM UTC

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?
Thanks

Vinoth Srinivasan [Syncfusion]
Replied On 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. 
 
Regards, 
Vinoth S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon