背景:peoplsoft中用XML publisher ATF模板作报表,如果查询条件为空的情况不输出,如下图:
当条件一不为空:
[img]http://dl.iteye.com/upload/attachment/295693/ba1cb455-bf7f-3da4-b58f-4129c51e3065.png[/img]
当条件一为空:
[img]http://dl.iteye.com/upload/attachment/295696/a4478136-8b11-31aa-b39e-32cdd77fc870.png[/img]
那么在ATF中如何通过IF语句实现,如以下步骤:
step 1:通过控件在表头中加“ab|”,step 2是设置其具体值.
[img]http://dl.iteye.com/upload/attachment/295698/23e87b4d-7b33-35d1-b760-9ae424881773.png[/img]
step 2:
[img]http://dl.iteye.com/upload/attachment/295700/83aa526c-f9bb-35b9-bd83-b9971bc14c2a.png[/img]
step 3:写if 语句,格式如下.
[img]http://dl.iteye.com/upload/attachment/295702/35d5f946-71a2-3ca1-a85a-4eada34630b6.png[/img]
[img]http://dl.iteye.com/upload/attachment/295704/e826e355-2e51-39c5-92ee-14835acd13ec.png[/img]
[img]http://dl.iteye.com/upload/attachment/295706/68f2b92a-5e2a-32a5-856c-f722bdd43442.png[/img]
当条件一不为空:
[img]http://dl.iteye.com/upload/attachment/295693/ba1cb455-bf7f-3da4-b58f-4129c51e3065.png[/img]
当条件一为空:
[img]http://dl.iteye.com/upload/attachment/295696/a4478136-8b11-31aa-b39e-32cdd77fc870.png[/img]
那么在ATF中如何通过IF语句实现,如以下步骤:
step 1:通过控件在表头中加“ab|”,step 2是设置其具体值.
[img]http://dl.iteye.com/upload/attachment/295698/23e87b4d-7b33-35d1-b760-9ae424881773.png[/img]
step 2:
[img]http://dl.iteye.com/upload/attachment/295700/83aa526c-f9bb-35b9-bd83-b9971bc14c2a.png[/img]
step 3:写if 语句,格式如下.
[img]http://dl.iteye.com/upload/attachment/295702/35d5f946-71a2-3ca1-a85a-4eada34630b6.png[/img]
[img]http://dl.iteye.com/upload/attachment/295704/e826e355-2e51-39c5-92ee-14835acd13ec.png[/img]
[img]http://dl.iteye.com/upload/attachment/295706/68f2b92a-5e2a-32a5-856c-f722bdd43442.png[/img]