Sunday, March 11, 2012

"Override Default" button in Properties->Parameters section

I wrote a report in Visual Studio with some parameters that I gave default values to in the report definition. I deployed it out to the report server and when I look at the report Properties, Parameters section to see the default values. Instead of seeing all of the default values, I see a bunch of "Override Default" buttons. When you click the buttons, you get a blank text box in which to enter a new value.

Someone before me created a report with default values and the parameters section of that report has text boxes with the default values in them.

Does anyone know how to have the default values show up rather than those "Override Default" buttons?

Thanks.

Somebody must know what I am talking about...|||

I have a hard time believing no one knows about this...

Is my problem not clear? Somebody please ask a question if you don't understand!

|||

I know what you are talking about, but I don't think there is a setting to have it show the values.

Jarret

|||

That makes it seem like random behavior then, which is not really an acceptable explanation.

I'm looking at one report that was written a little while back that will show you the default values in text boxes you can edit, and then there's this other report that I just wrote that will only show you the "Override Default" buttons. When you click them, then you get editable text boxes, but it won't show you what the original default value was.

Is there anyone else out there that can take a stab at it please? Thank you.

|||

Hmmmm...

I just created a simple report with a default parameter and it showed the correct default value instead of the 'Override Default' button. Maybe it has something to do with which version of RS you created the report under (RS2000, RS2005 RTM, SP1, SP2) versus which version you're trying to view it under.

Like you, I have seen this before.

Jarret

|||

I think that it is not "random behavior". As I know the behavior is:

1. If default value isn't query-based and not an expression - you will see original default value

2. If default value isn't query-based but an expression - you will see "Override Default" button instead of expression result

3. If default value is query-based - you will see text "Query Based"

|||

Alright, now we're talking. This is the kind of answer I was looking for, someone who knows the behavior!

So in the past I have had the default values be expressions. For this particular report, I just plugged in numbers. However, I put them in the following format: =2.0. Would that be considered an expression instead of just a value?

|||

miguelito928 wrote:

Alright, now we're talking. This is the kind of answer I was looking for, someone who knows the behavior!

So in the past I have had the default values be expressions. For this particular report, I just plugged in numbers. However, I put them in the following format: =2.0. Would that be considered an expression instead of just a value?

I'm pretty sure you just have to select a default value in the parameters option. I can check when I get to work if you don't confirm this to be true until then Wink

Here's how I believe it works:

-> Add a new parameter called CategoryId, for example;

-> In the values list I'm guessing you'll retrieve them from a query that returns at least an Id and a Label;

-> In the option below the values list you have the option to add a default value, which can also be returned by a query.

Basicly what this 3 item list means is that let's imagin you have a query that returns these values:

1 - Meat

2 - Fish

3 - Fruit

It's a perfect query for your values list! Now, for the default value selection you would want it to be something like:

SELECT C.Id, C.Alias FROM Categories C WHERE C.Default = 1;

This query would return you the default category to use in your report parameter. Something like this:

1 - Meat

Best regards,

Ahkaru

|||

No, your post wasn't helpful at all. I'm not getting my default values from queries.

I am setting the default value of my parameter to "=2.0". This seems to be a non-queried expression, which would explain why I am getting an "Override Default" button instead of a text box with the value in it. The type of my parameters are floats by the way. I just noticed that the report written by someone else has strings and the default values are entered in without the equals sign in front.

So I decided to try and remove the equals signs and now it is showing that there are no default values. Is there no way to enter non-expression non-queried values from the Visual Studio report builder?

|||Ok, I get it to work if you leave all the default values blank and then fill them in through the Report Manager console after you deploy the report. The only way to deploy the report with default values is using expressions and putting equals signs in front, which causes "Override Default" buttons. Thank you to Andrey for his knowledge of the behavior.

No comments:

Post a Comment