Hello,
I'm designing an application that will produce a number of different reports. There are three pages for each report and a number of different possible configurations for each page. There are also completely custom configurations for two of the pages. I'm storing the name of each custom report in a database and have been able to initialize and display a single report.
var typeSource = new TypeReportSource();
typeSource.TypeName = string.Format("Application.ReportLibrary.Custom.{0}, Application.ReportLibrary", myDataObject.CustomReportName);
typeSource.Parameters.Add("id", _id);
this.rvMainView.ReportSource = typeSource;
...
...
I've also been able to display multiple pages of the standard templates by using a reportbook:
var rbBookSource = new ReportBook();
var pageOne = new ReportPageOneType();
pageOne.Parameters.Clear();
pageOne.Parameters.Add("id", ReportParameterType.Integer, _id);
rbBookSource.Reports.Add(pageOne);
var pageTwo = new ReportPageTwoType();
pageTwo.Parameters.Clear();
pageTwo.Parameters.Add("id", ReportParameterType.Integer, _id);
rbBookSource.Reports.Add(pageOne);
this.rvMainView.ReportSource = rbBookSource;
...
What I cannot figure out how to do is to merge/combine these two pieces of functionality:
var rbTypeBook = new ReportBook();
var p1TypeSource = new TypeReportSource();
p1TypeSource.TypeName = string.Format("Application.ReportLibrary.Custom.{0}, Application.ReportLibrary", myDataObject.CustomReportPageOneName);
p1TypeSource.Parameters.Add("id", _id);
rbTypeBook.Reports.Add(p1TypeSource);
var p2TypeSource = new TypeReportSource();
p2TypeSource.TypeName = string.Format("Application.ReportLibrary.Custom.{0}, Application.ReportLibrary", myDataObject.CustomReportPageTwoName);
p2TypeSource.Parameters.Add("id", _id);
rbTypeBook.Reports.Add(p2TypeSource);
this.rvMainView.ReportSource = rbBookSource;
...
Is this possible in any way?
Thanks.
I'm designing an application that will produce a number of different reports. There are three pages for each report and a number of different possible configurations for each page. There are also completely custom configurations for two of the pages. I'm storing the name of each custom report in a database and have been able to initialize and display a single report.
var typeSource = new TypeReportSource();
typeSource.TypeName = string.Format("Application.ReportLibrary.Custom.{0}, Application.ReportLibrary", myDataObject.CustomReportName);
typeSource.Parameters.Add("id", _id);
this.rvMainView.ReportSource = typeSource;
...
...
I've also been able to display multiple pages of the standard templates by using a reportbook:
var rbBookSource = new ReportBook();
var pageOne = new ReportPageOneType();
pageOne.Parameters.Clear();
pageOne.Parameters.Add("id", ReportParameterType.Integer, _id);
rbBookSource.Reports.Add(pageOne);
var pageTwo = new ReportPageTwoType();
pageTwo.Parameters.Clear();
pageTwo.Parameters.Add("id", ReportParameterType.Integer, _id);
rbBookSource.Reports.Add(pageOne);
this.rvMainView.ReportSource = rbBookSource;
...
What I cannot figure out how to do is to merge/combine these two pieces of functionality:
var rbTypeBook = new ReportBook();
var p1TypeSource = new TypeReportSource();
p1TypeSource.TypeName = string.Format("Application.ReportLibrary.Custom.{0}, Application.ReportLibrary", myDataObject.CustomReportPageOneName);
p1TypeSource.Parameters.Add("id", _id);
rbTypeBook.Reports.Add(p1TypeSource);
var p2TypeSource = new TypeReportSource();
p2TypeSource.TypeName = string.Format("Application.ReportLibrary.Custom.{0}, Application.ReportLibrary", myDataObject.CustomReportPageTwoName);
p2TypeSource.Parameters.Add("id", _id);
rbTypeBook.Reports.Add(p2TypeSource);
this.rvMainView.ReportSource = rbBookSource;
...
Is this possible in any way?
Thanks.