• Function OrdConSet ?

    From Otto Haldi@21:1/5 to All on Thu Mar 2 07:39:18 2023
    Hello
    I have a problem using the OrdConSet() function.
    In fact, in my "do while" loop "endo", I check if all the following conditions are respected. Here is my filter:
    if LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat .and. LIEFD->MENGE>=10 .and. !Empty(LIEFD->FAK_DATUM)
    ....
    etc
    Question: is it possible to do this with the OrdConSet() function?
    I have already tried this with the following filter (same address number and same year):
    OrdCondSet( "LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr" ) OrdCreate( "TMP_LIEF", , "Str(_FIELD->LS_NR,6)")
    LIEFD->(DbGoTop())

    However when I execute my loop there is no record!
    I wanted to test this way of working to see if it would make my report run faster.
    Thanks in advance for your help.
    Otto

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Thu Mar 2 17:15:47 2023
    Il 02/03/2023 16:39, Otto Haldi ha scritto:

    Hello
    I have a problem using the OrdConSet() function.
    In fact, in my "do while" loop "endo", I check if all the following conditions are respected. Here is my filter:
    if LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat .and. LIEFD->MENGE>=10 .and. !Empty(LIEFD->FAK_DATUM)
    ....
    etc
    Question: is it possible to do this with the OrdConSet() function?
    I have already tried this with the following filter (same address number and same year):
    OrdCondSet( "LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr" )

    Try this:

    OrdCondSet( "LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) ==
    vJahr", { || LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) ==
    vJahr } )

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Otto Haldi@21:1/5 to All on Thu Mar 2 08:36:28 2023
    Thank you, work well and it's very fast!
    Can you help me for the complete Filter:
    LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat .and. LIEFD->MENGE>=10 .and. !Empty(LIEFD->FAK_DATUM)

    Le jeudi 2 mars 2023 à 17:15:48 UTC+1, Enrico Maria Giordano a écrit :
    Il 02/03/2023 16:39, Otto Haldi ha scritto:

    Hello
    I have a problem using the OrdConSet() function.
    In fact, in my "do while" loop "endo", I check if all the following conditions are respected. Here is my filter:
    if LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat .and. LIEFD->MENGE>=10 .and. !Empty(LIEFD->FAK_DATUM)
    ....
    etc
    Question: is it possible to do this with the OrdConSet() function?
    I have already tried this with the following filter (same address number and same year):
    OrdCondSet( "LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr" )
    Try this:
    OrdCondSet( "LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) ==
    vJahr", { || LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) ==
    vJahr } )

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Thu Mar 2 21:29:53 2023
    Il 02/03/2023 17:36, Otto Haldi ha scritto:

    Thank you, work well and it's very fast!
    Can you help me for the complete Filter:
    LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat .and. LIEFD->MENGE>=10 .and. !Empty(LIEFD->FAK_DATUM)

    OrdCondSet( "LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) ==
    vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat .and. LIEFD->MENGE>=10
    .and. !Empty(LIEFD->FAK_DATUM)", { || LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat
    .and. LIEFD->MENGE>=10 .and. !Empty(LIEFD->FAK_DATUM) } )

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Otto Haldi@21:1/5 to All on Thu Mar 2 14:34:53 2023
    It's fantastical. It's really fast
    The command line is really complex. I don't understand why you have to write the selection twice? once between the quotation marks and once between the {}
    Once again a big thank you.

    Le jeudi 2 mars 2023 à 21:29:55 UTC+1, Enrico Maria Giordano a écrit :
    Il 02/03/2023 17:36, Otto Haldi ha scritto:

    Thank you, work well and it's very fast!
    Can you help me for the complete Filter:
    LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat .and. LIEFD->MENGE>=10 .and. !Empty(LIEFD->FAK_DATUM)
    OrdCondSet( "LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) ==
    vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat .and. LIEFD->MENGE>=10
    .and. !Empty(LIEFD->FAK_DATUM)", { || LIEFD->ADR_NR == vAdrNr .and. Year(LIEFD->FAK_DATUM) == vJahr .and. Month(LIEFD->FAK_DATUM) == vMonat
    .and. LIEFD->MENGE>=10 .and. !Empty(LIEFD->FAK_DATUM) } )
    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Fri Mar 3 09:55:16 2023
    Il 02/03/2023 23:34, Otto Haldi ha scritto:

    It's fantastical. It's really fast
    The command line is really complex. I don't understand why you have to write the selection twice? once between the quotation marks and once between the {}


    You can use the command the is simpler:

    INDEX ON <key> TO <file> FOR <condition>

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)