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!

Crystal Reports and DSNs

Status
Not open for further replies.

ssudha

Technical User
Oct 14, 2002
62
IN
Hi all,

Suppose there are two Oracle dsns, dsn1 and dsn2 with different user id and password but pointing to same schema, how can we make the rpts independant of the schemas.

The problem is that the dsn info is stored along with the rpt file when seen in the "Set Location" option. This is prompting for userid and passwords at runtime.

Kindly suggest. The files are in production now.
 
What do you mean when you say that your two DSNs point to the same schema? There is nothing in a DSN that references any particular schema, unless you mean the schema of the default user id. And any user can access any schema given the proper database privileges.

Please explain further what your problem is. Are you trying to avoid login prompts by using different DSNs for different users?
 
Hi,
The problem is that the dsn info is stored along with the rpt file. Suppose I developed the rpts using dsn1 on a development m/c and rolled them out to a production m/c with dsn2 as the system dsn (I am talking about Oracle dsn here), the rpts are prompting for login info because they are probably looking for dsn1 info here.

Is there a way to completely make the rpts avoid storing dsn info apart from the function/sp/table?

Can you please explain?
 
Hi,

when you make a new Crystal Report you are asked for a data source; you specify a dsn then you are asked for login into a DB Schema, i.e. you are supposed to compile the prompt mask with values of userid/password/server.
Then you can keep on creating report. I don't think you will be able to leave your report free from connection information. You have to change the info stored into your SetLocation section, save the report and try again. If it doesn't work try to put into your program the connection info:

//cmd=connect
server=your oracle server...
userid0=...
password0=...

if you have more than a user try to add the following info:

userid1=
password1=

etc.


or something like that.

 
What version of CR you are using. If it is earlier than 9 you can remove the hard coded data source location path and make it universal. Your application's CR connection properties should take over the control and provide the appropriate login values with out prompt.
 
Unless you are running/viewing your reports from a seperate application, you are not going to be able to do this.(nbot that I know of anyway) The report is designed to store this information sans the password.

If you have a VB app, you could hardcode the logon information to supercede what is in the report. If not, then the user(s) will be propmpted for a log in since Oracle requires it.



Cheers,

SurfingGecko
Home of Crystal Ease
 
Hi All,
I am not using any VB. I am calling the reports using URL (unmanaged) from my app. Since the rpts are developed using dsn1, I created a dsn with the same name on the production m/c. Is it appropriate? I am using CR 8.5 developer and CE 8.0 for the Web Component server.
 
Having a DSN on the server with same name as the report was created against, would certainly be a nice solution if you can swing it that way.

Unmamaged reporting can be a bit of a pain for sure.

Cheers,

SurfingGecko
Home of Crystal Ease
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top