javascriptcrystal-reportsasp.net-4.5

No images and Javascript error on accessing Crystal Report in .NET 4.5 Web Application


We have a .NET 2.0 Web application that displays graphs using Crystal Reports.

We recently migrated our application to .NET 4.5 and everything is working fine except none of the crystal reports graphs are showing up. Instead I get a Javascript error and an empty container where a graph/image should have been present.

Line: bobj.crv.stateManager.setComponentState('ctl00_DashboardControls_WebPartManager1_wp842781669_ctl01_ctl00__UI',eval('('+document.getElementById('__CRYSTALSTATEctl00$DashboardControls$WebPartManager1$wp842781669$ctl01$ctl00').value+')'))

Error: SCRIPT5007: Unable to get value of the property 'value': object is null or undefined

We are using:

I have tried various web config changes but haven't had any luck with them.

I would like to hear if anyone else has faced a similar issue while migrating to .NET 4.5, if not then I'd really appreciate some help from Crystalreports dll users to guide me through troubleshooting. What can I look into first? Maybe CrystalImagehandler.aspx?

Thank you!


Solution

  • I found the root-cause.

    EnableViewState attibute of CrystalReportViewer was set to "False". I cahnged it to "True" and missing javascript object that was causing the issue was inserted. My issue was thus resolved.