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.

Need to add Report parameters to my report for filtering the data

Hi, I am working on integration of ReportViewer using angularjs module. After a lot of struggle i made it working with my code. But now i want to integrate filter parameters in the report using report parameters so that i could filter the report. I tried adding parameters in client end as well as in web api. Please let me know the solution for the same. I have attached a screenshot what i want in my report.

Attachment: Capture_52d5aaaf.zip

1 Reply

YD Yuvaraj Devarajan Syncfusion Team June 2, 2016 11:31 AM UTC

Hi Hougth, 
Thanks for contacting Syncfusion support. 
We can set the parameter values to report through ReportViewerOptions in WebAPI side. The ReportViewer has parameter property that is the list of report parameter type to add collection of report parameter to it in server side (WebAPI) and also in client side (JS) as shown in below code example.   

public void OnInitReportOptions(ReportViewerOptions reportOption) 
            List<ReportParameter> parameters = new List<ReportParameter>(); 
            parameters.Add(new ReportParameter() { Name = "SalesYearParameter", Labels = new List<string>() { "2003" }, Values = new List<string>() { "2003" } }); 
            reportOption.ReportModel.Parameters = parameters; 
<script type="text/javascript"> 
        angular.module('syncApp', ['ejangular']).controller('ReportController', function ($scope) { 
            $scope.report = true; 
            $scope.samplevalue = 'http://' + window.location.host + '/api/ReportApi'; 
            $scope.path = '~/Report/Sales Dashboard.rdl'; 
            $scope.mode = ej.ReportViewer.ProcessingMode.Remote; 
            $scope.parameters = [{ 
                name: 'SalesYearParameter', 
                labels: ['2003'], 
                values: [2003] 
We have prepared the sample and it can be downloaded from below location, 

Please refer the below UG documentation for more information, 

Yuvaraj D 

Live Chat Icon For mobile
Up arrow icon