Solved

How to add a default value Non-queried Paramter

Posted on 2010-11-25
11
381 Views
Last Modified: 2012-06-27
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
Comment
Question by:venanciop
  • 5
  • 5
11 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 34213693
Just go to the parameter properties and on the bottom right side click the radio button and then add you default data
0
 
LVL 5

Expert Comment

by:idmedellin
ID: 34213709
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
 

Author Comment

by:venanciop
ID: 34213725
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
 

Author Comment

by:venanciop
ID: 34213741
To better explain. What should I add in the blank field in the screen?


Tks & Brds,
Felipe

 Report Parameter Report Parameter
0
 

Author Comment

by:venanciop
ID: 34213748
I'd like the dafault Lable to appear here. Dafault Lable not appearing
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 5

Expert Comment

by:idmedellin
ID: 34213759
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
 
LVL 5

Expert Comment

by:idmedellin
ID: 34213785

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

report-parameter-4.png
0
 

Author Comment

by:venanciop
ID: 34213851
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
 
LVL 5

Accepted Solution

by:
idmedellin earned 500 total points
ID: 34213871
The '' means null?

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

0
 
LVL 5

Expert Comment

by:idmedellin
ID: 34218144
Sorry for an syntax error i forget the '='

IN_POLITiCO_EXP =  @PEP or @PEP = 'Todos'

0
 

Author Closing Comment

by:venanciop
ID: 34218275
Excellent mate
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now