all groups > sql server reporting services > january 2005 >
You're in the

sql server reporting services

group:

Null Parameter


Null Parameter Elmer Miller
1/3/2005 2:41:00 PM
sql server reporting services:
How do you pass a set a parameter null from an expression (i.e. drill
through report)? I've tried null, nothing, System.DBNull; none of these
work.
Thanks.

RE: Null Parameter Randy Howie
1/10/2005 5:33:01 PM
I have the same question. Did you ever find a solution Elmer?

[quoted text, click to view]
Re: Null Parameter Randy Howie
1/11/2005 3:27:04 PM
Since I posted my question, I discovered that System.DBNull.Value does work
as a null (but System.DBNull alone does not).

This did not solve my problem, since null parameter value was not selected
in my target report, but I am convinced that is the correct method for
passing a null in an expression.

Randy Howie

[quoted text, click to view]
Re: Null Parameter Elmer Miller
1/11/2005 3:31:15 PM
No I haven't solved this one yet. I'm using a lame hack to work around. Set
the parameter to a special value that is then hard-coded to be treated like
null in the stored procedure. I'm glad I'm not the only one with the
problem. I'm sure there is a simple fix.

[quoted text, click to view]

Re: Null Parameter Randy Howie
1/11/2005 4:53:01 PM
Jeff,

I have seen that tip for passing a null via a URL, but I was referring to
passing the parameter via a "jump to report" navigation expression
(drillthrough).

Randy Howie

---------

[quoted text, click to view]
Re: Null Parameter Jeff A. Stucker
1/11/2005 5:42:15 PM
In the URL:

&paramname:isnull=true
--
Cheers,

'(' Jeff A. Stucker
\

Business Intelligence
www.criadvantage.com
--------------------------------------
[quoted text, click to view]

Re: Null Parameter Elmer Miller
1/12/2005 9:28:30 AM
I have also tried the System.DBNull.Value, but it doesn't work because
DBNull is of a different type. My parameter is a Date type and the
DBNull.Value causes an error:

The value you provided for the report parameter 'service_date' is not valid
for its type.

It should be this easy, but in this case type-checking is hurting us. I've
run into this situation before with Strong-typed datasets and in that case
you need to set a separate propterties and methods to handle nulls
(IsFieldNull() and SetFieldNull()). I'm sure there is something similar
going on here.

[quoted text, click to view]

Re: Null Parameter Elmer Miller
1/12/2005 10:04:14 AM
I found another workaround.
Instead of using 'Jump to report:' and setting parameters. Use 'Jump to URL'
and build the correct URL string with the param:null=true in it. It will
open up in a browser window (even when previewing)

[quoted text, click to view]

AddThis Social Bookmark Button