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 - 28 May 2008 19:44 GMT
> Hi,
>
[quoted text clipped - 24 lines]
>
> Thanks for your help
MorganDollarBill - 28 May 2008 19:53 GMT
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
> > Hi,
> >
[quoted text clipped - 24 lines]
> >
> > Thanks for your help
MorganDollarBill - 28 May 2008 19:57 GMT
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
> Hi,
>
[quoted text clipped - 24 lines]
>
> Thanks for your help