Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7862819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:17:32+00:00 2026-06-02T23:17:32+00:00

I’m looking for a way to add a value to a parameter whose available

  • 0

I’m looking for a way to add a value to a parameter whose available values are retrieved from a simple query. I just started messing with SSRS today, I hope I’m not doing it all wrong.

Executing the following procedure from the report project (messy, I know):

CREATE PROCEDURE RAW_TIME_VAR
        @EMPLID as varchar(6) = NULL
,       @EMPLNAME as varchar(80) = NULL
,       @CHARGENO as int = NULL
,       @TYPE as varchar(8) = NULL
,       @STARTDATE as date = NULL
,       @ENDDATE as date = NULL
AS
Select * from DBO.RAW_TIME
Where   ([EMPL ID] = @EMPLID OR @EMPLID IS NULL)
AND     ([EMPL NAME] = @EMPLNAME OR @EMPLNAME IS NULL)
AND     ([CHARGE NO] = @CHARGENO OR @CHARGENO IS NULL)
AND     ([CHARGE TYPE] = @TYPE OR @TYPE IS NULL)
AND     [CHARGE DATE] Between @STARTDATE AND @ENDDATE

There are two datasets in the Report Project (I’m using VS2008 Business Intelligence Development Studio). One generated from the procedure above (RAW_TIME_DATASET), and the other a query from the same view to populate employee ID’s and names (NAMES):

SELECT DISTINCT [EMPL ID], [EMPL NAME]
FROM RAW_TIME
ORDER BY [EMPL ID]

I want to be able to populate the @EMPLNAME parameter with all employee names from the NAMES dataset while also being able to pass NULL by selecting value “All” in the parameter combobox. “All” can be passed by the query by using UNION, which places it in the combobox without it being in the View, but I cannot then pass it through the report as NULL. Errr… I hope this makes sense.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:17:33+00:00Added an answer on June 2, 2026 at 11:17 pm

    you are on the right track.

    If you check the report_data tab, you will see a parameters folder. Expand it and you should see all the parameter from your initial query. Right click the EMPLNAME parameter, select parameters properties, go to available values and do the following configuration:

    enter image description here

    also, on the general tab, mark the parameter to accept null values

    now, the trick is on the NAMES dataset. You have to select all the names, plus a row with a null value. There are a few ways of acomplish it, the easiest is add something like this to your query:

    union SELECT null as [EMPL ID], 'NULL' as [EMPL NAME]
    

    If you don’t, the report will complain that the parameter cannot be null.

    result (I only added 2 parameters for simplicity):

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.