Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRPE Error 525 CR V8.5 and VB6

Status
Not open for further replies.

earljgray

IS-IT--Management
May 22, 2002
49
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top