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

Parameter values are not shown for SSRS rdl report viewed in ReportViewer

Am new to ReportViewer and trying to render a rdl in reportviewer to analyize if we want to go ahead with the product.

Am using SSRS rdl report with parameter values got from a query, which when ran on report builder works fine but when the report is viewed in ReportViewer the parameter doesn't show any values and is greyedout, Do I need to define in code the values for the parameter which already exists in the report? If so how do I do that?

I would rather show reports from SSRS report server but would like to see how this works as well. For this I opened anotehr thread.

Thank you.
Dheeraj

1 Reply

MS Mahendran Shanmugam Syncfusion Team March 14, 2019 04:03 AM

Hi Dheeraj, 

We can pass the parameter using the “report-loaded” event in ASP.NET Core application as shown in below code snippet. 
Index.cshtml 
<div style=" align-items:center; height:525px;width: 100%;"> 
    <ej-report-viewer id="reportviewer1" report-service-url="../Home" report-loaded="onReportLoaded" report-path="/ReportsTemplate/Sales Order Detail.rdl" processing-mode="Remote" /> 
</div> 
 
<script type="text/javascript"> 
 
    function onReportLoaded(sender) { 
        var reportObj = $('#reportviewer1').data("ejReportViewer"); 
        reportObj.model.parameters = [{ 
            name: 'SalesOrderNumber', 
            labels: ['SO50752'], 
            values: ['SO50752'], 
            nullable: false 
        }]; 
    } 
 
</script> 

We have prepared the simple sample for your reference and it can be downloaded from below location. 

Please let us know if you need any clarification. 

Regards, 
Mahendran S. 


Loader.
Live Chat Icon For mobile
Up arrow icon