evertsen
11th October 2002, 22:09
I've created a custom print session which uses a custom table. The problem is that the first record on the report always print twice (the first time with no quantity). Does any one know why it's doing this?
Here's the code:
declaration:
table ttivkm001
extern domain tcorno orno.f
extern domain tcorno orno.t
form.1:
init.form:
get.screen.defaults()
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif
field.orno.f:
when.field.changes:
orno.t = orno.f
functions:
function read.main.table()
{
select tivkm001.*
from tivkm001
where tivkm001.orno inrange :orno.f and :orno.t
selectdo
rprt_send()
endselect
}
Thanks,
Ev
Here's the code:
declaration:
table ttivkm001
extern domain tcorno orno.f
extern domain tcorno orno.t
form.1:
init.form:
get.screen.defaults()
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif
field.orno.f:
when.field.changes:
orno.t = orno.f
functions:
function read.main.table()
{
select tivkm001.*
from tivkm001
where tivkm001.orno inrange :orno.f and :orno.t
selectdo
rprt_send()
endselect
}
Thanks,
Ev