Can someone provide a demo with using the asp.net Webform viewer? I realize this is a legacy control but I wanted to try this one first before tackling the HTML 5 viewer.
I have created a simple Crosstab report with nothing but a crosstab object and a textbox title. I have assigned the report to a ObjectDataSource to a custom business data entity class with public properties although I did not use any of the fields. I just want to be able to load this report with the header text using that viewer.
Below is the HTML and code behind for the report viewer:
<form id="form1" runat="server">
<telerik:ReportViewer ID="ReportViewer1" runat="server">
</telerik:ReportViewer>
</form>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
var typeReportSource = new Telerik.Reporting.TypeReportSource();
typeReportSource.TypeName = "QuiCx.Web.Pages.Demos.KendoReporting.CrossTab";
this.ReportViewer1.ReportSource = typeReportSource;
}
}
When I run the report viewer I get this error:
Invalid report type
Value cannot be null.
Parameter name: type
at Telerik.Reporting.Processing.TypeReportDocumentResolver.Resolve(IProcessingContext context, TypeReportSource rs)
at Telerik.Reporting.Processing.ReportDocumentResolver`1.Telerik.Reporting.Processing.IReportDocumentResolver.Resolve(IProcessingContext context, ReportSource rs, Boolean loadParameters)
at Telerik.Reporting.Processing.ReportDocumentResolver.<>c__DisplayClass1.<Resolve>b__0(IReportDocumentResolver r)
at Telerik.Reporting.Processing.ReportDocumentResolver.Bind[T](IProcessingContext context, ReportSource source, Func`2 func)
at Telerik.Reporting.Processing.ReportDocumentResolver.Resolve(IProcessingContext context, ReportSource source, Boolean loadParameters)
at Telerik.ReportViewer.WebForms.ParametersPage.ResolveReportDocument(ReportSource reportSource)
at Telerik.ReportViewer.WebForms.ParametersPage.get_ReportDocument()
at Telerik.ReportViewer.WebForms.ParametersPage.get_ParamsManager()
at Telerik.ReportViewer.WebForms.ParametersPage.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at Telerik.ReportViewer.WebForms.ParametersPage.OnPreLoad(EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Can someone point me in the right direction? The demos provided does not use this report viewer. All of them use the HTML 5 viewer.