Hello All,
I am developing in windows 10 with Visual studio 2017. I have installed the crystal report for visual studio version 13.0.21.2533. Everything works fine and all my reports loads. I have published my application and hosted on IIS on the same windows 10 computer, and everything works fine.
Now when I deploy this solution on a windows server 2012 R2, my reports doesn’t load. An error is displayed “Failed to render the page”. When i look at the source of the page, I find the stack trace errors below;
<!--
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)
--!>
I have installed crystal report version for visual studio version 13.0.21.2533 on this box. There is however no visual studio installed on this server.
Below is my code for loading the report;
Dim dsTemp As New DataSet
dsTemp = Session("dsOnlinePayPrint")
objUtils.AddImageColumn(dsTemp.Tables(0), "logo_stream")
For index = 0 To dsTemp.Tables(0).Rows.Count - 1
If dsTemp.Tables(0).Rows(index)("logo").ToString = "" Then
Else
Dim logoName As String = Server.MapPath(dsTemp.Tables(0).Rows(index)("logo").ToString())
If File.Exists(logoName) Then
objUtils.LoadImage(dsTemp.Tables(0).Rows(index), "logo_stream", logoName)
Else
Dim strDefault As String = Server.MapPath("assets/images/default.jpg")
objUtils.LoadImage(dsTemp.Tables(0).Rows(index), "logo_stream", strDefault)
End If
End If
Next index
report.SetDataSource(dsTemp.Tables(0))
OnlinePay.ReportSource = report
OnlinePay.HasCrystalLogo = False
OnlinePay.EnableDatabaseLogonPrompt = False
OnlinePay.RefreshReport()
OnlinePay.DataBind()
And my web.config has these values;
<system.web>
<buildProviders>
<add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
</buildProviders>
</compilation>
</system.web>
Please note that this same report was running fine under crystal report version for visual studio version 13.0.5
Any help on this will be much appreciated.
ddombadoh (BOB member since 2018-01-14)