Link to home
Start Free TrialLog in
Avatar of venanciop
venanciop

asked on

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>
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

Just go to the parameter properties and on the bottom right side click the radio button and then add you default data
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
Avatar of venanciop
venanciop

ASKER

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>
To better explain. What should I add in the blank field in the screen?


Tks & Brds,
Felipe

 User generated image User generated image
I'd like the dafault Lable to appear here. User generated image
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

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

report-parameter-4.png
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
ASKER CERTIFIED SOLUTION
Avatar of idmedellin
idmedellin
Flag of Colombia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry for an syntax error i forget the '='

IN_POLITiCO_EXP =  @PEP or @PEP = 'Todos'

Excellent mate