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

Changing Database locations

Status
Not open for further replies.

dowyse

IS-IT--Management
Nov 2, 2003
6
US
We are using Crystal Reports standard. I want to create a report that will sometimes run against my DBLive database and sometimes will run against DBTest. These are identical databases with identical tables but with different names. One database may is our live database while the other is a copy of the database with a different name.

When I try to Set Location by changing the database the report will fail but if I set location by updating one table at a time, then I can get it to work most of the time.

Certainly someone has figured out a way around this. Thanks in advance for any help.
 
HI dowyse,

If I were you - I'd create two reports - one against each db and run them as needed. Then you wouldn't have to keep changing them all the time.

Cheers,

paulmarr
 
We have about 75 reports that need this. Not too easy to do for all the reports.
 
Please posting version info and connectivity used.

Try using an ODBC connection, and then go change the ODBC connection when you need to run against the other database.

-k
 
I did that and the system fails at that point. I called tech support and they told me to change one table at a time. That will work most of the time but with 5-10 tables per report, it is a lot of work.
 
Makes no sense.

Rather than posting generic info such as "system fails at that point", try posting actual errors received, and please post version and connectivity info.

-k
 
dowyse,

First of all, I have to disagree with Paul Marr. I don't think creating two reports is a good idea, because it will double the maintenance load. Every time you want to make a change to the report, you will have to change it in two places.

The way I have tackled this problem is to use Database / Set Location, as you suggested, for the first table. CR will prompt you to 'propagate' the change, to which you answer Yes.

I don't know if that's the recommended method, but it has worked for me with CR 8.0 Developer. It might have changed in 9.0.

Mike


Mike Lewis
Edinburgh, Scotland
 
Dear Dowsye

If u r using the front end as VB then it is easy to tackle the problem
if you r going to change the database that is having identical fields

then just before use enter the
cr.reportfilename command in vb
just provide the following command

cr.datafiles(0)= 'the path of the database with the database name

i think this works right for u
check out with this piece of code
 
venkatgvi:

I was thinking something similar. I had a client who had a large number of reports to change and they wrote a vb app to assist them in openning the reports, changing the location and saving the report. But Dowsye said they were using Crystal standard, which wouldn't come with the RDC, so a vb solution may not be their answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top