Izenda Logo


This code sample allows a user to create reports using API calls. Any tables added to the JoinedTables list must be in the current user's VisibleDataSources before the CurrentReportSet is processed. You can do this in InitializeReporting. When a report is created this way, a call to the Report Viewer page will allow the user to view the report. Alternately, you can redirect to rs.aspx using the output query string parameter and create fully formed PDFs and Excel-formatted reports with the click of a button.

C♯ Sample

ReportSet rs = new ReportSet();
rs.ReportName = "Generated Report";

JoinedTable jt = new JoinedTable();
jt.TableName = "[dbo].[Orders]";

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


Izenda.AdHoc.AdHocContext.CurrentReportSet = rs;

VB.NET Sample

Dim rs As New ReportSet()
rs.ReportName = "Generated Report"

Dim jt As New JoinedTable()
jt.TableName = "[dbo].[Orders]"

Dim f As New Field("[dbo].[Orders].[ShipCountry]", "Ship Country")


Izenda.AdHoc.AdHocContext.CurrentReportSet = rs