Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
In chart account table

HTML
glaccount  nametext 
1204005     BAH - Khay  
2202013     Sales Tax Payable New 
2019384    Generator
1848485    Vechicle

and in other table

this glaccount is in account table and this glaccount is unique values

HTML
acdocno               glaccount  docamount   glnametxt
 0600000307             1204005     363538      BAH - Khay  
 0600000307             2202013     56003       Sales Tax Payable New   
 0600000307             1201001     456023      Accounts Receivable 
 0600000307             1201001     456023      Accounts Receivable 
  0600000307            1206004     36482       Adv Income Tax - 
'

except 1204005 all glacct is fixed only 1204005 is change when acdocno change

so how i get this glaccount amount i.e. 363538 in crystal report.. when i only drag field docamout then 456023 is displayed and i want this value 363538

current data in report

HTML
Acdocno    Total Amount  Bank Amount   Bank Name    
0600000307 456,023.00    456,023.00    Accounts Receivable


and i want

HTML
Acdocno      Total Amount  Bank Amount   Bank Name  
0600000307   456,023.00    363538       BAH - Khay


What I have tried:

query which i tried

select distinct
acdocdtl.acdocno,

acdocdtl.docamount,glchaact.glnamestxt
from acdocdtl
inner join acdochdr
on
acdocdtl.acdocno =acdochdr.acdocno
and acdocdtl.cocode=acdochdr.cocode

left join glchaact
on acdocdtl.glacct = glchaact.glacct
and acdocdtl.chaact=glchaact.chaact
where acdocdtl.acdocno='0600000307'
how i done this
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900