Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to add a default value Non-queried Paramter

Posted on 2010-11-25
11
389 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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
 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
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…

840 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