Jordi.Tolra
29th May 2008, 17:18
Hola a tothom,

does anybody know if it is possible do a layout.again() of more than 1 layout?
If yes, how?
My problem is that maximum layout length is 23 lines, but my layout needs more than 23, so I have to split it in 2 layouts: detail.1 and detail.2. I need to repeat them several times, so I need a layout.again() functionality, but for 2 layouts.

If layout.again() is not possible, do you know any other solution to my issue?

Thanks & Regards

Jordi

dorleta
29th May 2008, 18:47
one posible solution maybe keep the content of the two layout in one array and after print it . I have done somthing similar of this way because I ned one after field of indeterminated length but very large ( about 100 lines )

after.aeedm998.item.11:
before.layout:
string.scan( proy.pcs(1,i1), "%s|%f|%f",print.cprj, print.qrd1, print.qrd2 )
after.layout:
i1 = i1 + 1
if not isspace(proy.pcs(1,i1) ) then
layout.again()
endif

Suerte / good luck

steveauckly
29th May 2008, 22:33
I would use this alternate way of doing it. Think of detail.1 as the controller for printing your two layouts 98 & 99.


before.layout.detail.1:
before.layout:
loop to print your layouts
print.switch = True
r.s.detail.98()
r.s.detail.99()
print.switch = False
endloop
lattr.print = False


In the layout output expression, put "print.switch" on detail.98 and detail.99

Andy..
6th May 2010, 14:08
I would use this alternate way of doing it. Think of detail.1 as the controller for printing your two layouts 98 & 99.


before.layout.detail.1:
before.layout:
loop to print your layouts
print.switch = True
r.s.detail.98()
r.s.detail.99()
print.switch = False
endloop
lattr.print = False


In the layout output expression, put "print.switch" on detail.98 and detail.99

Hi Steve, a version of your above code has been working fine for a year or so now. However we have upgraded the dev box to SP27 with newer portingset (6.1c.11) and now the report won't compile saying:
Unresolved reference to function r.s.detail.10 and rs.detail.11

I've tried downgrading the repgen to the older version but this is not compatible with the rest of the portingset, complaining about shared memory issues. Any ideas?

steveauckly
6th May 2010, 15:19
We have this problem between test & production right now. Try this:
change
r.s.detail.10()
to
r.10.s.detail()

Andy..
6th May 2010, 15:59
Hi Steve, thanks for the rapid response - that's definitely fixed it! What are weird change to have made (and not documented)...

mark_h
6th May 2010, 16:26
On SP27 did they change something in the report compiler or what ever component to change the subroutine calls?

Man - with all the problems I see people having it makes me dread going to SP27. And maybe I should not call them problems, but changes. I know I have code that calls report subroutines like this and I hate to have to think that I will have to search them all out to fix.

steveauckly
6th May 2010, 16:28
We noticed this particular problem going to SP26. We haven't installed SP27 yet. And yes, this one seems like a problem more than an "upgrade". Why change a layout call like this?