BusinessObjects Board

Report Failed To Load

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)

[Moderator Note: Moved from General Discussion to SDK (VBA/ASP/JSP)]

And welcome to B:bob:B!


Marek Chladny :slovakia: (BOB member since 2003-11-27)

There are a couple of things to be aware of:

  1. You’ll install one of the runtimes on the server, which are not the same as the SDK executable that installs the interface with Visual Studio

  2. There were some major changes between SP5 you used to use and SP21 that you’re trying to use now. For example, you now need to put your report into a session in the PageInit handler instead of the PageLoad handler in order to be able to move between pages of the report.

Looking at your code, you need to call DataBind() BEFORE you call RefreshReport().

See https://answers.sap.com/questions/330682/crash-with-vs2017-and-cr-sp21.html for information about configuration for using datasets.

-Dell


hilfy :us: (BOB member since 2007-04-16)