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!

Run Crystal Reports against several Databas users

Status
Not open for further replies.

dabde

Programmer
Sep 25, 2002
13
DE
I'm using CR10 and load the data via ODBC from an Oracle database. On that database we have several database users, let's say user1 and user2. The report gets created by another college. If I get the report, I select a view, which brings me the data. For that I have to go to "Database - Set Datasource Location" and have to open the ODBC on the lower area of the screen, select a database user (i.e. user1) and the view name. Afterwards I press the "Update" button. To avoid that I always load the data from user1, I want to remove user1 somehow. I didi it on the properties in the upper area of the window, no success. In CR 8.5 I just had to remove the user1 in front of the view. How can I do it with CR10? I also brought it with user1 to CE10 and selected "Prompt the user for database login when viewing". OK, I get the prompt, but although I enter user name and password for user2, the report gets created with data for user1. Where can I make the report flexible?
 
Sounds like you are talking about using a view which has the same name under different 'owners'.

You can create a SQL Command in CR10 with a parameter so that the Owner information is entered as a parameter:

select view1.field1, view1.field2
from {@owner}.view1
where blah


If you enter User1 when prompted for the @owner parameter, this sql will then be translated to:


select view1.field1, view1.field2
from User1.view1
where blah

Is that what you need?
 
Thanks for the hint. It seems to me, that this is the solution and this would mean, that you have another option in CR8.5 to handle this.
I'm sitting between the creator of the report and our clients, so I don't add the additional parameter by my own, but I forwarded it to the developer of the report. I'm optimistic.
- Thanks again! -
 
Sure, I think I got this hint a while back from this book - Crystal Reports 9 on Oracle, A.Harper.
I think it really has a lot of great ideas, if you are working in 9 or above, but even if you are not, the info on data drivers, etc. is pretty valuable. Good luck. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top