문제

I want to show Telerik Report in Telerik ReportViewer in Asp.net page. I have create a Class Library Project and Telerik Report in it, configure correctly, it show data in preview. Also created an asp.net website and AddReference of class Library Project in it.

Now, how do I show Report in Telerik ReportViewer Control?

도움이 되었습니까?

해결책

You can use the following code:

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
        instanceReportSource.ReportDocument = new YourClassLibrary.YourReport();
        this.ReportViewer1.ReportSource = instanceReportSource;
    }
}

You can also set the ReportSource declaratively from the ReportViewer properties.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top