ben.kansas
10th June 2008, 16:54
Hi All,
I am trying to suppress the printing of an After.report section. I have set the Output Expression of the layout to zero. I have also added the following to the the report script:
After.report.1:
before.layout:
lattr.print = false
Yet despite these measures the section continues to print. Does anyone have any ideas for fixing this?
Ben
george7a
10th June 2008, 17:02
Hi,
Check this post (http://www.baanboard.com/baanboard/showpost.php?p=138456&postcount=2).
I hope it helps,
- George
ben.kansas
10th June 2008, 17:35
Hi George,
Thanks for the link, but I had already implemented those suggestions. The layout seems to print regardless of what is in the output expression.
Thanks,
Ben
george7a
10th June 2008, 17:57
As I know if your code does not change the value of the "output expression" to 1, it should not print.
I just tried a simple example in LN. changed the "output expression", save & compile and it worked.
Can you post your code?
ben.kansas
10th June 2008, 18:01
Hi George,
This is the code that I am using in the report script.
declaration:
table ttcmcs052 |Projects
table ttdsls401 |Sales Orders
table ttcibd001 |Item General Data
table ttimfc010 |As-Built Header for Serial End Items
extern domain tcmcs.str9 proj.item |Project item code
extern domain tcmcs.str40 item.item |Item item code
extern domain tctxtn project.text
extern domain tcmcs.str9 sales.order |Sales order number
extern domain tcseak inst.drawing |Search Key I for mitm
extern domain tcseak ga.drawing |Search Key II for mitm
extern domain tcmcs.str100 serialnumbers |Serial Numbers List
header.1:
before.layout:
proj.item = tisfc001.mitm(1;9)
item.item = tisfc001.mitm(10;38)
sales.order = ""
if strip$(tisfc001.cprj) <> "" then
select tdsls401.orno
from tdsls401
where tdsls401._index2 = {:tisfc001.cprj}
as set with 1 rows
selectdo
sales.order = str$(tdsls401.orno)
endselect
endif
inst.drawing = ""
ga.drawing = ""
select tcibd001.seak, tcibd001.seab
from tcibd001
where tcibd001._index1 = {:tisfc001.mitm}
selectdo
inst.drawing = tcibd001.seak
ga.drawing = tcibd001.seab
endselect
|******************************************************************************
|* Date Created: 06.05.2008
|* Author: Ben Wilson
|* Purpose: To print serial numbers for the top level item.
|******************************************************************************
detail.15:
before.layout:
SELECT timfc010.*
FROM timfc010
WHERE timfc010.pdno = :tisfc001.pdno
SELECTDO
serialnumbers = serialnumbers & strip$(timfc010.mser) & " "
ENDSELECT
detail.20:
before.layout:
project.text = 0
select tcmcs052.txta
from tcmcs052
where tcmcs052._index1 = {:tisfc001.cprj}
selectdo
project.text = tcmcs052.txta
lattr.print = true
selectempty
lattr.print = false
endselect
after.report.1:
before.layout:
seri.item = tcyesno.no
Thanks for your help,
Ben
mark_h
10th June 2008, 18:42
Setting in to 0 in baan 4c4 disables the report. Have you made sure it is not open some where else? Made sure not in shared memory? Granted I don't know anything about LN, but have you put it in debug mode to make sure you are getting the current copy? Just some thoughts.
ben.kansas
10th June 2008, 21:30
Hi George and Mark,
I found my problem. The code was doing everything exactly right. I just was misinterpreting the results.
Changing the output expression to zero caused the layout to not print as I intended. However, I missed this because another report prints immediately following my report with a duplication of the layout that I wanted eliminated on my report. I confused the two reports for one large report when they were in fact separate.
Another case of UTS (user too stupid) problems. :o
Thanks for all of your help,
Ben