ainulm
19th November 2014, 03:00
Hi guys,

I want to print Invoice History in each Asset and display it together in one report which is "Print Acquisition Register".

Invoice History : tffam130 , Asset Register = tffam810

I tried to combine between tffam130.anbr = tffam810.xanb. But all the value didnt come out. cane refer my code below. Thanks.

*********************function section**********************
functions:
function AdjDate()
{
a=tffam810.xanb


select tffam130.anbr, tffam130.desc, tffam130.aext, tffam130.dcdt, tffam130.ttyp,
tffam130.iamt, tffam130.docn, tffam130.cost, tffam810.xanb

from tffam130, tffam810

where tffam130.anbr =:a

order by
tffam810.xanb
as set with 1rows

selectdo

endselect

}

bhushanchanda
19th November 2014, 14:04
Hi,

Not sure about the two tables and their relation. But, I see you are assigning the value for a outside the selection which might be a problem.

*********************function section**********************
functions:
function AdjDate()
{
select tffam130.anbr, tffam130.desc, tffam130.aext, tffam130.dcdt, tffam130.ttyp,
tffam130.iamt, tffam130.docn, tffam130.cost, tffam810.xanb

from tffam130, tffam810

where tffam130.anbr = tffam810.xanb |or try using tffam130.anbr refers to tffam810.xanb

order by tffam810.xanb
as set with 1 rows

selectdo

endselect

}

ainulm
20th November 2014, 05:49
Hi Bushan,
Thank you for your reply.
I tried using your suggested code.
The value only display one line.
But on the selection screen, there will be a 'Transaction Date' selection, meanwhile in tffam130 only have 'Adjustment date'.
How should i edit Selection Screen to put the Adjustment date? since i dont have the developer license