ltannous
18th March 2004, 20:52
When I run this report entering one selection in the range on the form, the report works properly, however, when I run a range the data seems to double some figures on the report.
I tried seting the variables = 0 at different layouts, but no luck.
The balance and balance1 seems to double.
Any suggestions
before.wtpur041.dim4.1:
before.layout:
travel = 0
courier = 0
balance = 0
balance1 = 0
credit = 0
credit1 = 0
fcah = 0
fdah = 0
fcah1 =0
fdah1 =0
select tfgld010.*
from tfgld010
where tfgld010.dimx = :wtpur041.dim4
selectdo
endselect
select tccom000.*
from tccom000
selectdo
endselect
|Get Travel Expenses
select sum(tfgld202.fdah):fdah, sum(tfgld202.fcah):fcah
from tfgld202, wtpur008
where tfgld202.dimx =:wtpur041.dim4
and tfgld202.dtyp = 4
and tfgld202.ptyp = tfgld.ptyp.financial
and tfgld202.leac = wtpur008.leac
and tfgld202.leac <> "78207"
selectdo
endselect
travel = fdah
credit = fcah
|Balance for travel expenses
balance = travel - credit
|Courier Expenses
select sum(tfgld202.fdah):fdah1, sum(tfgld202.fcah):fcah1
from tfgld202, wtpur008
where tfgld202.dimx =:wtpur041.dim4
and tfgld202.dtyp = 4
and tfgld202.ptyp = tfgld.ptyp.financial
and tfgld202.leac = wtpur008.leac
and tfgld202.leac = "78207"
selectdo
endselect
courier = fdah1
credit1 = fcah1
balance1 = courier - credit1
I tried seting the variables = 0 at different layouts, but no luck.
The balance and balance1 seems to double.
Any suggestions
before.wtpur041.dim4.1:
before.layout:
travel = 0
courier = 0
balance = 0
balance1 = 0
credit = 0
credit1 = 0
fcah = 0
fdah = 0
fcah1 =0
fdah1 =0
select tfgld010.*
from tfgld010
where tfgld010.dimx = :wtpur041.dim4
selectdo
endselect
select tccom000.*
from tccom000
selectdo
endselect
|Get Travel Expenses
select sum(tfgld202.fdah):fdah, sum(tfgld202.fcah):fcah
from tfgld202, wtpur008
where tfgld202.dimx =:wtpur041.dim4
and tfgld202.dtyp = 4
and tfgld202.ptyp = tfgld.ptyp.financial
and tfgld202.leac = wtpur008.leac
and tfgld202.leac <> "78207"
selectdo
endselect
travel = fdah
credit = fcah
|Balance for travel expenses
balance = travel - credit
|Courier Expenses
select sum(tfgld202.fdah):fdah1, sum(tfgld202.fcah):fcah1
from tfgld202, wtpur008
where tfgld202.dimx =:wtpur041.dim4
and tfgld202.dtyp = 4
and tfgld202.ptyp = tfgld.ptyp.financial
and tfgld202.leac = wtpur008.leac
and tfgld202.leac = "78207"
selectdo
endselect
courier = fdah1
credit1 = fcah1
balance1 = courier - credit1