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!

Set database location same as report

Status
Not open for further replies.

Mike Lewis

Programmer
Jan 10, 2003
17,516
Scotland
When I develop a report against a local data file, such as an xBase DBF table, I usually store the report in the same directory as the data file. That way, when I move the report to a client's PC, I won't have to worry about hard-coded path names stored in the report.

In CR 8.x, this technique was easy. I would visit Database / Set Location, and choose "Same as report".

My problem is that I can't figure out how to do the same operation in CR 9.0. I know that I can right-click on the table's node in the Set Location dialogue, then choose "Same are report". But this seems to be a bit hit and miss. Sometimes, no menu pops up when I right click; at other time clicking that option has no effect.

Even when the operation appears to have worked, it doesn't seem to get saved with the report. In fact, if there are no other changes pending in the report, the Save option is greyed out.

Am I go about this the wrong way? I'd appreciate some guidance.

Thanks in advance.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
I think that you're going about it correctly, however I am sometimes forced to move a field one left the one right for certain operations before Crystal will understand that a change has occurred.

Not sure why it's hit or miss when pointing at the table, I very rarely use explicit file based databases.

-k
 
Synapsevampire,

Thanks for the reply. It's reassuring to know that I'm doing anything wrong.

I've just tried had another try, and after a couple of failed attempts, it worked OK. I followed your advice about moving a field to make Crystal realise that something had changed.

This seems to be yet another one of those things that was relatively easy in CR 8.x, and which has become more complicated in the newer versions.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
I have a similar problem trying to change the datasource location in CR9.

I have found that i have to manually change every table individually (not helpful when working with 35+). This was a great feature of CR8.5 that you could update them all at once and now you can't - has anyone been able to work around this???

For a better way of life check out
 
Liz,

Thanks for that comment.

I did wonder about writing a program to do the job -- something that would loop through all the reports in a given directory, and access their database objects via the RDC.

If I get round to doing that, I'll post is somewhere so others can use it. But I've got so much on my plate right now, I don't expect to do it anytime soon.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top