Hi,
I'm trying to add reports to a report book and display the report book in a MVC project, but I haven't found a way to do it so far.
Here is the code behind sample
public ActionResult ReportBook()
{
ReportBook reportBook = new ReportBook();
reportBook.Reports.Add(new TelerikReporting.MissionPlanning());
Report report = new Report();
report.DataSource = new UriReportSource() { Uri = "TelerikReporting.AgencyList, TelerikReporting" };
reportBook.Reports.Add(report);
InstanceReportSource instanceReportSource = new InstanceReportSource();
instanceReportSource.ReportDocument = reportBook;
return View("ReportBook", instanceReportSource);
}
and the view code
@model Telerik.Reporting.InstanceReportSource
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.ServiceUrl("/api/reports/")
.TemplateUrl("/Reports/templates/telerikReportViewerTemplate-9.1.15.624.html")
.ViewMode(ViewMode.Interactive)
.ScaleMode(ScaleMode.Specific)
.Scale(1.0)
.PersistSession(false)
.ReportSource(Model)
)
This results in an empty report with a "No Report" message. I don't see what I'm doing wrong, it looks like the few samples I've found.
I've managed to display a single report by using a TypeReportSource instead of an InstanceReportSource, but that's not what I need...