Re: vb.net & crystal reports
Hi,
I've created the Crystal report by connecting a data base(Excel file) and able to view this from Crviewer(vb.net). But i want to change the data base names from vb.net. Is there any way to change the data base name?
Regards,
Hems.
Re: vb.net & crystal reports
Hi all,
I got the solution for my problem. But i dont know whether it is the correct way or not? Anyway it is working now. I used the follwing coding to change the database name dynamically.
VB Code:
Dim CrTables As Tables
Dim CrTable As Table
Dim crReportDocument As New ReportDocument
crReportDocument.Load("C:\cr1.rpt")
CrTables = crReportDocument.Database.Tables
For Each CrTable In CrTables
CrTable.Location = "C:\test2.xls"
Next
CrystalReportViewer1.ReportSource = crReportDocument
While creating the report I used test1.xls as my database, now from vb.net i changed it to text2.xls
If anything wrong on this, Please advice me..thanks :wave:
Regards,
Hems.