Skip to Content
0

Ramdom Failed to Render from CR in a Web app

Feb 26 at 04:09 PM

110

avatar image
Former Member

We are seeing a random problem "failed to render" when creating a Crystal Report. The reports are created by CR for VS 13_0_19. The application is using the ASP.net framework 4.5.2 and is hosted on Windows Server 2008 Standard. The clients are using Windows 10 with IE11. The same report with the same data may or may not work. At one point I found a situation in the forums where it was the second person creating a CR report that got the "failed to render". On first attempt, we fit the situation, but additional attempts proved that this was not the situation. I have not been able to determine a scenario where the problem always occurs.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

8 Answers

Best Answer
Don Williams
Mar 02 at 09:15 PM
0

Read the platform for CR for VS, link on the download WIKI.

Page 4 indicates Windows 2008 R2 /SP2

See if updating your host OS works.

Don

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Feb 26 at 05:50 PM
0

Make sure you are using Sessions and PostBack methods to keep the reports in scope.

See this KBA for example: ( use Google to search for the number )

1985571 - How to use sessions in web applications using the Crystal Reports viewer (the complete code)

Don

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 26 at 08:11 PM
0

Thanks for the reply.

I don’t think Session state applies to this particular problem. The "Failed to Render" error occurs on the initial load. For testing, we are just closing and re-opening the same report. There is no post back. For the database connection, we are using Windows Integrated authentication and are not seeing any login prompts, just the error.

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Feb 26 at 10:01 PM
0

That error is typically because there are no resources available to load another object collection because either the Reports are not closed or you are not loading the CR stuff in the Page_Init section.

You may be running out of licenses also, CR for VS cannot do Report Bursting. Only three reports can be processed at one time in CR for VS.

Depending on how far the report engine got loading the report object depends on what error you may get.

If you are loading/closing the same report object 1000's of times it's not going to prove anything

May even be an error in the report, the SDK loads all objects, even the unused ones and if they point to a Field that doesn't exist it can generate an error as well.

In a WEB app Sessions and PostBack are VERY important in CR. If you don't use them then the report goes out of scope and any kind of error can be generated.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 02 at 03:35 PM
0

I have added to session as described in 1985571, hopefully correctly. I am including part of the debug in IE11. The working and nonworking instances are identical to the first line I am including.


<style> .drill_cursor { cursor: url('../aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/images/drill_cursor.cur'), default; }</style>

<link rel="stylesheet" type="text/css" href="../aspnet_client/system_web/4_0_30319/crystalreportviewers13/css/exception.css">
<table width="100%" cellspacing=1 cellpadding=0 border=0>
<tr><td>Error</td></tr>
<tr>
<td>
<table width="100%" border=0 cellpadding=5 cellspacing=0>
<tr>
<td>
<table border=0 cellpadding=5 cellspacing=0>
<tr><td><span>Fail to render the page.</span></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--
Inner Stack Trace:
at CrystalDecisions.Web.HtmlReportRender.ReportRenderBase.Render(Object reportContent)
at CrystalDecisions.Web.ReportAgent.RenderPage(String sDrilldownGraphPostBackPrefix, String sDrilldownPostBackPrefix, String sSortPostBackPrefix, String sHyperlinkClickedPrefix, String controlID, Boolean bSeparatePages, Int32 iZoomFactor, Boolean bShowAllPageIds)
Stack Trace:
at CrystalDecisions.Web.ReportAgent.RenderPage(String sDrilldownGraphPostBackPrefix, String sDrilldownPostBackPrefix, String sSortPostBackPrefix, String sHyperlinkClickedPrefix, String controlID, Boolean bSeparatePages, Int32 iZoomFactor, Boolean bShowAllPageIds)
at CrystalDecisions.Web.CrystalReportPageViewer.RenderPage()
at CrystalDecisions.Web.CrystalReportPageViewer.Render(HtmlTextWriter output)
at CrystalDecisions.Web.CrystalReportPageViewer.GetHTML()
at CrystalDecisions.Web.Render.ReportPageRenderer.GetJSONObject(IComponent component)
at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()
at CrystalDecisions.Web.Render.ReportViewRenderer.GetJSONObject(IComponent component)
at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()
at CrystalDecisions.Web.Render.ReportAlbumRenderer.GetJSONObject(IComponent component)
at CrystalDecisions.Web.Components.ComponentBase.GetJSONObject()
at CrystalDecisions.Web.CrystalReportViewer.GetJSONObject()
at CrystalDecisions.Web.CrystalReportViewer.Render(HtmlTextWriter output)
--!>


</div>


<script type="text/javascript">
//<![CDATA[
bobj.crv.stateManager.setComponentState('DDForm1149__UI',eval('('+document.getElementById('__CRYSTALSTATEDDForm1149').value+')'));
var callBackFrameUrl='/WebResource.axd?d=MzzwKpolUfBzKccm7CDTNeIx1FMFG2M-4eLPZ2LC7E-mDQhg6TEwf9QxVD6gcd_ID9RXvzHINDf8gxNATET5b1gcGv7Qgb7S0&t=636396566200000000';
WebForm_InitCallback();new bobj.crv.ViewerListener('DDForm1149__UI',new bobj.crv.AspDotNetAdapter("__doPostBack('DDForm1149','VIEW-CONTEXT')", "VIEW-CONTEXT", "__CRYSTALSTATEDDForm1149","WebForm_DoCallback('DDForm1149','arg','cb','ctx','errcb',true)","4.0.30319.36415"));//]]>
</script>
</form>
</body>
</html>

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 21 at 03:45 PM
0

The random failure, “Failed to Render”, still eludes me. We now know how to reproduce the problem. Given a time gap, the report will work for the first user. Subsequent users will get the error. I’ve used Process Monitor to generate logs, working and non-working. They are not quite the same, I assume caching the report. The subsequent users are getting Access Denied on a create file in C:\Windows\Temp. Then there is string of Access Denied(s) referencing HKU\.Default\software. I cannot upload the logs due to file type and size. Any help is appreciated.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 26 at 02:37 PM
0

We have corrected the problem. The IT group changed permissions on C:\Windows\Temp. Once the restricted permissions were rolled back, it started working.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 02 at 02:07 PM
0

The problem continues. The IT group stated the allowing permissions on the C:\Windows\Temp directory can only be temporary. It is against the rules they have to follow. I have found a way to change the default temp directory Crystal Reports used in Active Directory, but this was for an older version and apparently has no effect on 13.0.22. Is there a way to change the Crystal Reports default temp directory in Active Directory and if so, what is the path and key/value?

Share
10 |10000 characters needed characters left characters exceeded