Home > Mobile >  How to create a RDLC report in c# winform application using values from program
How to create a RDLC report in c# winform application using values from program

Time:09-17

Hi I am new to C# WinForms application. I want to design a RDLC report with a table in it the problem is that I want to populate the data using parameters(values given through program) but I can not create a table without using database.

CodePudding user response:

You can create parameters in your rdlc report and set them as below

Microsoft.Reporting.WinForms.ReportParameter[] parameter = new Microsoft.Reporting.WinForms.ReportParameter[]
                   {
                new Microsoft.Reporting.WinForms.ReportParameter("parameter1", param1),
                new Microsoft.Reporting.WinForms.ReportParameter("parameter2", param2)
                   };
                this.yourReportViewer.LocalReport.SetParameters(parameter);
  • Related