in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Null Value in Calculated Field

Last post 01-22-2008 10:44 AM by kenjha. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-11-2008 6:00 PM

    • kenjha
    • Not Ranked
    • Joined on 11-17-2006
    • Posts 2

    Null Value in Calculated Field

    I have a calculated date field in ReportDesigner (Ver 2.5.20072.239) with the following settings:

    Text = "IIf(IsNull(Max(dtmComp)),Null,Max(dtmComp))"

    Format = "M/d/yy"

    This works fine as long as there is a date in the underlying DB field.  However, if the DB field is null, the report displays the format string itself ("M/d/yy").  I've also tried making Format blank and adding the format in the Text formula but get the same result.  Is there a way to display the field as blank if there is no data?

  • 01-18-2008 5:59 AM In reply to

    Re: Null Value in Calculated Field

    Hello,

    In this scenario I would recommend you to keep Format field blank and use following script in text property-

    IIf(IsNull(dtmComp),"",Format(Max(dtmComp),"M/d/yy"))

    This should resolve the issue.

    -Dave Traister.

     

    <kenjha> wrote in message news:201056@10.0.1.98...

    I have a calculated date field in ReportDesigner (Ver 2.5.20072.239) with the following settings:

    Text = "IIf(IsNull(Max(dtmComp)),Null,Max(dtmComp))"

    Format = "M/d/yy"

    This works fine as long as there is a date in the underlying DB field.  However, if the DB field is null, the report displays the format string itself ("M/d/yy").  I've also tried making Format blank and adding the format in the Text formula but get the same result.  Is there a way to display the field as blank if there is no data?



    http://helpcentral.componentone.com/cs/forums/p/74022/201056.aspx#201056

  • 01-22-2008 10:44 AM In reply to

    • kenjha
    • Not Ranked
    • Joined on 11-17-2006
    • Posts 2

    Re: Null Value in Calculated Field

    Thanks, Dave.  That worked!

Page 1 of 1 (3 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.