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

Method 'PrintReport' Failed 1

Status
Not open for further replies.

Lorski

Programmer
Dec 28, 2000
12
US
I am using VB6, Access 7 and CR8. My program used to work...until yesterday.

The end user tried to run this program...and it gave them an "automation error". When I walk it through step by step...I get a MS Visual Basic window with:

"Run-time error '-2147417848 (80010108)' -- Method 'PrintReport' of object 'CrystalCtrl' failed"

When I debug, it points to the "CrystalReport1.PrintReport" statement in my coding. Here's the code...

Private Sub cmdPrint_Click()

Label3.Caption = "Printing Reports..."
FileLoc = "S:\Users\Mis\Vtd8\IPLabels\"

SetAttr (FileLoc + "ManualIP.rpt"), vbNormal
CrystalReport1.DataFiles(0) = (FileLoc + "Lbls.mdb")
CrystalReport1.PrintReport
Label3.Caption = "Printed Labels."

End Sub

The report and files are located in the same folder. Again, this was working without errors for a few weeks... then this started. Any clues?
Thanks in advance.
 
Does it still work on your development PC or is there only one PC involved?

Did anything change in the environment (new software installed, new user login or permission settings, changes to the database)

Something would have to change. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
hello

one thing you can do to see if something changed is open the report in the Crystal Reports Designer, then click on Database then on verify database, if you get any other message than "Database up to date" then something has definately changed in the database. Also, check that verify on every print is not checked, if it is, turn this off, if it is not, then turn it on, each time trying the report in the app.

hope this helps.

E. McEvoy
Crystal Reports Consultant
 
The database is updated on a daily basis...sometimes several times. I'm pulling in a text file into Access 7.0... through VB6...then printing the reports in CR8 through VB as well.

Yes. The database has changed as far as the data...but the layout has not. In testing, we have imported from my PC... as well as their PC in Scranton...

I DID notice a change in my printers. We were printing to a specific printer in Scranton, but now it's not even available to me on my PC. I can't even set it up as a new printer. It seems Crystal is VERY picky about the printer...so I have been wondering if that is the problem...

The application doesn't even work on the PC I used to create the program... same error.. except I get the message above, and they get "automation error".
 
Hello

When you openned the report in the designer, and clicked on Database | Verify Database, did you recieve any other message than Database uptodate? One thing you can click on is the verify on everyprint, if it is not already on, this might catch any changes there.

Yes, crystal reports is very picky when it comes to printers, it is very printer driver dependent. See if you can get the original printer back and see if the reports work again. If it does, then in the report, you can click on File | Printer Setup and then click on No Printer. This will "unlock" the report from the original printer.

Hope this helps out E. McEvoy
Crystal Reports Consultant
 
I had the very same problem, in my case I had changed the "verify on every print" checked. Once I unchecked it, things started working again, I also had a database that I wasnt using in the report, even though I removed it, unchecking the verify box did the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top