Solved

SQL Server 2005 Report Parameters Settings

Posted on 2006-07-11
1
591 Views
Last Modified: 2008-03-03
Greetings,

When setting values in SQL Server 2005 Reporting parameter setting, how do you go about setting a multiple values where one of the values is NULL. For example:


select emp_name,title,emp_id
from emp
where emp_id=@emp_id



In this example I want to have the luxury to select all values, including the values that are null in the emp_id field or select only the null values in the emp_id field. When setting this up in SQL Server 2005 Reporting parameter section, it allows you to set each value separately but I want to know what is the proper syntax to set a value to NULL in SQL Server 2005 Reporting parameter section?
0
Comment
Question by:Omega002
1 Comment
 
LVL 14

Accepted Solution

by:
simon_kirk earned 250 total points
ID: 17081908
Could you not change your SQL statement to convert the NULL before passing the data to RS?

e.g.

select emp_name,title,COALESCE(Cast(emp_id AS VARCHAR),'No Value')
from emp
where COALESCE(CAST(emp_id AS VARCHAR),'No Value')=@emp_id

or

select emp_name,title,COALESCE(emp_id,0)
from emp
where COALESCE(emp_id,0)=@emp_id
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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