CrystalRuntime.Application Report Hangs Web App - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming » CrystalRuntime.Application Report Hangs Web App


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 07-04-2006   #1 (permalink)
elizabeth
Junior Member
 
Join Date: Jul 2006
Age: 28
Posts: 4
Default CrystalRuntime.Application Report Hangs Web App

Hi ALL,
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,
Bbr

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)

objReport.EnableParameterPrompting = False
objReport.ExportOptions.UseReportDateFormat = 1
objReport.ExportOptions.UseReportNumberFormat = 1
objReport.DisplayProgressDialog = False
objReport.ExportOptions.FormatType = 21 'crEFTExcel50
objReport.ExportOptions.DiskFileName = "c:\temp\Crystal.xls"
objReport.ExportOptions.DestinationType = 1 'crEDTDiskFile
objReport.ExportOptions.ExcelAreaType = 4 'crDetail
objReport.ExportOptions.ExcelConvertDateToString = False
objReport.ExportOptions.ExcelUseWorksheetFunctions = False

If False = ReportConnectExternalDatabase(objReport, "InvoiceDemo1", "", "") Then
Debug.Print "err"
End If

Debug.Print "Start"
objReport.Export False
Debug.Print "Finish"

Exit Sub

Login_Error:


Debug.Print "Description: " & Err.Description & " " & "Number: " & Err.Number & " " & "LastDllError: " & Err.LastDllError & " " & "Source: " & Err.Source


End Sub


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"
End If
If (strP = "") Then
strP = "password"
End If
End If

Dim i As Integer

'Logons
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


'Test connection
ReportConnectExternalDatabase = objReport.Database.Tables(i).TestConnectivity
If ReportConnectExternalDatabase = False Then
Exit For
End If
Next i

End Function
error to the client control center
Good Afternoon

Error To The Client Control Center....

Error Cli Driver Sql30061n No Se Ha Encontado El Alias De La Base O Nombre De Base De Datos En El Nodo Remoto Sqlstate=08004

Thank You
Elizabeth
elizabeth is offline   Reply With Quote


Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
One Page Report? GuyKels Site and Server Administration 0 10-18-2006 10:40 AM
Inbound link report questions justin PPC Search Engines 1 10-11-2006 05:10 AM
Report chloe ASP 0 07-13-2006 05:05 PM
US report on kfed erics All Things General 31 06-07-2006 04:38 PM
The Sports Report seeman Marketing 0 03-28-2006 04:13 PM


footer left
All times are GMT. The time now is 01:35 PM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Secured Loans | Online Loans | Bad Credit Mortgages | Online Loans | Cheap Loan

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49