Hi,

I created a Class to print the report and used the Query to select and filter.

Thanks

lewickiw <[EMAIL PROTECTED]> wrote:

    Quite right, you cannot do this using standard Axapta ranges on a
query in AOT. Still there is a way to achieve this with a little bit
of coding using the little trick shown below. Basically you can add
(almost) any condition possible in a select statement in X++ to your
Query object by adding a range to RecId field with value containing an
X++ statement like the one show below. Some restrictions apply.

    QueryBuildRange statusRange;

    // let yourQuery be the query you want to return sold, deducted
    // purchased and received transactions 
    statusRange = yourQuery.dataSourceTable(tablenum(InventTrans)).
        addRange(fieldnum(InventTrans, RecId));
     statusRange.value(
strfmt('((statusIssue==%1)||(statusIssue==%2)||(statusReceipt==%3)||(statusReceipt==%4))',
            StatusIssue::Sold + 0, StatusIssue::Deducted + 0,
            StatusReceipt::Purchased + 0, StatusReceipt::Received + 0));

    The "+ 0" bit is about converting enum to int.

--
wlewicki


--- In [email protected], "James Flavell" <[EMAIL PROTECTED]>
wrote:
> you should realise any trans can only ahve status in either issue or
receipt
> but you are basically telling the report to find trans that has value in
> both (i.e. criteri are AND together)

> basically you will need to run the report 2 times I think



>
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Hemant
> Sent: 07 July 2005 13:33
> To: [email protected]
> Subject: [development-axapta] Range criteria on InventTrans
>
>
> Hi There,
>
> I created a Auto Report and I want to select only transaction where
> the StatusIssue has Issue type of "Sold" or "Deducted" and I also want
> to select transaction where StatusReceipt has Receipt type
> of "Purchased" or "Received", but when I use these in the Query
> screen , the report doesn't print, I know because of the criteria,
> since I tried giving only one criteria each in Status Issue and
> receipt I am able to see the information on the report. I would
> appreciate your suggestions.
>
>
> In the Query
>
> Status Issue    =  "Sold", "Deducted"
> Status Receipt  =  "Purchased", "Received"
>
> Since the condition is getting compunded I think the report is coming
> out empty.
>
>
>
>
>
>
>
> SPONSORED LINKS
> Computer
>
<http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=Progr
>
amming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvc
> LTIDJ5FTkRJGsO11w> part       Programming
>
<http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Computer+part&
>
w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.s
> ig=cuhEClK4dU4wapXFmKisbQ> languages       Microsoft
>
<http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Pr
>
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yf
> eG_U6QaLfPOZZIud02Fg> axapta      
> Support
>
<http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w2=Pr
>
ogramming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy
> 8yRGMzrmxdphyITTUeqA> exchange      
>
>   _____ 
>
> YAHOO! GROUPS LINKS
>
>
>      
> *      Visit your group "development-axapta
> <http://groups.yahoo.com/group/development-axapta> " on the web.
>  
>
> *      To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>
<mailto:[EMAIL PROTECTED]>

>  
>
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .
>
>
>   _____ 
>
>
>
>
> [Non-text portions of this message have been removed]






---------------------------------
YAHOO! GROUPS LINKS


    Visit your group "development-axapta" on the web.
 
    To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
 
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---------------------------------



           
---------------------------------
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news & more. Check it out!

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





YAHOO! GROUPS LINKS




Reply via email to