doni_foundation
1st April 2013, 15:02
i've a problem with my printing

this is my report source


declaration:

table tcisli901
table tcisli310
table tcisli305
table tcisli900
table ttccom000
table ttccom100
table ttccom130
table ttcmcs143
table ttccom139
table ttcibd001

extern domain tcamnt nourut

before.cisli305.idoc.1:
before.layout:

nourut = 0

select cisli305.*
from cisli305
where cisli305.tran = {:r.ih.trns.typ}
and cisli305.idoc = {:r.ih.doc.nr}
selectdo
endselect

select cisli901.*
from cisli901
where cisli901.ityp = {:r.ih.trns.typ}
and cisli901.invn = {:r.ih.doc.nr}
selectdo
endselect

select tccom000.*
from tccom000
selectdo
select tccom130.*
from tccom130
where tccom130.cadr = {:tccom000.cadr}
selectdo
select tcmcs143.*
from tcmcs143
where tcmcs143.ccty = {:tccom130.ccty}
and tcmcs143.cste = {:tccom130.cste}
selectdo
endselect

select tccom139.*
from tccom139
where tccom139.ccty = {:tccom130.ccty}
and tccom139.cste = {:tccom130.cste}
and tccom139.city = {:tccom130.ccit}
selectdo
endselect
endselect
endselect



before.cisli305.idoc.2:
before.layout:


select tccom100.*
from tccom100
where tccom100.bpid = {:cisli901.bppjk}
selectdo
select tccom130.*
from tccom130
where tccom130.cadr = {:tccom100.cadr}
selectdo
select tccom139.*
from tccom139
where tccom139.ccty = {:tccom130.ccty}
and tccom139.cste = {:tccom130.cste}
and tccom139.city = {:tccom130.ccit}
selectdo
endselect
endselect
endselect

detail.1:
before.layout:

nourut = nourut + 1

select cisli305.*
from cisli305
where cisli305.tran = {:r.ih.trns.typ}
and cisli305.idoc = {:r.ih.doc.nr}
selectdo
select cisli310.*
from cisli310
where cisli310.tran = {:cisli305.tran}
and cisli310.idoc = {:cisli305.idoc}
selectdo
select tcibd001.*
from tcibd001
where tcibd001.item = {:cisli310.item}
as set with 1 rows
selectdo
endselect
endselect
endselect

after.cisli305.idoc.10:
after.layout:
if lattr.lineno < (spool.pg.length-27) then
layout.again()
endif



after.cisli305.idoc.20:
before.layout:
select cisli901.*
from cisli901
where cisli901.ityp = {:r.ih.trns.typ}
and cisli901.invn = {:r.ih.doc.nr}
selectdo
endselect

footer.3:
before.layout:

select cisli900.*
from cisli900
selectdo

select cisli901.*
from cisli901
where cisli901.ityp = {:r.ih.trns.typ}
and cisli901.invn = {:r.ih.doc.nr}
selectdo

select tccom000.*
from tccom000
as set with 1 rows
selectdo
select tccom130.*
from tccom130
where tccom130.cadr = {:tccom000.cadr}
selectdo

select tccom139.*
from tccom139
where tccom139.ccty = {:tccom130.ccty}
and tccom139.cste = {:tccom130.cste}
and tccom139.city = {:tccom130.ccit}
selectdo
endselect
endselect
endselect
endselect

endselect


i wanna ask how can my print become 2 pages

it supposed to be just 1 page

and the detail came out in 2nd page

i want my detail come out 1st page

please help me to solve this problem

i'm sorry, my english isn't fluently

bhushanchanda
1st April 2013, 15:54
Verify that you have not ticked the New Page check box on your before.layout 1 & 2.

doni_foundation
2nd April 2013, 04:33
Verify that you have not ticked the New Page check box on your before.layout 1 & 2.

i've checked it and no one in new page check box that i tick

i guess it's all about script, because when i remove detail script in my report script, the data of detail still appear

is there anything beside new page check box that i've to check ?

bhushanchanda
2nd April 2013, 05:47
Double click on your report, go to special tab. Set its page length to -1.
May be this will work.
See the attachment.

doni_foundation
2nd April 2013, 05:49
Double click on your report, go to special tab. Set its page length to -1.
May be this will work.
See the attachment.

i already did this, but it's still appear in second page

please help me :D

andreas.toepper
2nd April 2013, 09:04
What information are you printing in layout after.cisli305.idoc.10?

This layout is repeated until line 27 counted from the end of page is reached:

after.layout:
if lattr.lineno < (spool.pg.length-27) then
layout.again()
endif

If for some reason the first values r.ih.trns.typ and r.ih.doc.nr will not be found in cisli305 the layout after.cisli305.idoc.10 will be triggert also and may be the cause of the page break.

It may also be necessary to check the print-conditions of the used layouts.

doni_foundation
5th April 2013, 10:25
thanks it worked :D

i wanna ask you something

that code i run in a4 paper and the script of layout.again worked well

but when i try to use letter the script of layout.again can't work

whereas i've changed the page length and page width

from

page length -1 in a4 become 61
and page width from 80 become 136

help me again sir

thanks

andreas.toepper
8th April 2013, 08:33
A page length of -1 in the report-data means that the actual page-length during printing will be taken from the page-format used in the printer.
The page width field in the report-data is used for some calculations prior to printing (AFAIK). This field will be used to determine whether the report will fit on the selected page-format of the printer.

Those fields may alter page-breaks when changed, but they don't define the page-breaks itself. You need to identify how your report modifies its page-breaks. This will be done by some report script functions usualy (i.e. need(..), skip.to(..)).
The "Infor ERP Programmers Guide" will provide information on these functions.