Integrator PDFDocumentService List Element
Posted: Fri Jun 15, 2018 5:08 am
How do I get a list populated in the PDFDocumentService?
I have content in my template like this to show a list of address lines
I add the content with
Where #AddressLines is defined as
There are entries in the list.
The Trace Shows
What is meant by "Cannot access program field"? How do I get this list populated?
EDIT
If I define the template list like this
I don't get an error in the trace
And the list still is still missing.
If I define the list like (note the {} around STD_STRNG)
I get the same error as above.
I have content in my template like this to show a list of address lines
Code: Select all
<content name="Address">
<list x1="20" y1="760" symbol="bullet" width="200" horizontal-align="left" style="header">
<item value="{STD_STRNG}" />
</list>
</content>
Code: Select all
#JSMXCMD := ('ADD CONTENT(ADDRESS)')
#SYS_APPLN.TraceMessageData( "Executing &1" #JSMXCMD )
use builtin(JSMX_COMMAND) with_args(#JSMXHDLE #JSMXCMD) to_get(#JSMXSTS #JSMXMSG #AddressLines)
if (#COM_OWNER.CheckStatus( #JSMXSTS #JSMXMSG ) = ER)
return
endif
Code: Select all
def_list name(#AddressLines) fields(#STD_STRNG) type(*WORKING) entrys(4)
The Trace Shows
Code: Select all
Process : ASCCHIR01
Function : ASCCHI2
Partition : SYS
Job Name : JOB010008
Job User : LANSA
Job Number : 010008
Command : ADD CONTENT(ADDRESS)
Add content : ADDRESS
Add list
X1 : 20
Y1 : 760
Style : header
Width : 200
Field :
Cannot access program field : STD_STRNG
Add list completed
Command : OK ""
EDIT
If I define the template list like this
Code: Select all
<content name="Address">
<list x1="20" y1="760" symbol="bullet" width="200" horizontal-align="left" style="header" field="STD_STRNG" />
</content>
Code: Select all
Process : ASCCHIR01
Function : ASCCHI2
Partition : SYS
Job Name : JOB008220
Job User : LANSA
Job Number : 008220
Command : ADD CONTENT(ADDRESS)
Add content : ADDRESS
Add list
X1 : 20
Y1 : 760
Style : header
Width : 200
Field : STD_STRNG
Field index : 0
Add list completed
Command : OK ""
If I define the list like (note the {} around STD_STRNG)
Code: Select all
<content name="Address">
<list x1="20" y1="760" symbol="bullet" width="200" horizontal-align="left" style="header" field="{STD_STRNG}" />
</content>