• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

How to add a default value Non-queried Paramter

Hi There...I'd like to add a defaut value to a non-queried parameter in Reporting Services 2005.
why that?

When the report opens I'd like to have this default value matched, so the user can run it without change report parameters or if needed change to a different value.

My Default non-queried values today are:
Yes -->Yes
No--> No
All--> <blank>
0
venanciop
Asked:
venanciop
  • 5
  • 5
1 Solution
 
planoczCommented:
Just go to the parameter properties and on the bottom right side click the radio button and then add you default data
0
 
idmedellinCommented:
Create a report parameter and define a default value for it (include All - Null)

Then in the Dataset definition use the parameter (@regestado):

SELECT     regid, regdescripcion, regcompania, regfechainicio, regfechafin, regtipo, regvalor, regestado, regwhere, regDestino
FROM         bonreglas
WHERE     (regestado = @Estado) OR
                      (@estado IS NULL)
report-parameter-1.png
report-parameter-2.png
report-parameter-3.png
0
 
venanciopAuthor Commented:
This I know. I can choose non-queried and it has a field to add a value.

So what should I add there? I'd like ti to show All as a dafult, remembering my non-queried values are:

Yes -->Yes
No--> No
All--> <blank>
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
venanciopAuthor Commented:
To better explain. What should I add in the blank field in the screen?


Tks & Brds,
Felipe

 Report Parameter Report Parameter
0
 
venanciopAuthor Commented:
I'd like the dafault Lable to appear here. Dafault Lable not appearing
0
 
idmedellinCommented:
For All, replace null for any text (like 'AllĀ“)

and in the where:

WHERE     (regestado = @Estado) OR
                     (@estado = 'All')

Then in the Non-queried field write the word All
0
 
idmedellinCommented:

WHERE     (regestado = @Estado) OR
                     (@estado = 'Todos')

report-parameter-4.png
0
 
venanciopAuthor Commented:
idmedellin,

Today my query is:

IN_POLITiCO_EXP LIKE (case when @PEP = '' theN IN_POLITiCO_EXP else @PEP end)

You mean chaging it to:
IN_POLITiCO_EXP =  @PEP or @PEP 'Todos'

gracias,
Felipe
0
 
idmedellinCommented:
The '' means null?

If true, replace it with
IN_POLITiCO_EXP =  @PEP or @PEP 'Todos'

0
 
idmedellinCommented:
Sorry for an syntax error i forget the '='

IN_POLITiCO_EXP =  @PEP or @PEP = 'Todos'

0
 
venanciopAuthor Commented:
Excellent mate
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now