mattan
22nd July 2005, 12:38
I am trying to extract all the purchase history for each item but somehow only the last purchase record of each of the items are extracted on the report. Below is the statement I have written in the report script. Pls advice what's wrong with the program.
detail.1:
before.layout:
select tdpur041.*
from tdpur041
where tdpur041._index2 = {" ", :tibom010.sitm}
and tdpur041.orno >= 100000
and tdpur041.orno < 200000
order by tdpur041._index2
selectdo
orno = tdpur041.orno
suno = tdpur041.suno
pric = tdpur041.pric
endselect
detail.1:
before.layout:
select tdpur041.*
from tdpur041
where tdpur041._index2 = {" ", :tibom010.sitm}
and tdpur041.orno >= 100000
and tdpur041.orno < 200000
order by tdpur041._index2
selectdo
orno = tdpur041.orno
suno = tdpur041.suno
pric = tdpur041.pric
endselect