Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report: setting database path vb.net

Status
Not open for further replies.

jwbaker

Programmer
Joined
Jul 30, 2003
Messages
4
Location
US
I am creating a program in VB.net that uses crystal reports. If i install it on another machine I want it to be able to locate the database automatically.

How do I programmatically set the database path of a Crystal Report?

Thanks

John
 
Easiest way is to use an OLE DB connection, then set the connection string at run time.
If you're using file based databases you'll have lots of trouble!

Andrew Baines
Chase International
 
Thanks for the reply. I am using an OLE DB connection. I want to know how to programmatically make the connection.

I know I can go into the report and through vb.net and "Set Location.." of the database, how do I do this in code.

report.setlocation(databasepath)

doesn't exist.

I am fairly new to vb.net and crystal reports.

Thanks,

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top