Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Application stops working - have to reboot server

$
0
0

We are running vs2005 and vs2008 on a windows 2003 server. We have some applications that have embedded crystal reports (11.5 XI and Cr2008).

 

From time to time crystal reports is not working ie is not displaying the reports. We are passing parameter to the reports and for most part it works fine.

 

Suddenly nothing is being displayed when user runs the app and we have to reboot the server, then things are working again, till next time.

 

Wonder why this happens and is there something I should do within the application to prevent this. Could there be something that is filling up somewhere and at one point needs to be cleared? Thank you.

 

Here is sample code:

 

Try

            If Session("myCrystalReport1") Is Nothing Then

                BatchGuid = "{" + Session("BatchGuid") + "}"

                myCrystalReport1.Close()

                Dim myPath As String = (Server.MapPath("ProjectDailyReport.rpt"))

                myCrystalReport1.Load(myPath)

                myCrystalReport1.SetDatabaseLogon(System.Configuration.ConfigurationManager.AppSettings("CrystalReport_UserId"), System.Configuration.ConfigurationManager.AppSettings("CrystalReport_Password"))

                myCrystalReport1.SetParameterValue("BatchGuid", BatchGuid)

                CrystalReportViewer1.ReportSource = myCrystalReport1

                Session("myCrystalReport1") = myCrystalReport1

                CrystalReportViewer1.SeparatePages = True

                myCrystalReport1.DataSourceConnections.Clear()

            Else

                myCrystalReport1 = Session("myCrystalReport1")

                CrystalReportViewer1.ReportSource = myCrystalReport1

            End If

 

Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload

        Try
            myCrystalReport1.Close()
            myCrystalReport1.Dispose()
        Catch ex As Exception
            Message = ex.ToString
            Message = "Error closing Crystal report"
            ASPNET_MsgBox(Message)
        Finally
        End Try

    End Sub


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>