Send Null value in a parameter

ckb (4 posts)
March 4, 2010 07:18 AM
Accepted Answer

Hello,

We are wanting to send a null value to a report parameter from the command line.  Is there a way to do this?

Thank you very much in advance!

J.D. Staff (46 posts)
March 4, 2010 08:23 AM
Accepted Answer
To pass a null value, use the string "<NULL>". I think this only works for stored procedure parameters, because regular Crystal Reports parameters don't accept null values. For optional parameters (supported in recent versions of Crystal Reports) use an empty string ("") instead.
ckb (4 posts)
March 4, 2010 09:10 AM
Accepted Answer

I tried "<NULL>" and just <NULL>, but I get the error:

Error: Failed to set parameter "@accntNum" to "<NULL>": Cast from string "<NULL>" to type 'Double' is not valid.

When I try "", it does not send the NULL on to SQL. 

Any other suggestions? 

J.D. Staff (46 posts)
March 4, 2010 09:28 AM
Accepted Answer
What version of Report Commander are you using? I think the null support was not added until version 1.2, or maybe even slightly after that, so you should be using the latest version (1.4).
ckb (4 posts)
March 4, 2010 09:32 AM
Accepted Answer
We are using Version 1.2 build 103 :(
J.D. Staff (46 posts)
March 4, 2010 09:36 AM
Accepted Answer
Then you need to install version 1.4 from the download page. The license you have already will work for version 1.4.
ckb (4 posts)
March 4, 2010 09:39 AM
Accepted Answer
Yes, but then we have to test to make sure everything will work the same with the new version.  We run a lot of production reports using report commander.  Or, can I have two different versions residing on the same server?
J.D. Staff (46 posts)
March 4, 2010 10:03 AM
Accepted Answer
You cannot have 2 different versions of Report Commander on the same computer.

Replies are disabled for this topic.