Environment
CR 8.5
WinNT Current SP
VB6
Getting an error 525 when running this code (extraneous stuff taken out:
Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(dbWhere)
Dim exportdll As String
Dim exportformat As Integer
exportdll = "u2frdef.dll"
exportformat = 0 'crUXFReportDefinitionType
Handle = PEOpenEngine
If Handle = 0 Then
lbl = "Error Getting Handle"
Else
lbl = "Crystal Print Engine Successfully Open"
End If
job = PEOpenPrintJob(FullName)
(
FULLNAME is passed a string such as
\\ntbuf\siinput\reports\~cifkd9g.rpt
)
result = PESetAllowPromptDialog(job, False)
result = crPEExportToDisk(job, FullName & ".txt" + Chr(0), exportdll + Chr(0), exportformat, 0, 0, "", ""
If PEStartPrintJob(job, True) = 0 Then
lbl = "Error starting print job"
Else
lbl = FullName & " exported"
End If
PEClosePrintJob (job)
PECloseEngine
Exit Sub
A JOB number of 0 is returned at PEOpenPrintJob(FullName). Trapping the error number gives me 525. This code worked fine when using something like this:
job = PEOpenPrintJob(FullName)
(
FULLNAME is passed a string such as
G:\siinput\reports\~cifkd9g.rpt
)
Verified the existence and access to the report with an
OPEN "\\ntbuf\siinput\reports\~cifkd9g.rpt" for binary as #1
Any ideas????
Crystal Reports Design/training/Consultation
ecsdata@ecsdata.com
CR 8.5
WinNT Current SP
VB6
Getting an error 525 when running this code (extraneous stuff taken out:
Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(dbWhere)
Dim exportdll As String
Dim exportformat As Integer
exportdll = "u2frdef.dll"
exportformat = 0 'crUXFReportDefinitionType
Handle = PEOpenEngine
If Handle = 0 Then
lbl = "Error Getting Handle"
Else
lbl = "Crystal Print Engine Successfully Open"
End If
job = PEOpenPrintJob(FullName)
(
FULLNAME is passed a string such as
\\ntbuf\siinput\reports\~cifkd9g.rpt
)
result = PESetAllowPromptDialog(job, False)
result = crPEExportToDisk(job, FullName & ".txt" + Chr(0), exportdll + Chr(0), exportformat, 0, 0, "", ""
If PEStartPrintJob(job, True) = 0 Then
lbl = "Error starting print job"
Else
lbl = FullName & " exported"
End If
PEClosePrintJob (job)
PECloseEngine
Exit Sub
A JOB number of 0 is returned at PEOpenPrintJob(FullName). Trapping the error number gives me 525. This code worked fine when using something like this:
job = PEOpenPrintJob(FullName)
(
FULLNAME is passed a string such as
G:\siinput\reports\~cifkd9g.rpt
)
Verified the existence and access to the report with an
OPEN "\\ntbuf\siinput\reports\~cifkd9g.rpt" for binary as #1
Any ideas????
Crystal Reports Design/training/Consultation
ecsdata@ecsdata.com