This is a migrated thread and some comments may be shown as answers.

Trouble Adding Report to Web Page

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Dec 2012, 03:05 PM

Good morning,

I have successfully been able to add a built report to a Windows Form, but I am having a little trouble getting it to work on a webpage.

I have added the Telerik Report to the webpage, added the Report Source, but I am getting the error

"The source of the report definition has not been specified."

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

I forgot that I needed to add the code above. However, once I added that it in, the namespace 'Examples' does not exist in the 'Telerik.Reporting' namespace.

Is there another reference I need to add/change? I am using the Q3 2012 Reporting version.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 12 Dec 2012, 03:14 PM
Hello David,

Telerik.Reporting.Examples.CSharp is the namespace of our examples that we ship with the product and ListBoundReport is one of the demo reports in the examples. The code from the documentation is not a copy/paste working solution, it just shows the necessary code. When you're in your own project, you should set as ReportDocument your own report instance e.g. DavidsReport.

Greetings,
Steve
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or