cancel
Showing results for 
Search instead for 
Did you mean: 

Help with isnull funtion

Former Member
0 Kudos

HI, i am new to crystal and i have a little problem with isnull function, what i want to do is check to see if a value is null if it is then replace this with the value in the parameter for example in SQL i would do this

decalre @date datetime

set @date =getdate()+1

select date_col,col2,col3

from table where isnull(date_col,@date)=>getdate()

does anyone know how i do this in crystal here is what i have tried

( >={?From} or isnull( then {?from} else ) >={?From}

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try

(If >={?From} or isnull( ) then ?? Need date field and operator here?? {?from} else >={?From})

Wrapped in () so that it can be used with other filters/clauses.

Ian

Former Member
0 Kudos

HI Ian

Thank you for that, still didnt work think i will have to rethink my datasource adn use a SP to return the data thanks anyway

Former Member
0 Kudos

If all you want is this

select date_col,col2,col3

from table where isnull(date_col,@date)=>getdate()

Add table to report

in select enter

date_col >= currentdate

if date_col is actually a datetime then use

date(date_col )>= currentdate

Ian