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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programmatically set data source location

Status
Not open for further replies.

rjoubert

Programmer
Oct 2, 2003
1,843
US
I'm using VB.NET 2005 and Crystal Reports XI Developer.

I have developed several reports using the CR XI Developer interface. In the report design, I had to select the location of my data, so now it's "hard coded" behind the report. I want to setup a test database for my application and I want to point the reports to this new database. Is there a way to do this programmatically so I don't have to change the data source location manually in each report (there's 28 of them)? I would like to be able to flip back and forth between the Test and Production databases.
 
I figured it out. In my VB.NET code, I populated an array of datarows with the data I need for my report and set the report's datasource to that array of datarows. I had done this before in a previous project...I guess I just forgot about it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top