
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