Change datasource of crystal report at runtime
Hi all,
This is Padma
I have a problem regarding crystal reports.
I have added a crystal report designer into my project.I have used MSaccess as the database and when I have added crystal report as a designer,code has been automatically added with CRViewer9 control to view the report.
Now my problem is that i have to change the datasource of the report at runtime
Code is like this
Dim Report as CrystalReport1
CRViewer91.Source=Report
CRViewer91.ViewReport
I have tried adding a line of code to change the database
Report.Database.SetDataSource(App.Path & "\DB.mdb")
but not working
If anybody can help me i would be thankful
|