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 <*> 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/