If statement in a report

I have two fields, a and b. If a is empty and b is not I want to write b, if b is empty and a is not I want to write a, if both are not empty I want to write "a / b".... I don't know how to do this :( ... Thanks!

Best Answers

Answers

  • archer89archer89 Member Posts: 337
    If (a='') and (b <>'') then
    Message (b)
    Else if (b='') and (a <>'') then
    Message(a)
    Else if (a<>'') and (b <>'') then
    Message (format (a/b));
    best regards
    Franz Kalchmair, MVP
    Alias: Jonathan Archer

    please like / agree / verify my answer, if it was helpful for you. thx.
    Blog: http://moxie4nav.wordpress.com/
  • sharon95sharon95 Member Posts: 183
    archer89 wrote: »
    If (a='') and (b <>'') then
    Message (b)
    Else if (b='') and (a <>'') then
    Message(a)
    Else if (a<>'') and (b <>'') then
    Message (format (a/b));

    Not in a message but in a textbox of the report
  • sharon95sharon95 Member Posts: 183
    archer89 wrote: »
    You can save the result of the if Statement in a new global text variable and publish that variable in the report as value of the textbox.

    it's what I've already done ;) thank youuu!
  • archer89archer89 Member Posts: 337
    you're welcome. if you find my answers helpful, please set them to accepted. thx.
    best regards
    Franz Kalchmair, MVP
    Alias: Jonathan Archer

    please like / agree / verify my answer, if it was helpful for you. thx.
    Blog: http://moxie4nav.wordpress.com/
Sign In or Register to comment.