hi,
I have to use vba to display a report.
But this report should work on multiple database without having to change the report each time.
So I would like to change the report on runtime.
I think i can use LogOnServer (method of the application Object) or something.
Now i don't know how to use it. Looked for examples on the kb of crystal and this forum but wasn't succesfull to make it work.
Can somebody help me.
This is the code i use to call the report:
Set crxReport = crxApplication.OpenReport(MyReportFile)
crxReport.ParameterFields(1).AddCurrentValue (DocNumber)
Me!Crviewer1.ReportSource = crxReport
Me!Crviewer1.ViewReport
Crviewer1.Zoom (100)
While Me!Crviewer1.IsBusy
DoEvents
Wendreport.Database.Tables(1).SetLogOnInfo ServerName, DBName, UserID, Pwd
This will set the logon info for the table used in the report.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment