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

ReportViewer.js throws no report instance error

1 Answer 117 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
D'Arcy
Top achievements
Rank 1
D'Arcy asked on 25 Apr 2014, 08:53 PM
I am trying to use the report viewer widget in my Existing MVC 4 project.  I followed the steps found on this tutorial:
.  http://www.telerik.com/help/reporting/mvc-report-viewer-extension-embedding.html
The difference I change from the guide posted to my own project was to put the styleing in my MVC project css and add the the javascript files with the MVC bundles.  

I am trying to view the reports from the reportviewer widget and am trying to use the follwing view to instantiate the widget

    @(Html.TelerikReporting().ReportViewer()
        .Id("reportViewer1")
        .ServiceUrl("/api/reports/")
        .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.html")
        .ReportSource(report)
        .ViewMode(ViewModes.INTERACTIVE)
        .ScaleMode(ScaleModes.SPECIFIC)
        .Scale(1.0)
        .PersistSession(false)  )
but I am getting     an error in the ReportViewer-8.0.14 file in the throwIfNoReportInstance() function saying the report instance Id is undefined.  I know this is because the report instance is not created, but I am wondering where the report is instantiated at.  Thanks






1 Answer, 1 is accepted

Sort by
0
Accepted
KS
Top achievements
Rank 1
answered on 28 Apr 2014, 08:55 AM
Hi,

This is the viewer, and it calls the service at http(s)://myapp.com/api/reports (here you need to register the routes for the reporting web api and implement it). If you copy the code from the article, report in the code snippet above should be a TypeReportSource or UriReportSource, other stuff should be handled in custom resolver.

-KS
Tags
General Discussions
Asked by
D'Arcy
Top achievements
Rank 1
Answers by
KS
Top achievements
Rank 1
Share this question
or