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

Overwriting CR SET LOCATION within VB

Status
Not open for further replies.

marabou

IS-IT--Management
Jan 12, 2001
86
GB
Hi,
I was wondering if it is at all possible to set the location of a report within VB code, so as ignoring development location. Obviously I know how to reset location(s)within CR, but does everybody when implementing finished apps have to go in and reset the reports location within CR, is there an way of getting the code to overwrite whatever CR is looking at.

I would appreciate anybody's ideas on this.

Thanks in advance
 
Hey hey,
I know what your talking about an dI am currently wrestling with this in a very large project myself that needs to be completed if anyone knows of a command or work around for this problem please post it here.

I am to looking fora way to overwrite the CR location from within VB.

Thanks,
Mike Spinosa
Spindawg
 
I've always:

1. Stripped off the server name in Set Location
2. Done a .SetLogonInfo or .LogonServer in VB

and not had any problems. As long as the schema of the test db and the production db match up for the tables, views and stored procs you are using.
 
balves,

Sounds great and sorry to probe you for more information, but could you further define "stripping off" the server name in set location we immediately saw what you were saying would work but not quite sure what you mean in stripping it off if you could be more detailed that would be awesome.

We can't get rid of the server name persay in the set locations area. we are using CR 8.0.

Thanks,
Mike Spinosa
 
I do a set location on each table in the report and any sub-reports and change the location from "server.dbo.tablename" to just "dbo.tablename".

If you are diligent and do a .SetLogonInfo or .LogonServer to each report and every subreport to the production server, then you should not have to fiddle with the Set Location.

However, if you have one main report and one sub-report, and you do ONLY a .LogonServer to the main report, and the location of the tables on the sub-report are "testserver.dbo.tablename" then you're in trouble.

So, to sum up, I prefer to strip out the servername of all tables in all reports and sub-reports and do ONE .LogonServer or .SetLogonInfo to connect to the report, rather than a lot of .LogonServer(s) to make sure that all of the tables in the report and sub-report and hitting the right database.
 
Balves,

thanks so much man, me and my comrade didn't realize that it would be legal to do it like that in CR(not CR guru's).

It worked great and appreciate that further explanation of what you meant.
Post here with any problems you may have, if we can help. We will.

Thanks,
Spindawg, and friends.
 
That sound's great, but unfortuanately I am using ODBC, to SQL Server 2000, which means there isn't any log on info to strip out the server name. I am also using a database which has a completely different name to the one at the client site, anybody got any ideas, or is that impossible?

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top