How filter several registers in sections

DarkHorseDarkHorse Member Posts: 389
edited 2008-04-23 in Navision Attain
Hello everybody, I've the following code in a report:

IF
("Gen. Prod. Posting Group"='001') AND
("Entry No."<>56920) AND
("Document Type"="Document Type"::" ")
THEN
BEGIN
CurrReport.SHOWOUTPUT(FALSE);
contador:=contador-1;
END;

But, on Entry No. section I want to put several entry numbers but I can't, I don't know what is the condition; on DataItemTableView I can put for example 56920&<>58756&<>57486 but on report sections i doesn't run. How can I put serveral numbers?.
Many thanks in advance.

Comments

  • gerritgerrit Member Posts: 5
    Hello

    There are several solutions one of them can be re-arrange your code lines, for example:

    IF
    ("Gen. Prod. Posting Group"='001') AND
    ("Document Type"="Document Type"::" ")
    THEN
    BEGIN
    if ("Entry No."<>56920) AND
    ("Entry No."<>56921) AND
    ("Entry No."<>56922)
    then
    begin
    CurrReport.SHOWOUTPUT(FALSE);
    contador:=contador-1;
    end
    END;

    Probably there are more efficient ways but this one popped-up when i looked at your code.

    Gerrit
  • DarkHorseDarkHorse Member Posts: 389
    Thank you; I already had prove it, but it miss two (( on the code; like this:
    IF
    ("Gen. Prod. Posting Group"='001') AND
    ("Document Type"="Document Type"::" ")
    THEN
    BEGIN
    if (("Entry No."<>56920) AND
    ("Entry No."<>56921) AND
    ("Entry No."<>56922))
    then
    begin
    CurrReport.SHOWOUTPUT(FALSE);
    contador:=contador-1;
    end
    END;

    Thank you very much for your help.
  • i4tosti4tost Member Posts: 208
    i will suggest to use IN instead of writing so many and
    so if sentence will be:
    if NOT ("Entry No." IN [56920,56921,56922]) then
Sign In or Register to comment.