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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 7.0 and Crystal Reports print 1

Status
Not open for further replies.

bettyfurr

Technical User
Mar 12, 2002
371
US
When I select the safety function sheet, choose Adobe, and print, there is no error. But, it you select all three reports, then choose Adobe, and print, the following error occurs:

OLE IDispatch exception code 0 from Crystal Reports ActiveX Designer: File not found.

It still prints the report, but the error message must be acknowledged.

Why does this error occur? The print is going through the same code.

Betty :)
 
If the adobe printer is the default printer, I do not get this error, otherwise I do.

Sorry about the "safety function sheet" ringer, just the selection required prior to going into printing.

You then have a form to choose up to print jobs.

That is when the code does a case statement for the printing of the crystal reports.

I hope that is clearer.

Betty :)

I will bring the actual code tomorrow.

 
will do tomorrow. Thank you for your help. Did you see my other question about the VFP and CR on a printer select?

Betty :)
 
Here she goes.

**The reports are in the software directory/current directory.

** in the main program, I have this statement
ocr=CREATEOBJECT("CrystalRuntime.Application")

SELECT prtthis
IF THISFORM.check1.VALUE=1
orpt=ocr.openreport("cr_DOCS.rpt")
IF orpt.hasSavedData
orpt.discardSavedData()
ENDIF
orpt.printerduplex=1
orpt.printersetup(0)
orpt.printout(.T.)
endif

IF THISFORM.check2.VALUE=1
orpt=ocr.openreport("cr_dpjx_nh.rpt")
IF orpt.hasSavedData
orpt.discardSavedData()
ENDIF
orpt.printerduplex=1
orpt.printersetup(0)
orpt.printout(.T.)
ENDIF

Thank you,
 
Betty,

Your code looks OK to me. I'm still not clear what the error message is about. The message refers to the Crystal Reports ActiveX Designer, but your code does not refer to the designer in any way; it is simply calling methods of the RDC. Can you clarify that?

Mike


Mike Lewis
Edinburgh, Scotland
 
I am sorry I do not use the activex designer that I can aware of. I do not have the developer report license and steer away from anything that appears to be code that includes the designer. That is why this has me perflexed. I don't know why I am getting the error on a printer change for adobe. I have told the user to upgrade their adobe. They are using an older version. I wanted to rule out it was my code.

Betty :)

I gave you a star. Thank you for your advise.

I have another post that no one has helped me with on VFP and Crystal Reports. Hint Hint.


 
Will do. Thank you again for your support.

Betty :)
 
thread184-735963 Is this any help? I could not see how to get a link to my request.


Betty :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top