Jan,

I had to do something like this before...
This worked for me, not sure if this helps...

QBR = thisDS.addRange(FieldNum(t, fieldA));

strRange = strfmt('((%1 == %3 && %2 == %4) || (%1 == %5 && %2 == %6))',
                      fieldstr(t, fieldA),
                      fieldstr(t, fieldB),
                      '100',
                      '200',
                      '500',
                      '700'));
QBR.value(strRange);

I think I found this somewhere on the technet site, I have translated my
use of it to your request. Believe it or not, I got something like this
to work. Hope this works at all for you, and that it helps you.

--Mike




-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Dahlsgaard Jan
Sent: Friday, January 20, 2006 4:34 AM
To: [email protected]
Subject: [development-axapta] OR criterias in query

Hi

I have a problem I can't solve, perhaps any of you have an idea.

I have a select-statement like this:

while select t
    where t.field1 == 1 &&
        ((t.fieldA == 100 && t.fieldB == 200) ||
        (t.fieldA == 500 && t.fieldB == 700))

How do I write this as a query instead ?

I have tried building the criterias in a string and supplied this as the
value (like in form address, datasource address, method
addQuerySalesTable), but can't get it to work properly. Any other ideas
?

Regards
Jan Stelsig Dahlsgaard
Fujitsu DK
       


[Non-text portions of this message have been removed]







Yahoo! Groups Links












SPONSORED LINKS
Computer part Programming languages Microsoft axapta
Support exchange


YAHOO! GROUPS LINKS




Reply via email to