#56124 - 07/18/18 08:33 PM
Assistance for complex Word Wrapping
|
OL Newbie
Registered: 07/18/18
Posts: 2
|
Hello everyone,
I would just like to say first of, that any assistance for the issue that I am experiencing is greatly appreciated. I may have some difficulty trying to explain my situation but will try my best.
Essentially I am in the midst of performing one of the largest projects at my company which involves generating around 800,000+ individualised reports.
We have been asked if we can potentially for the first time provide word wrapping to descriptors, which always have been only around 6-7 words long and on one line, but we are being asked to provide descriptors up to 10-15 words now, which based on the amount of space given in the columns would require word wrapping.
These columns can consist up to 48 unique descriptors to explain how a student went in their examinations.
Just to explain further as well, is it possible to do word wrapping using Database emulation for outputting the data? Using Planetpress Talk Code?
If anyone requires further explanation I am more than happy to try and provide as much information as I can.
Thank you all, please let me know if anyone has any idea on how insert something like this.
Andrew McCallum
Edited by A-Mac (07/19/18 12:24 AM)
|
Top
|
|
|
|
#56125 - 07/19/18 11:49 AM
Re: Assistance for complex Word Wrapping
[Re: A-Mac]
|
OL Expert
Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
|
The Text object does word wrap by default. So if you need to know how it is done in PressTalk, simply use the Text object to its maximum (so all that you can do in it), then go to the Tools menu and click on Convert to PlanetPress Talk. What you now have is the Text object but in PressTalk. You will see in it the use of BeginParagraph … EndParagraph. That should get you started.
_________________________
♪♫♪♫ 99 frigging bugs in my code 99 frigging bugs Take one down Code around 127 frigging bugs in my code ♪♫♪♫
|
Top
|
|
|
|
#56129 - 07/22/18 08:37 PM
Re: Assistance for complex Word Wrapping
[Re: A-Mac]
|
OL Newbie
Registered: 07/18/18
Posts: 2
|
Hello Jean-Cedric,
We tried the methods that you have provided and they don't seem to have worked, but I may not have provided enough detail but I will try to keep providing as much detail as I can.
At the moment we have two long columns with these unique descriptors and the code embedded within is as follows:
Define(&i, integer, 0)
% Assign style (from the PlanetPress Talk ID). setstyle(&Arial7)
% For Loop (var, startPos, increment, stopPos) for(&i, 1, 1, 50)
% Print the datasource value. showright(field('RQ'+ inttostr(&i) + '_1'))
% Carrage return with value. crlf(0.134) endfor()
At the moment this prints out the 7-15 words into the column but just as one long sentence and as I stated previously we wanted to wrap this, the first method we were unable to use at all regardless of how much we tried to tweak it and the second method with the paragraph talk code made the information disappear and we implemented it like this:
Define(&i, integer, 0)
beginparagraph(1,3,0,'left',0,[false,true])
% Assign style (from the PlanetPress Talk ID). setstyle(&Arial7)
% For Loop (var, startPos, increment, stopPos) for(&i, 1, 1, 50)
% Print the datasource value. showright(field('RQ'+ inttostr(&i) + '_1'))
% Carrage return with value. crlf(0.134)
endfor()
endparagraph()
If you had any further recommendations, It would be greatly appreciated, I will continue to try to provide as much information as I can.
Thank you Jean.
Edited by A-Mac (07/22/18 11:45 PM)
|
Top
|
|
|
|
#56130 - 07/23/18 11:30 AM
Re: Assistance for complex Word Wrapping
[Re: A-Mac]
|
OL Expert
Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
|
My guess is that you didn't read the BeginParagraph … EndParagraph link that I provided in my previous answer. Here is the beginning of the information that you find on this page. I have bolded what I consider important and that should guide you into the mistake you have made: 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.If you do not need to change fonts or use variables within a paragraph, it is strongly recommended you use the text object in PlanetPress, as PlanetPress optimizes text objects to improve performance. When a long string containing no spaces between its characters appears in the context of a show() command and the beginparagraph ... endparagraph() command, the line of text will not wrap. The same is true for a text object; no wrapping occurs when a long string has no spaces between its characters. Note that when a Text object is converted to PlanetPress Talk, an extra argument is is added to the beginparagraph … endparagraph syntax. Ignore this argument since it is strictly for internal use. Hope that clarifies thing.
_________________________
♪♫♪♫ 99 frigging bugs in my code 99 frigging bugs Take one down Code around 127 frigging bugs in my code ♪♫♪♫
|
Top
|
|
|
|
|
|