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

Setting Database Location 1

Status
Not open for further replies.

Ridyen

Programmer
Jun 9, 2005
95
0
0
US
We have a report that required a Table of Contents that used the method decribe in the following link:
This method results in the use of a couple of sub-reports and some pretty intersting Crystal code. One feature that is used is the use of the COMMAND feature when adding a database to the report.

Now to the problem. When attempting to repoint the report to our production servers using the SET DATABASE LOCATION... feature I cannot figure out how you repoint the SQL in the COMMAND to the new server.

Since the report is relatively complex with a couple of sub-reports I created a simple report (no subreports) that also used the COMMAND feature and could not get that to point to another DB or update the command in any way. What am I missing?
 
I have also used the TOC in a report and we moved it from staging to live without any problems and they were using different servers.

As long as you have re-created the toc table(s) in the new database and given yourself read/write access permissions it should all work.

Its not the add command thats writing to the tables its the LinkMaker formula. The add command is just deleting entries in the table and then selecting everything from the table. so providing you have set the location for the main report and re-created the the toc table it should all work fine.

Let me know how you go with this though.

HTH

-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
Well I am still uncertain as to what was going on. As I indicated in my first post, I tried this with a couple of different reports that both contained a "command". I know that in my test case that the target table existed but it still failed. Without a great deal of effort I cannot prove that the TOC table existed in my target database.

The bottom line is that I tried this again today using the original report and the SET DATABASE LOCATION... worked first try. Darn gremlins if you ask me.
 
To be honest I did have a bit of trouble initially with the TOC tables, in my case I had to have 2 of them, which was a double headache but I put this down to teething problems, and being the first time i've had to do something like that.

I think it can be temperamental at times.

Let me know if your still having trouble and I'll move mine over to a different database and sort of document it and let you know the results, but I would definately make sure the table is set up in the DB properly with all the access rights.

HTH


-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
Have you got an example of the code? I'm trying to repoint reports designed in CR10 and attached to VB6 as dsr's.
I can't find anything to repoint that works.
I cant get a lovely ADO recordset working, and that repoints, but the recordset wont attached to the reports. And the reports have up to 3 parameters required in each.

Thanks for any pointers.
 
Hey adale

There was no code per say with my problem. Mine was a stand along Crystal Report that was simply a scheduled job on our Crystal Enterprise server. All I had was a darn .RTP file that refused to allow me to change the database with the SET DATABASE LOCATION function of Crystal. It does however sound like your problem is somewhat similar in that you are attempting to repoint and nothing happens. As I stated in my Aug 29 post, I simply tried again the following day and it magically worked. Sorry I don't have a better answer for you.

Now I have a dumb question. What do you mean "attached to VB6 as dsr's"? What is a 'dsr"?

 
Check out my FAQ on setting database location at runtime w/VB6: faq768-5374

-dave
 
After days of pulling out what hair hasn't already fallen out from the stress of the impending UAT date, your code is so welcome that I might have to go out and celebrate.

Thankyou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top