Integrator PDFDocumentService List Element

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Integrator PDFDocumentService List Element

Post by jyoung »

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

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>
I add the content with

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
Where #AddressLines is defined as

Code: Select all

def_list name(#AddressLines) fields(#STD_STRNG) type(*WORKING) entrys(4)
There are entries in the list.

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 ""
What is meant by "Cannot access program field"? How do I get this list populated?

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>
I don't get an error in the trace

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 ""
And the list still is still missing.

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>
I get the same error as above.
alick
Posts: 16
Joined: Fri Sep 02, 2016 2:43 pm

Re: Integrator PDFDocumentService List Element

Post by alick »

Hi,

Specify the working list field on the list element.

<list x1="20" y1="760" symbol="bullet" field="STD_STRING" width="200" horizontal-align="left" style="header">

Each working list entry for that field will become an item in the PDF list.

Cheers

Alick
Post Reply