March 15, 2005 at 8:20 am
Hi everyone,
This is my first post, but we moved from Fox Pro to MS Reporting Services VERY recently and we are needing a command in Reporting Services just like or similar to the IIF EMPTY command that we used daily in Fox Pro?
March 16, 2005 at 4:01 am
I don't know foxpro, but are you looking for this t-SQL function?
ISNULL ( check_expression , replacement_value )
March 16, 2005 at 5:53 am
Other possibilities to look at would be COALESCE in T-SQL, or IIF in VB.Net, using it to test for an empty condition.
Note that the Report Designer does not expose very much of the expression syntax that is available to you - nor does the help file give you very good pointers to it...
March 16, 2005 at 9:03 pm
Best alternatives in T-SQL are:
ISNULL ( check_expression , replacement_value )
OR
LEN(check_expression) = 0
You are going to miss Foxpro big time.
March 17, 2005 at 12:12 am
Where are you looking to use this IIF EMPTY command? In the report itself, or in an SQL statement?
You can use IIF in expressions within the report. For the SQL statement the options suggested above would be adequate.
--------------------
Colt 45 - the original point and click interface
March 17, 2005 at 4:26 am
well dear let me tell u boss
in report if u want to check any field that wheather its empty or Null u ve to use VB.NET syntax that is
=iif(field!value=nothing,"empty/Null,"have some value)
NOTHING is used instead of EMPTY OR NULL in reporting expressions
hope u got ur answer
take care
March 17, 2005 at 12:30 pm
If you are using IIF to fill an empty value in a select statement:
select
newField =
case
when isnull( origField, space(0) ) = space(0) -- this field is 'empty'
then newValue
end, ...
If you are just trying to find the equiv SQL for EMPTY you should use isnull or coalesce...
Hope that helps,
Robert
March 17, 2005 at 2:39 pm
WOW!
thanks everyone. I got LOTS of ideas and am writing something now using different statements/exressions.
Being new to Reporting Services, we have been doing a lot of experimenting. I am thinking about getting "The Hitchhikers Guide to to SQL Reporting Services".. reading reviews about that now!
Thanks again!
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply