Showing results 1 to 3 of 3

Thread: Report Syntax

  1. #1
    Join Date
    30.07.2014
    Posts
    19

    Rotes Gesicht Report Syntax

    Hi, Not sure if this is the correct forum for this....

    Basically i need to display either a blank string or a value in a cell on a report if the value of a certain variable is a certain value.

    So i have two arrays (both of type INT)

    1.Cell Status[1..69]
    2.Cell Weight[1..69]

    if the Cell Status(x) is <> 0 then we need to display the cell weight.
    if the Cell Status(x) is = 0 then we need to display"-"

    Attached is what i have now that always displays the value of weight. Is it possible to do what i require?

    Clearly i can do this in the PLC and change the arrays to strings but that would involve re-engineering of allot of other screens....

    thanks

    David
    Attached Thumbnails Attached Thumbnails Capture.JPG  

  2. #2
    Join Date
    30.05.2007
    Posts
    105

    Default Re: Report Syntax

    Hello,

    Yes this can be done with the 'if' function.

    You would read out in on cell [A1] the value of the variable like you do already.
    Then use on a cell e.g. next to in [B1] the if function:

    if
    The if(exprTest,valTrue,valFalse) function provides the content of valTrue (value or string), if the argument is exprTest TRUE, otherwise the content of valFalse. It is possible to nest if functions, for example by implementing and-links.

    Syntax: =if(A1=0,"-",A1)

    if(exprTest,valTrue,valFalse)

    Markus
    Last edited by markusw : 2nd April 2015 at 14:12

  3. #3
    Join Date
    30.07.2014
    Posts
    19

    Default Re: Report Syntax

    Thanks for that, it is now working

Similar Threads

  1. Syntax for referencing values
    By bsneddon in forum zenon Supervisor
    Replies: 3
    Last Post: 12th May 2014, 11:00
  2. Replies: 9
    Last Post: 20th April 2011, 18:30

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •