pjohns
5th July 2012, 16:38
Hello,

I have inserted a new layout to the tdsls440301000 pack slip report but it prints in the wrong location.

The layout I have inserted is Detail.45 but it prints before the Detail.40 layout and I cannot see why.

Neither of these layouts are manipulated in the report script. The conditions against each layout are:-

Detail.40 - line = 0 and not stand.desc
Detail.45 - line = 1

Can anybody please give me some pointers as to what may be causing this?

Thanks

PJ

vahdani
5th July 2012, 16:59
Hi PJ,

the print packing slip program first sets the "line" variable to 1 and sends its data to report. So all layouts that have line=1 as part of their condition are printed first if the rest of the condition applies. The program then sets the "Line" variable to 0 to print the line text. Now all the layouts with line=0 as part of their condition are considered for printing. Therfore in your case detail.45 with condition line=1 is printed before detail.40 with condition line=0.

Simple really! Just Kidding. I still remember the sleeples nights I had as a rooky with no idea what "line" stood for.

pjohns
5th July 2012, 17:11
Thanks Vahdani,

I only do a bit of development here and there so I put my hands up to being a 'rooky'.

I think I understand now. I have set 'line = 0' on my layout and it now prints where I would expect it to.

Thanks for your help.

PJ

vahdani
5th July 2012, 17:21
Hi PJ, it's me again!

You have to be careful here: If the sales order line has no text, no line = 0 is ever sent and your layout will not be printed! If you must always print your layout then I woud move it to an after.field.tdsls045.pono layout with print condition = 1. Such a layout will always get printed after all the detail layouts are printed(text or no text)

pjohns
5th July 2012, 17:43
The extra layout needs to be after each so line as it prints specific text based on the signal code of the item.

I have tested with a SO that has no line text and my new layout is printed as expected.