You're welcome, Roberto.

-----Original Message-----
From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On 
Behalf Of Roberto Pineda
Sent: Friday, July 29, 2005 2:37 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Question about two datasource query


you're right, thanks for your help.

 --- "Dyachenko, Dmitry" <[EMAIL PROTECTED]>
escribió:

> Use this
> if (!qr.changed(tablenum(LedgerTable))
> 
> Frankly speaking I haven't seen a way how to run an
> inner loop for a query. You can do it in a little
> bit another way, 
> 
> While select legdertable
>   While select ledgertrans where ...
> 
> But it will issue a bunch of select statements,
> which is not ok for SQL server performance.
> 
> -----Original Message-----
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Roberto Pineda
> Sent: Friday, July 29, 2005 6:23 AM
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: RE: [Axapta-Knowledge-Village] Question
> about two datasource query
> 
> Thanks Dmitry... It works nice, but i think or
> thoght
> that it could be another way without checking if
> AccountNum has changed. I haven't found.
> 
> Anyway thanks again.
> Roberto
> 
>  --- "Dyachenko, Dmitry" <[EMAIL PROTECTED]>
> escribió:
> 
> > Hi Roberto,
> > 
> > I've commented out the piece of code, which you
> > don't need to use.
> > So the on the first iteration you can retrieve the
> > first ltrans record, on the second iteration - the
> > second one. If you want to check whether
> accountnum
> > has been changed or not, you can track it by using
> > temp variable, or use following validation
> > 
> > if (!qr.changed(tablenum(LedgerTable))
> > 
> > I hope it will help.
> > 
> > 
> > public boolean fetch()
> > {    
> >     QueryRun qr;
> >     LedgerTrans lTrans;
> > 
> >     qr = new QueryRun(this.query());
> >     while (qr.next())
> >     {
> >       lTrans = qr.getNo(2);
> > /*
> >       while (lTrans.AccountNum)
> >       {
> >         info(lTrans.AccountNum);         
> >         //for example
> >         next lTrans;
> >       }
> > */
> >     }
> > }
> > 
> > -----Original Message-----
> > From: Axapta-Knowledge-Village@yahoogroups.com
> > [mailto:[EMAIL PROTECTED]
> On
> > Behalf Of Roberto Pineda
> > Sent: Thursday, July 28, 2005 8:18 AM
> > To: Axapta-Knowledge-Village@yahoogroups.com
> > Subject: [Axapta-Knowledge-Village] Question about
> > two datasource query
> > 
> > Hi guys.
> > 
> > I have a report with two data source joined by a
> > relation (LedgerTable and LedgerTrans) and I need
> to
> > do
> > something in the fetch method like:
> > 
> > public boolean fetch()
> > {    
> >     QueryRun qr;
> >     LedgerTrans lTrans;
> > 
> >     qr = new QueryRun(this.query());
> >     while (qr.next())
> >     {
> >       lTrans = qr.getNo(2);
> >       while (lTrans.AccountNum)
> >       {
> >         info(lTrans.AccountNum);         
> >         //for example
> >         next lTrans;
> >       }
> >     }
> > }
> > 
> > But the problem is that 'next lTrans' is not
> allowed
> > in joined cursor, the question is how can I access
> > the second datasource (lTrans)?
> > 
> > In other words, is it possible replace the below
> > code
> > with queries?:
> > 
> > while select LedgerTable {
> > 
> >   ...
> > 
> >   while select LedgerTrans where
> > LedgerTrans.AccountNum == LedgerTable.AccountNum {
> >     ...
> > }
> > }
> > 
> > I wonder if somebody knows... thanks.
> > 
> > __________________________________________________
> > Correo Yahoo!
> > Espacio para todos tus mensajes, antivirus y
> > antispam ¡gratis! 
> > Regístrate ya - http://correo.espanol.yahoo.com/ 
> > 
> > 
> > Sharing the knowledge on Axapta. 
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> > 
> 
> 
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y
> antispam ¡gratis! 
> Regístrate ya - http://correo.espanol.yahoo.com/ 
> 
> 
> Sharing the knowledge on Axapta. 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> 


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.espanol.yahoo.com/ 



Sharing the knowledge on Axapta. 
Yahoo! Groups Links



 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hh71olf/M=362343.6886682.7839641.1493532/D=groups/S=1705001380:TM/Y=YAHOO/EXP=1122680829/A=2894350/R=0/SIG=10tj5mr8v/*http://www.globalgiving.com";>Make
 a difference. Find and fund world-changing projects at GlobalGiving</a>.</font>
--------------------------------------------------------------------~-> 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Axapta-Knowledge-Village/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to