cancel
Showing results for 
Search instead for 
Did you mean: 

Make input prompt read only or hidden but pass the value to backend

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

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

DellSC
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

ido_millet
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

nope, cannot use any 3rd party.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vishal,

Edit your  parameter and set below options based on your requirement

See options in  below screen

Former Member
0 Kudos

This input prompt is created by Store Procedure so the options you mentioned don't seem to make any impact on visibility.