c# - Custom Data Source in RDLC file -


i created 1 rdlc file in use datatable reportdatasource want use custom classinsted of data table please provird suggestion

 reportdatasource reportdatasource = new reportdatasource();       reportdatasource.name = "dataset1"; // name of dataset set in .rdlc              reportdatasource.value = dt;// datatable               reportviewer.localreport.reportpath = // path of rdlc file 

you can add new report / report wizard project , when adding data set in data source configuration wizard select object , follow wizard , select data model , create report.

then put report viewer on form , smart tag windows (click little arrow @ top right of report viewer) choose report, see bindingsource add form, binding source used data source of report.

to pass data report, in load event of form can pass list<datamodel> binding source , call this.reportviewer1.refreshreport();

for more information can take at: walkthrough: using business object data source reportviewer windows forms control in local processing mode


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -