Friday, January 8, 2010

Report Viewer not working in dev server (the + sign for grouping is not coming, rather a red X image coming)

Prob. - The report locally works fine, but when moved to the web server and try to pull it up it throws javascript errors.

Error msg : 'RSClientController' is undefined .....
'ClientControllerReportViewer1' is null or is not an object.

What's odd is - it appears the report actually runs despite the javascript errors, but the resulting report has the red "X"s on the image tags in the control itself and the report returns no data.

Soln :

1. The .axd extension in the application config in IIS should set to use framework  2.0 instead of 1.1

2. If the 1st soln is not working,
Click on the application virtual directory in IIS7 and click on the 'Handler Mappings' section. Then 'Add Managed Handler'
Request path: Reserved.ReportViewerWebControl.axd
Type: Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Name: Reserved.ReportViewerWebControl.axd

Once this was created, it worked fine in the Integraded mode AppPool.

3. Just add the following line to my web.config (it should get added automatically, but if not then ..)




 
4. If still not working !
- then, I have to see the code, post me that.