Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing values along with nulls

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
0
0
GB
Hi all,

I'm relatively new to Reporting Services so bare with me!

I am trying to us a parameter upon my report. This parameter does not have to be filled in by the user.

In the field that the parameter is running upon there are both NULLS and values. When the user enters nothing into the parameter I want all records to be shown (including NULLS)... However, at the moment I am only getting records with a value, no NULL records are showing up.

I am using the following critera in my query parameter:
Code:
LIKE '%' + @ContStr + '%' OR @ContStr IS NULL

Can anyone advise as to how I can get this working?!
My report parameter is set to 'Allow null values' and 'Allow blank values'.

Thanks in advance,

Woody
 
Good luck in finding out! I just started using report services today and have a similar problem.

I have optional integer parameters to a stored procedure that supplies the report data.

From the query analyzer, I do this:

exec dbo.myproc NULL, NULL

I get records back.

From reporting services, I've tried the following values for my integer parameters (that are set to allow null values):

''
NULL
null
nothing
<NULL>
<null>
<Blank>

and I've just left it blank.

Nothing works!

Help!

From
I cannot get it to work.



David Wendelken
 
Ok. I found a work-around.

There are two parameter screens. One you can see from the data tab, and one you can right-click to get to from the layout tab. You want the parameter screen from the layout tab.

On that screen, check to allow nulls.

The run query on the data tab still won't work, God bless'em.

But, the report will run in preview mode, and present a checkbox to mark if you are supplying null as a value.

David Wendelken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top