Hi Guys,
I read you help topic https://help.infragistics.com/doc/reporting/2013.2/CLR4.0 but I has absolutely no help in it!
1. I need to know how I bind a datatable at runtime to the reports datasource? I firstly want to specify which reprt to laod, and then massage the data that needs to go to that report.
Infragistics.Win.UltraWinReportViewer.ClientRenderSettings clientRenderSettings1 = new Infragistics.Win.UltraWinReportViewer.ClientRenderSettings();
clientRenderSettings1.DefinitionUri = new System.Uri("/SpyOps;component/Reports/TechTaskForAC.igr", System.UriKind.Relative);
this.ultraReportViewer1.RenderSettings = clientRenderSettings1;
//What happens next?
Maybe I should explain myself better:
What I am trying to do is Load a report into the ultrareportViewer1 dynamically, and then set the datasours eto a table that is a query from SQL.
Regds
Hello,
In what event or process are you updating the report to include the extra table? To properly assist you can you please provide an isolated sample so that I can take a look?
HI Dave, I am trying this approach and it is stil using the original data from the original table. Not the newly created Datatable's data:
Infragistics.Win.UltraWinReportViewer.DataSource ds = new Infragistics.Win.UltraWinReportViewer.DataSource();
ds.ItemsSource = dtRpt;
ds.TargetDataSource = ReportToShow;
Infragistics.Win.UltraWinReportViewer.ClientRenderSettings clientRenderSettings2 = new Infragistics.Win.UltraWinReportViewer.ClientRenderSettings();
clientRenderSettings2.DefinitionUri = new System.Uri("/SpyOps;component/Reports/TechTaskForAC.igr", System.UriKind.Relative);
clientRenderSettings2.DataSources.Add(ds);
this.ultraReportViewer1.RenderSettings = clientRenderSettings2;
this.reportViewer1.RefreshReport();
Any thoughts please?
Thank you sir!!!!!!!!!!!!!!!!!!
You guys are FANTASTIC with your promptness!
Hello Paul,
Thank you for contacting Infragistics.
In order to be able to bind your report to data at run-time, you need to have the ReportViewer configured to use client-side rendering.
https://ko.infragistics.com/support/retired-products
Once the ReportViewer is configured as such, you will need to create an object of type DataSource and set its ItemsSource property to the DataTable. Next, add the DataSource object to the DataSources collection property of the ReportViewer's RenderSettings property. You will need to cast the property to ClientRenderSettings in order to do so.