September 27, 2004 at 7:49 pm
Hi all,
Im having a bit of trouble with displaying a value in a text box when the parameter is null. Basically I have a text box with the following code
=iif( Parameters!Status.Value=1,"For All Closed Jobs",iif(IsNull([Parameters!Status.Value]),"For All Jobs","For All Open Jobs"))
IsNull does not seem to be a function as I get errors. Can someone please point me in the right direction.
Thanks,
Terry
September 27, 2004 at 10:17 pm
Not sure about Reporting Services, but IsNull() as a T-SQL function takes two arguments:
ISNULL (check_expression, replacement_value )
So it might be worth starting there. Check BOL for more details.
Regards
Phil
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
September 28, 2004 at 6:37 am
This looks like Access code. In Access you would use:
nz([Parameters!Status.Value],"") = ""
You could also use:
[Parameters!Status.Value] = NULL
September 28, 2004 at 7:19 am
you can try this format :
iif(isnull([Status]);"For All Jobs";iif([Status] = 1; "For All Closed Jobs";"For All Open Jobs"))
September 28, 2004 at 8:31 am
Terry,
In Reporting Services you need to use IsDbNull.
September 28, 2004 at 12:15 pm
Though VB and VBA don't handle nulls, if you are using Access VBA the solution is pretty simple. Just prepend a 0 to the NULL and then check for 0 (for ints). This is the easiest answer and works like a champ.
'For an integer
=iif( Parameters!Status.Value=1,"For All Closed Jobs",iif(cint("0" & [Parameters!Status.Value] ) = 0,"For All Jobs","For All Open Jobs"))
'For a string
=iif( Parameters!Status.Value=1,"For All Closed Jobs",iif([Parameters!Status.Value] & "" = "","For All Jobs","For All Open Jobs"))
September 28, 2004 at 7:52 pm
Hi All,
Thanks for the responses...but after much digging I found the solution to be as follows:
iif( Parameters!FromDate.Value is nothing .....
Im still cutting my teeth with designing reports in Visual Studio.Net.....Seems to me that normal everyday users who eventually want control of the report design process are DREAMING.
Regards,
Terry
September 28, 2004 at 9:56 pm
Hi ,Hi
Poor Developer Guy ,They are dreeming but to certain extent you can help them ,say for example adding filtering options to your report egeneration process.Better you see some ERP report screen.
Enormous data will lead to disaster
regards
john
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply