on 10-14-2014 2:44 AM
I have a user ID as input prompt in oracle store procedure which I need pass from CR.
I am capturing the logged in user by CurrentCEUserName() and populating the input prompt with this value.
Issue is the user ID input prompt is editable and user can change the user ID.
I want to either make user ID prompt read only or not show in prompts list but behind the scene populate with logged in user and pass it to store procedure.
I am using CR2013/ CR enterprise 4.1
Vishal
Hi Vishal,
Here's what you need to do:
1) Create a blank report
2) Create a formula called @User with this code:
CurrentCEUserName
3) Insert the report that points to the Stored Procedure as a Subreport in this report and place it on the Report Header
4) Suppress all sections on the Main Report except the Report Header
5) Right-click the Subreport > Change Subreport Links > Move the @user formula to the pane on the right > From the drop-down on the left that says 'Subreport parameter field to use', choose the corresponding user Prompt.
This way, you won't be prompted for the User Prompt and it should be passed to the Stored Proc behind the scenes.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BTW, I have used this technique quite successfully with one of my large clients. The only problem with it is that you can't have a subreport within a subreport, so you need to be careful about how you plan your reports. If your requirements are such that you'll need more than one subreport, you'll need to plan the report so that you can make them all a part of the main report because you can't "nest" them.
-Dell
doing this i am loosing the seamless integration.
eg.
when I run the main report which has the sub-report(calling SP and has entire report formatting) it doesnt have the left group tree navigation which i was expecting to show from sub report.
Also i loose all formatting done in sub report and all data is getting distorted.
I also have to click on main report once and then the sub report loads..
This doesn't seem to work for my need.
Scenario - my .net screen where user logs in and enters all prompts, then .net along with all entered params also captures logged in user and passes all to CR via open doc.
Issue - if the report is launched from BI lunchpad then the user ID prompt is editable. I have captured and populated the user ID prompt but issue is its editable so I was thinking to find some way either to hide it or make it read only.
If you can use a viewer for this, one of the 3rd-party Crystal Report viewers listed at http://kenhamady.com/bookmarks.html provides that functionality.
By naming a parameter in a certain way, the parameter becomes read only and is always set to the current windows User ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.