Solved

How to add a default value Non-queried Paramter

Posted on 2010-11-25
11
386 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Suggested Solutions

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 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