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!

Report error involving dynamic parameters and table prefix

Status
Not open for further replies.

eguthrie

Programmer
Nov 30, 2001
51
0
0
US
Hello. I've created a CRv11 report against data in an Oracle view. The report contains a dynamic parameter which uses a select query in a Crystal Command Object to provide a list of parameter values. Then I published the report to the Crystal Server.

We want the report query to be run by the user that is logged in (and not by the Oracle databse schema owner, which is "SW_MAIN."), so I modified the database configuration in the Central Management Console to use a custom database login: I changed the login information to my own oracle login and password, and then set the Table Prefix to "SW_MAIN." so that the data for the correct database schema would be selected.

When I run the report, I get an error that it can't find the datasource. I believe the problem is because the table prefix is not applied to the parameter's query at runtime.

If I remove the dynamic parameter, the report runs without error. So apparently the table prefix does get used for the main report query, but does not get applied in the case of the dynamic parameter query.

I tried replacing the parameter query in the command object by using a view instead, but I have the same problem.

Can anyone advise me on how I can fix this issue?

Thanks in advance,
Evelyn


 
Hi,
Create a synonym for the parameter's query target and grant that user read access to it - no prefix would be needed in that case.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi Turkbear,
I'm not sure what you mean by that. Can you explain it?
Thanks.
Evelyn
 
Hi,
In Oracle you can create alternate names for tables and Views that are simpler then the fully-qualified actual names ( like Schema.TableName) so for say SCOTT.EMP
you could enter:
Create synonym EMP for SCOTT.EMP;

See the following links for more info:


or


or




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Turkbear,
Thank you for your input, but I spoke to our head architect, and for reasons that haven't been really explained to me, we are not able to use synonyms.

So I still need to know if there is a way to implement the custom table prefix on dynamic parameters.

Thanks.
Evelyn
 
Hi,
I hate admins like that, at least there should be a reason.

Instead, try recreating the parameter's data table in the user's schema that is logging in.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top