Solved

Default text value for parameters in SSRS 2008

Posted on 2010-09-23
10
876 Views
Last Modified: 2012-06-21
Hi,

This looks like a dump question, but I have spent time trying to figure that out.

I want the parameter to show (ALL), as a default value in the unit parameter!

I tryed ="ALL". but for some reason it didn't work!
pic1.JPG
pic2.JPG
0
Comment
Question by:alcsoft
[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
10 Comments
 
LVL 29

Expert Comment

by:sammySeltzer
ID: 33749030
Click on Fx and enter this as experssion to see what happens.

[Regions].[RegionsDesc].[All]

change to your own needs
0
 

Author Comment

by:alcsoft
ID: 33749206
This one will pull the value of the fiels [ALL], I want a static string "ALL"
0
 
LVL 9

Expert Comment

by:sureshbabukrish
ID: 33752412
if you give default value as 'ALL', this will show only when you do not pass any values to the report.
while specifying the values , if you key in [ALL], then also it won't work

what you have to do is, use a query to provide list of values for the parameter filter as shown below

select 'ALL'
union all
select StateName from State

use this to populate the filter and then set ALL as default value
0
Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

 

Author Comment

by:alcsoft
ID: 33753703
I tried 'ALL' as a default value in the box that you see in the pic2 and it did't work!
This box is free text field, I might go with your code if it is drop down menue!

So basically I want a text box have ALL as a default value and if the user want to change it, he will delete (ALL), and write down something like (mile)!

I know in MS2005 I can set such default value using ="ALL"

But here for some reason it won't work!

0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 33859203
I support the suggestion made by suresh, but I would add an ID to the query.  I assume that the units are coming from a database table, right?  And in a normalized structure, this table would contain a numeric identifier.  This ID will then be your parameter Value, while the Name field is the parameter Label.

See code for a possible source query for your parameter (adapt to your table/field names).

Your default should then be set to -1.
select UnitID, UnitName
from UnitTable
union all
select -1, '<ALL>'

Open in new window

0
 

Author Comment

by:alcsoft
ID: 33993392
Please I am using a normal text Box, it is not a drop down menue!

I want to have one value!! which is "ALL"
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 34019202
I see, that shouldn't be too much trouble to get working.  Instead of typing ="All", just type the value that you want, for instance All (without any quotes or equals sign).  That should work!
0
 

Author Comment

by:alcsoft
ID: 34070491
Yes this is what I want.. I knew it is not hard job.... it is just related to the data syntax!
Microsoft keep changing the syntax!!!
Thanks ValemtionV
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

738 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