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!

Printing Problem - Crystal Report in Visual Basic

Status
Not open for further replies.

caconner

Technical User
May 20, 2002
42
US
I've set up a .rpt in the CR version packaged with VB 6. I had a bit of a problem adding the Access 2000 database. When I tried to add it as a Data File in CR, it kept requesting a password, but no password was set on the database. I finally added it as a SQL/ODBC. I'm hoping this isn't the root of my problem in VB.

Within my VB program, I open and close several recordests from the database using ADO. Don't think this is important, butjust to give as much background as possible... I've added the CR control and set the properties - ReportFileName, Destination to window, PrintFileType as crptRecord. I've coded Response = ReportName.PrintReport on a button click, and it wasn't doing anything. I added a msgbox to display if the Response <> 0, and I've grown weary of seeing that msgbox pop up now. I had it printing to the window a few days ago, but now it won't.

Am I a complete idiot or what? And I haven't even tried to pass any date paramters in yet. If anybody has any ideas, I'm feeling pretty desperate!

Cathy
 
it is not very clear what you are trying to do with the report viewer or your report or recordsets
are you setting an existing report = to your recordset results and trying to open it into a Viewer or ?
 
You are probably using v4.6, the free version that comes with CR. You may need updated drivers for Access 2000 see faq766-550 . Have you tried running a simple report using a different data source? That will tell you if it is MS Access 2000 that is the problem, or if it is your code. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I haven't associated any of my recordsets with the report. I'm just using the same db as the report.

Actually I'm using v4.5. The report views ok in CR, I just can't do anything with it in VB 6. I haven't tried another data source yet, but I am thinking it might be the driver. I've tried everything else I can think of. It doesn't even throw an error, it just won't do anything.

Cathy
 
Thank you, thank you, thank you!!! That was it!

I downloaded the libraries, recreated a report using the Data File data type instead of the SQL/ODBC, and that report runs in my program!!

Thanks again!

Cathy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top