Quantcast
Viewing all articles
Browse latest Browse all 3636

W3WP Crash - Oracle view in error.

Hello,

      When I do the following code(see below) on the line v_objRpt.VerifyDatabase() if one of the view of the report is in error the W3WP crash and I'm unable to trap the error.

 

     I am running in VS2010 using Crystal Reports for Visual Studio version 13.0.6.1027. Are you aware of this issue and is there any way to fix it?

 

PrivateFunction ChangeLocation(ByRef v_objRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument) AsBoolean

Try

Dim objConnectionInfo AsNew CrystalDecisions.Shared.ConnectionInfo

Dim objSubRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument = Nothing

Dim objCrTable As CrystalDecisions.CrystalReports.Engine.Table = Nothing

Dim objCrTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo

Dim objSubRptDoc As CrystalDecisions.ReportAppServer.Controllers.SubreportClientDocument

Dim objNewConnInfo AsNew CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo

Dim objConnPropBag AsNew CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag

Dim objLogPropBag AsNew CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag

Dim objTB As CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable

 

Dim objRptDoc As CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument = v_objRpt.ReportClientDocument

 

 

objConnPropBag.Add(CONNINFO_DATABASE_DLL, "crdb_oracle.dll")

objConnPropBag.Add(QE_DATABASE_NAME, "")

objConnPropBag.Add("QE_DatabaseType", "Oracle Server")

objLogPropBag.Add("Server", "DB_SRV")

objLogPropBag.Add(LOGONPROP_TRUSTED_CONNECTION, False)

objConnPropBag.Add(QE_LOGON_PROPERTIES, objLogPropBag)

objConnPropBag.Add(QE_SERVER_DESCRIPTION, "SB_SRV")

objConnPropBag.Add("QE_SQLDB", True)

objConnPropBag.Add(CONNINFO_SSO_ENABLED, False)

 

objNewConnInfo.Attributes = objConnPropBag

      objNewConnInfo.UserName = "USR"

      objNewConnInfo.Password = "PWD"

objNewConnInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE

 

Dim objNewTB As CrystalDecisions.ReportAppServer.DataDefModel.ISCRTable

ForEach objTB In objRptDoc.DatabaseController.Database.Tables

objNewTB = objTB.Clone()

objNewTB.ConnectionInfo = objNewConnInfo

         objNewTB.QualifiedName = "OWNER."& objTB.Name

objRptDoc.DatabaseController.SetTableLocation(objTB, objNewTB)

Next

 

ForEach objSubRpt In v_objRpt.Subreports

objSubRptDoc = objRptDoc.SubreportController.GetSubreport(objSubRpt.Name)

ForEach objTB In objSubRptDoc.DatabaseController.Database.Tables

objNewTB = objTB.Clone()

objNewTB.ConnectionInfo = objNewConnInfo

            objNewTB.QualifiedName = "OWNER."& objTB.Name

objSubRptDoc.DatabaseController.SetTableLocation(objTB, objNewTB)

Next

Next

      Try

      If chkRedoVerify.Checked Then

         v_objRpt.VerifyDatabase()

      EndIf

 

      Catch ex As System.Exception

      'TODO Trace Error

         Throw ex

      EndTry

 

objConnectionInfo = Nothing

If objSubRpt IsNotNothingThen

objSubRpt.Dispose()

EndIf

objSubRpt = Nothing

If objCrTable IsNotNothingThen

objCrTable.Dispose()

EndIf

objCrTable = Nothing

objCrTableLogonInfo = Nothing

Exit Function

Catch ex AsException

Throw ex

EndTry

EndFunction

 

Thank you.

Charles


Viewing all articles
Browse latest Browse all 3636

Trending Articles