Author | Topic: Re: complex filter DbSetFilter( macro) doesn't work | |
---|---|---|
Andreas Gehrs-Pahl View the complete thread for this message in: | Re: complex filter DbSetFilter( macro) doesn't work on Fri, 06 Nov 2015 18:52:08 -0500 Evert, >* build filter expression >cFilter:='left(CAT->rascd,1).in.getinput[1]' [...] >//DbSetFilter( {|| left(CAT->rascd,1).in.getinput[1] .and. INZ->jeugd=ja } ) >DbSetFilter( {|| &cFilter } ) >oError:args : >-> VALTYPE: C VALUE: left(CAT->rascd,1).in.getinput[1] .and. INZ->jeugd=ja >The line DbSetfilter( (|| left etc. works good. >The macro doesn't Even though you didn't post the actual Xbase++ Error Codes or Error Message, and didn't include a small, compilable demo program that shows the actual error, I assume that the error is caused by the ".in." statement in your "cFilter" string. I also assume that the ".in." is probably a substitute for the "$" operator, and will compile correctly, if pre-processed, for example when used directly in the DbSetFilter() function. If placed in a string, though, as you do in the code above, it wouldn't be pre-processed and replaced with a "$", and would then cause a runtime error during Macro compilation. If the ".in." operator is actually part of the Clipper S87 syntax (and means what I assume it means: "Left Operand is contained in Right Operand"), then just replace it with the "$" operator anywhere in your code, and you should be fine. So, without more information or a working demo program that shows the error, there isn't much (more) that any one here can do to help you. Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas.GP@Charter.net web: http://www.Aerospace-History.net |