How do I programatically create reports via the API?
It is possible to create reports via the API if needed.
//initialize a new report set which will contain the report
ReportSet rs = new ReportSet();
//add tables
JoinedTable jt = new JoinedTable();
jt.TableName = "[dbo].[Orders]";
rs.JoinedTables.Add(jt);
//add fields
Field f = new Field("[dbo].[Orders].[ShipCountry]", "Ship Country");
rs.Detail.Fields.Add(f);
//add filters
Filter filter = new Filter();
filter.Column = "[dbo].[Orders].[ShipCountry]";
filter.Operator = OperatorTypes.BeginsWith;
filter.Value = "U";
rs.Detail.Filters.Add(filter);