Unanswered: CrystalRuntime.Application Report Hangs Web App
I have a problem with a VB script below, which is opening .rpt report ( data from MS Access DB ) and exporting it to XLS (Excel) file. It works perfectly when it runs in MFC EXE app without any prompts. If we run it in Web App where it is executed by vb engine it come to the “Report.Export False” and hangs the application. It prints “Start” and never come to “Finish”. No errors, no exceptions, no logs in System Even Viewer even if I intentionally change the output file path to some non exiting one. It means it is happened before attempting to open .xls file.
Do you have an idea why it is happening?
Thank you in advance for your help,
Private Sub Command1_Click()
On Error GoTo Login_Error
Dim objApplicat As Object
Set objApplication = CreateObject("CrystalRuntime.Application")
Dim strPath As String
strPath = "c:\\InvoiceReport.rpt"
Dim objReport As Object
Set objReport = objApplication.OpenReport(strPath, 1)
Function ReportConnectExternalDatabase(ByRef objReport As Object, _
ByVal strDSN As String, _
ByVal strU As String, _
ByVal strP As String) As Boolean
ReportConnectExternalDatabase = True
strU = strU
strP = strP
If (strDSN = "") Then
strDSN = "InvoiceDemo1"
If (strU = "") Then
strU = "User"
If (strP = "") Then
strP = "password"
Dim i As Integer
Dim nTablesCount As Integer
nTablesCount = objReport.Database.Tables.Count
Debug.Print "objReport.Database.Tables.Count " & Str(objReport.Database.Tables.Count)
For i = 1 To nTablesCount
objReport.Database.Tables(i).SetLogOnInfo strDSN, strDSN, strU, strP
Debug.Print "strDSN " & strDSN
Debug.Print "strU " & strU
Debug.Print "strP " & strP
ReportConnectExternalDatabase = objReport.Database.Tables(i).TestConnectivity
If ReportConnectExternalDatabase = False Then