IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Page 2 of 2 < 1 2
Topic Options
#49767 - 10/16/14 02:06 PM Re: Line break in data field question [Re: Kels]
JFLAIR
Unregistered


Kels,

You are not using the BeginParagraph()... EndParagraph() function as intended, please refer to the user guide.
http://help.objectiflune.com/en/planetpress-design-user-guide/Default_CSH.html#/2928.html

Quote:
The beginparagraph … endparagraph structure can contain only the following commands: setstyle(), setstyleext(), show(), and % (indicating a commented line). Any other command included within this structure will yield unpredictable results. A margin() command should precede the beginparagraph...endparagraph structure, and each variable you reference within the structure must have its own procedure., as demonstrated in the second of the examples below. Also note that the first command within a beginparagraph...endparagraph structure must be the setstyle() command.

No crlf procedures are permitted inside a paragraph structure, since crlfs are paragraph delimiters.


Also, I would have done a for().. endfor() loop using the XMLCOUNT ('/one_show[1]/lineitems[1]/lineitem') as the "stopvalue". You can assign that value to a variable.

Then you could use show(XmlGet('/one_show[1]/lineitems[1]/lineitem['+inttostr(&i)+']/product_number[1]')) to show each detail contained in that lineitem.

Please check the next code. This is an example.
Code:
define(&i, integer, 0)
define(&iMaxLineitem, integer, XMLCOUNT('/one_show[1]/lineitems[1]/lineitem'))

for(&i,1,1,&iMaxLineitem)
  show(XmlGet('/one_show[1]/lineitems[1]/lineitem['+inttostr(&i)+']/product_number[1]'))
  crlf()
  show(XmlGet('/one_show[1]/lineitems[1]/lineitem['+inttostr(&i)+']/format_name[1]'))
  crlf() 
endfor()


As for the breaking, I think it's the BeginParagraph()... EndParagraph() that is causing you this issue depending of the length of the string it's receiving vs the Arguments that it is set with.

Regards,
JF

Top
#49778 - 10/16/14 06:49 PM Re: Line break in data field question [Re: Kels]
Kels Offline
OL Toddler

Registered: 07/24/14
Posts: 49
Hey Jflair,

I did take your advice during our call about removing the beginparagraph... and it did fix the issue I was having. I am currently trying to clean this particular process up. Thanks for the big assist!

Top
Page 2 of 2 < 1 2