Wednesday, March 28, 2012

Hide default values

Is there a way to hide my default values? If so, how?

If you mark the parameter as being an internal parameter it will not show up in the user display.

Simone

|||Thanks, how do I set it to an internal parameter?|||

The above works if you don't want it changed at run time. If you want to change it at run time then you only need to set the Hidden flag.

Simone

|||

Click Report - Report Parameters - select your parameter and check off either the Hidden or Internal check boxex under the Prompt section.

Simone

|||I dont see those boxes. I am running on 7.1. Does this make a difference?|||

If you are using RS 2000, then yes it is different. These are instructions for RS 2005. Try this article to see if it helps.

http://kylefinley.net/archive/2006/02/24/42.aspx

Simone

|||Hey Simone, This seems to be if I dont want to show the field at all. I think I should explain a little more. I needed to create a filter for one of my fields. So I created a report parameter and I was told to set the default to W. Them came back to me saying that they still want the default to be W but they dont want to see the W in the text box. I want to know how do I keep W as the default but not show it. Does this make sense? If so, can it be done?|||

I think I understand and I'm not sure if it is possible. You might be able to skip the default value and change your query so that it is filtered using 'W' if the parameter is null.

ex.

Code Snippet

Where field = CASE WHEN @.param = '' THEN 'W' ELSE @.param end

Simone

|||

First of let me say thank you so much for helping me with this. They keep comming back with different things and it is a bit frsutrating because I just dont know.

Is there a way I can just say bring me back everything with W initally? Like in the default put some type of expression that says go and get anything with W and bring it back.

|||

That is what the above expression will get you and it also allows the parameter to be set if the user decides they want something other than 'W'. On the first run it returns all records with the 'W' value. The parameter has no default value so it shows as nothing.

If you always need to bring back 'W', then I would suggest just adding it to you query that pulls the data. If I am misunderstanding what you are trying to get at, please let me know. Maybe you could post a sample of your data and a sample output.

Simone

|||Thank you sooooooooooooooooooooo much! |||

Real quick is this how it should look?

WHERE Field!IUC.Value(this is my field) = CASE When @.param = ' ' THEN 'W' ELSE @.param end

Do I put this in my query string?

No comments:

Post a Comment