[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to add a default value Non-queried Paramter

Posted on 2010-11-25
11
Medium Priority
?
398 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
[X]
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
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
In this article I will describe the Copy Database Wizard 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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

650 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