Hi,
  you don't have to change company. Just try it with
  vba.company(<Name of the virtual company>).
  By this you force the join to the selected company.
  John

Askeryd Thomas <[EMAIL PROTECTED]> schrieb:
  An idea is to split the join.
Making it more like

while select xxx from Journal
{
     change company to where vba is
     {
            select vba where vba.yyy == Journal.xx;
            print some stuff;
      }
}

IT will slow down the method but it will do the job.
Thomas.

________________________________

Från: development-axapta@yahoogroups.com genom Thomas
Skickat: on 2006-01-25 09:18
Till: development-axapta@yahoogroups.com
Ämne: Re: SV: [development-axapta] Joining 2 tables gives no result


Hello Thomas,

I am pretty new to Axapta and X++. Could you give me a hint about
how I should restructure the code?

Regards
Thomas (Lund)

--- In development-axapta@yahoogroups.com, "Askeryd Thomas"
<[EMAIL PROTECTED]> wrote:
>
> If the table is not part of a shared virtual company the data is
not shared between companies.
> Due to the join u cant just change the company in the middle of
it. I think you might have to reconstruct your code.
> Thomas.
>
> ________________________________
>
> Från: development-axapta@yahoogroups.com genom Thomas
> Skickat: on 2006-01-25 08:46
> Till: development-axapta@yahoogroups.com
> Ämne: [development-axapta] Joining 2 tables gives no result
>
>
> Hello,
>
> I am making a report, where 2 tables are joined. I need to print a
> report containing all lines of a specific Invoice Journal
> (ledgerJournalTrans) and also the bank account information for
each
> selected vendor account (VendBankAccount) The problem is that my
> report, which I make with the Report Wizard gives me an empty
> report. I tried to select the rows through a simple job:
>
> static void Job108(Args _args)
> {
>     LedgerJournalTrans lt;
>     VendBankAccount vba;
>
>     while select JournalNum,
> AccountType,AccountNum,Txt,TransTxtLocal,
> CurrencyCode,AmountCurDebit, AmountCurCredit, Due from lt
>         join * from vba
>             where(lt.journalNum=="XXX" && vba.Vend==lt.AccountNum)
>     {
>         print lt.Voucher," ",lt.AccountNum;
>         print vba.Vend," ",vba.RegistrationNum," ",vba.AccountNum;
>     }
>     print "END";
>     pause;
> }
>
> When I run this job I also get an empty result. If I run a select
on
> the lt table and only select where lt.journalNum=="XXX" then I get
> the lines of the entered journal.
>
> If I select * from vba table where vba.vend="YY" then I get the
bank
> account information for the specific vendor.
>
> But as soon as I make the join I do not get any result. Why does
> this happen. I suspect that the problem could be that the vba info
> is registered in one company and the Invoice Journal is created in
> another parameter company. Is this the case?
>
>
>
>
>
>
>
> SPONSORED LINKS
> Computer part <http://groups.yahoo.com/gads?
t=ms&k=Computer+part&w1=Computer+part&w2=Programming+languages&w3=Mic
rosoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvcLTIDJ5FTkRJGsO11
w>        Programming languages <http://groups.yahoo.com/gads?
t=ms&k=Programming+languages&w1=Computer+part&w2=Programming+language
s&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=cuhEClK4dU4wa
pXFmKisbQ>        Microsoft axapta <http://groups.yahoo.com/gads?
t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Programming+languages&w3=
Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yfeG_U6QaLfPOZZIud
02Fg>       
> Support exchange <http://groups.yahoo.com/gads?
t=ms&k=Support+exchange&w1=Computer+part&w2=Programming+languages&w3=
Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy8yRGMzrmxdphyITT
UeqA>       
>
> ________________________________
>
> 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]
subject=Unsubscribe>
>        
> *      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]
>







SPONSORED LINKS
Computer part <http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvcLTIDJ5FTkRJGsO11w>        Programming languages <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&.sig=cuhEClK4dU4wapXFmKisbQ>        Microsoft axapta <http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yfeG_U6QaLfPOZZIud02Fg>       
Support exchange <http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy8yRGMzrmxdphyITTUeqA>       

________________________________

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]



  SPONSORED LINKS
        Computer part   Programming languages   Microsoft axapta     Support exchange
   
---------------------------------
  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.

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

 



H.W. Bous

           
---------------------------------
Telefonieren Sie ohne weitere Kosten mit Ihren Freunden von PC zu PC!
Jetzt Yahoo! Messenger installieren!

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



SPONSORED LINKS
Computer part Programming languages Microsoft axapta
Support exchange


YAHOO! GROUPS LINKS




Reply via email to