Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VB6 and control Crystal Report

4 views
Skip to first unread message

jack

unread,
May 15, 2008, 4:43:50 AM5/15/08
to
Hi,

I have an report Crystal Report 8.5 in VB 6 (to print photos)

When I print I have an instruction to connect to the database (sql server
2000)

Au

Report1.Database.Tables(1).SetLogOnInfo DB_SERVER, DB_NAME, DB_UID, DB_PWD
where
DB_SERVER=ServerName
DB_NAME = databaseName
DB_UID = userName
DB_PWD = pass

That is ok

The problem is when I put a subreport in this report.
I don't find which syntax to use in VB to open the connection to the
database for this subreport

And I have an error message such as "the server has not been open yet" (or
something like that because it's in french...)

I am looking for something like Report1.Subreport1.SetLogOnInfo ...

Thanks for your help


MorganDollarBill

unread,
May 28, 2008, 2:44:01 PM5/28/08
to

MorganDollarBill

unread,
May 28, 2008, 2:53:02 PM5/28/08
to
Sorry about the last message, I am encountering many glitches on the forum
today.

Anyway, you are correct. Not only do you have to logon to the main report,
but you have to iterate the subreport collection and logon to each of the
subreports. When I wrote the code to do this in 2002, I found that this fact
was not documented well in the Crystal Help file.

Bill

MorganDollarBill

unread,
May 28, 2008, 2:57:01 PM5/28/08
to
I apologize, but I seem to be having difficulty with the forum this afternoon.

When I wrote VB 6 code for Crystal 8.5 in 2002, I leaned that you must first
logon to the main report and then iterate through the subrport collection and
logon to each subreport. As I recall, this fact was not diocumented well.

Bill

0 new messages