If you became a customer of the Syncfusion� Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion� Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion�.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion� for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion� for your reporting needs.

Saving report parameters for users

Hi,

I have the Report Viewer embedded in an MVC application.
Now I wonder if there is any way for me to save the report parameters a user selects, so that, when he opens the report page the next time, the parameters are already preset.

Regards,

Manuel Schneider

1 Reply

YD Yuvaraj Devarajan Syncfusion Team February 6, 2018 02:51 PM UTC

Hi Manuel, 

Thanks for contacting Syncfusion support. 

We can get the parameter value specified in the report using “_viewReportParamsClick” prototype method, then store the value in the session storage and set the default value when loading again the specific report in ReportViewer as shown in below code example, 

<script> 
            ej.ReportViewer.prototype._viewReportParamsClick = function (event) { 
                var proxy = $('#reportViewer').data('ejReportViewer');                
                proxy._showloadingIndicator(true); 
                
                var parameters = event.data.params; 
                var reportParams = proxy._getParameterJson(parameters, true); 
                if (reportParams) { 
                    sessionStorage.setItem(reportParams[0].Name, reportParams[0].Values[0]); 
                    proxy._viewReportEnableDisable(true); 
                    proxy._refresh = true; 
                    $('#' + proxy._id + '_viewBlockContainer .e-reportviewer-viewerblockcontent table:first').attr('data-isviewclick', 'true'); 
                    proxy._onViewReportClick(reportParams); 
                    proxy.doAjaxPost("POST", proxy._actionUrl, JSON.stringify({ 'reportAction': proxy._reportAction.setParameters, 'parameters': reportParams }), "_setParameters"); 
                } 
                else { 
                    proxy._showloadingIndicator(false); 
                } 
            } 
 
        </script>        
     
We have prepared a sample to get the values specified in the Report and it can be downloaded from below location, 

Please refer to the below UG documentation to specify the default value for the Report 

Regards, 
Yuvaraj D. 


Loader.
Up arrow icon