Thursday, March 29, 2012

Formula Issue

Thanks in advance for any help.
I am spoofing rows to force an X # of rows in a table, which is working
well. However, the spoofed rows are causing an error with the formula
below.
=cstr(iif(Fields!ServiceEnd.Value.ToString = "", " ",
cstr(DatePart("m", Fields!ServiceEnd.Value))))
Without the formula, the rows have no data and no error. Any
suggestions?
Thanks,
MorganNot quite sure what yo're trying to do but might one of these formulas work:
=Iif(IsDate(Fields!ServiceEnd), cstr(DatePart("m",
Fields!ServiceEnd.Value)), "")
OR
=Iif(IsNothing(Fields!ServiceEnd), "", cstr(DatePart("m",
Fields!ServiceEnd.Value)))
HTH
--
Magendo_man
Freelance SQL Reporting Services developer
Stirling, Scotland
"Morgan" wrote:
> Thanks in advance for any help.
> I am spoofing rows to force an X # of rows in a table, which is working
> well. However, the spoofed rows are causing an error with the formula
> below.
> =cstr(iif(Fields!ServiceEnd.Value.ToString = "", " ",
> cstr(DatePart("m", Fields!ServiceEnd.Value))))
> Without the formula, the rows have no data and no error. Any
> suggestions?
>
> Thanks,
> Morgan
>|||Thank you.
A slightly modified version of your suggestions seemed to do the trick.
=iif(IsDate(Fields!ServiceBegin.Value), Day(Fields!ServiceBegin.Value),
"")
magendo_man (donotspam) wrote:
> Not quite sure what yo're trying to do but might one of these formulas work:
> =Iif(IsDate(Fields!ServiceEnd), cstr(DatePart("m",
> Fields!ServiceEnd.Value)), "")
> OR
> =Iif(IsNothing(Fields!ServiceEnd), "", cstr(DatePart("m",
> Fields!ServiceEnd.Value)))
> HTH
> --
> Magendo_man
> Freelance SQL Reporting Services developer
> Stirling, Scotland
>
> "Morgan" wrote:
> > Thanks in advance for any help.
> >
> > I am spoofing rows to force an X # of rows in a table, which is working
> > well. However, the spoofed rows are causing an error with the formula
> > below.
> >
> > =cstr(iif(Fields!ServiceEnd.Value.ToString = "", " ",
> > cstr(DatePart("m", Fields!ServiceEnd.Value))))
> >
> > Without the formula, the rows have no data and no error. Any
> > suggestions?
> >
> >
> > Thanks,
> >
> > Morgan
> >
> >

No comments:

Post a Comment