|
Article relates to
|
Telerik Reporting 2.0+
|
|
Created by
|
Steve
|
|
Last modified
|
14 September, 2009
|
|
Last modified by
|
Steve
|
PROBLEM
The following javascript error is thrown, when opening a page containing the web ReportViewer control:
'ReportViewer' is undefined
SOLUTION
This error usually indicates that the ReportViewer control has not been able to load its resources for some reason - javascript, css files and images. It could be due to one of the following things:
- Missing preCondition attribute of the report viewer handler's registration in the <system.webServer>\<handlers> section, when the application is hosted on IIS7, i.e. the handler should look like this:
- Try changing the application pool between DefaultAppPool and Classic .Net AppPool.
- Remove/disable compression modules (if any) as they may somehow interfere with the viewer's handler.
- Run the application, open a new tab in the browser and directly request the viewer's resource by using the following url:
http://devmachine/MyApplication/Telerik.ReportViewer.axd?name=Resources.ReportViewer.js&optype=Resource&version=x.x.x.x
This should give a more detailed information about the error.
- If authorization is used, it is possible that this somehow restricts the access to the http handler used by the viewer. Please, add the following <location> element to your web.config to make sure the handler is accessible at all times:
- Might also occur if you're trying to reference the viewer's client-side object prior to the control registration on the page i.e:
If still having problems, please use a web debugging proxy (e.g.
Fiddler tool) and check what is the response for the
/ReportViewer.axd?name=Resources.ReportViewer.js&version=x.x.x.x&optype=Resource request or any request of such kind. You can then save the session into a text file and send it to us, so that we can inspect it and provide advice accordingly.
Note: Substitute Version=X.X.X.X with the exact assembly version you are using!
Please
Sign In
to rate this article.