Problems printing Crystal Reports in Visual Basic 5 
Author Message
 Problems printing Crystal Reports in Visual Basic 5

howdy all,

Ok, this is a ongoing struggle i'm having with Visual Basic, so please
hear me out :)
I'm working on a rather large VB5 project that pulls up auto
information for various accounts in a SQL Server database.  Sounded
easy enough for me...I threw some command buttons / Crystal Report
Controls (version 4.6) on the form.  I have some predefined reports
created in Crystal Reports 8, and my plan was to simply pass the
account number (a primary key) into the reports via the
SelectionFormula method.  I use a connectionString (read: dsn-less
connection) to connect to the SQL Server, btw.

Anyways, the thing works perfectly on the machine i orginally created
it on... *a machine that has Crystal Reports 8 installed on it*.  when
i move the project over to a machine that only has VB5 installed (not
crystal reports 8), it gives an error saying that the report could not
be opened, even though i want the reports to get sent straight to the
printer...not to the screen.  Now, I'm assuming this means that i need
some dll's from crystal reports 8 to print the forms out.

i found a *little bit* of info on the net on key dll's, and after
installing them in Windows/System, i made a bit more progress.  Now,
it attempts to print the report (i see the little "printing page 1 of
1" message box), but then Errors out, saying "Run-time error: 20599 -
cannot access SQL Server".  i know that i have database access, as i
can pull data into the form before attempting to print the reports.

oh, and another key thing...the thing *does* print reports as long as
i don't include a SelectionFormula method!  (however, it IS key that i
narrow down the report by passing the report the Account number)  This
tells me that i need to include a CR dll that interacts with SQL
Server or something...but i've already made sure to include
p2sodbc.dll (something like that), etc...

of course, i could be wrong.  does anyone have any suggestions?!?
most machines that this program will be used on will not have the full
Crystal Reports 8 program installed on them, so i need to locate the
right dll's to print reports..i assume.  maybe i'm looking at this all
wrong.  anyways, thanks for putting up with my long description... i
hope i'm overlooking something easy here :)

thanks again,
Chris Wilker



Sun, 14 Dec 2003 11:14:57 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem with report in Visual Basic and Crystal Reports

2. Problem with report in Visual Basic and Crystal Reports(2)

3. Problem with report in Visual Basic and Crystal Reports(2)

4. Problem with report in Visual Basic and Crystal Reports(2)

5. Print dynamic pictures with Crystal Reports 8.0 professional and Visual Basic

6. Crystal Report Problem (With Visual Basic 3.0)

7. Problem using Crystal Report 8.5 to export PDF in Visual Basic 6.0

8. Problem: Visual Basic 3.0 + Crystal Report 5.0 16 bit

9. Printing Crystal Reports without Crystal Control ActiveX or Crystal Reports API call

10. Crystal Reports ANd VB 6.0 Printing reports using CRPEAUTO Object, specifying paper orientation problem

11. Linking Crystal Report with a stored Procedure -- crystal report for visual studio.net

12. Print a report via crystal reports without print dialogue displaying

 

 
Powered by phpBB® Forum Software