Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
shm
Yak Posting Veteran
86 Posts |
Posted - 2009-02-16 : 05:46:37
|
hiin the Static report layout i have col which date datatype in that some row there is null for other rows there is a date value,when i gave in the expression as cdate(col).tostring("dd-mmm-yyyyy")for the null row the data will come something like this as 01-jan-0001it should display null only why it is coming like that?i want the date format to be changed as 01-jan-2009 like this... |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-16 : 06:33:32
|
use a conditional expression likeIIf(Fields!datefield.value is nothing,Nothing,formatdate(...)) |
|
|
shm
Yak Posting Veteran
86 Posts |
Posted - 2009-02-16 : 07:13:24
|
hithank u very much it is working i tried like this IIF(Fields!datefield.value <>0,formatdate(...),Nothing) but it gave error.. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-16 : 09:10:17
|
welcome |
|
|
shm
Yak Posting Veteran
86 Posts |
Posted - 2009-02-26 : 23:55:10
|
hi i have a doubt in the report expression that isif i give in the expr=FormatNumber(MAX(IIF(Fields!TaskSimpleCompleted.Value=1,Fields!PerSimple.Value,nothing)),2)instead of nothing i shld dispaly 0 but if i give 0 then it is coming error if i give nothing then it is nt showing errori tried =FormatNumber(MAX(IIF(Fields!TaskSimpleCompleted.Value=0,0,Fields!PerSimple.Value)),2)this is also giving error so how i should write expr to get the value 0 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-02 : 13:20:40
|
try this=FormatNumber(MAX(IIF(Cint(Fields!TaskSimpleCompleted.Value)=1,Cint(Fields!PerSimple.Value),Cint(0))),2)also make sure PerSimple has no non numeric data present |
|
|
|
|
|
|
|