Dynamically Creating Reports Via the API

Expand / Collapse
 

Dynamically Creating Reports Via the API


This code sample allows a user to create reports in XML outside of the Report Designer and dynamically pass the reports via the ReportSet RS redirect to the Report Viewer.


ReportSet rs = new ReportSet();
JoinedTable jt = new JoinedTable();
jt.TableName = "[dbo].[Orders]";
rs.JoinedTables.Add(jt);

Field f = new Field("[dbo].[Orders].[ShipCountry]", "Ship Country");

rs.Detail.Fields.Add(f);

Izenda.AdHoc.AdHocContext.CurrentReportSet = rs;



Details
Type: How-To
Options