Everything I've read here and in the help files indicates that the above code with a -SET WRAP=ON should do the trick, but it refuses to do what I'm telling it to. Is there some secret sauce I'm missing for this? I've played around quite a bit and I just don't seem to get any change to the output -- my text just runs off the end of the page.
Note that I'm using the size=14 to make sure I'm working on the correct line. That command is working correctly.
7.6.11 on NT.
J.This message has been edited. Last edited by: John_Edwards,
March 12, 2012, 05:46 PM
Waz
Put your text into a field, and wrap that, it should work.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 12, 2012, 05:58 PM
John_Edwards
That may be out of reach because I'm offering the user about two dozen sentences to be included in a letter, and they can choose any or all of them. With an amper variable I can use FOC_NONE to keep the letter from having a bunch of blank lines. If I put the material into a field I get a bunch of blank lines that make the letter too long.
Depending on your version of WebFOCUS, you could even use MARKUP=ON
DEFINE FILE CAR
XX/A1000 = '<full><b>' | COUNTRY | 'Fully Justified Heading:</b> Customer'
| ' Service Is Everything. At Information Builders, we are as open and flexible as'
| ' our software, and our customers are our greatest asset. For every new product'
| ' and feature, there''s a customer who drove it. For every customer there''s an'
| ' answer. Our customer-centric philosophy is backed up by an integrated support'
| ' network of people passionately dedicated to the success of your business'
| ' initiatives. Consulting, Education, Technical Support, Product Development the'
| ' support network is the sum of these groups, and it stands ready to help you.'
| ' Information Builders has also created a community Web site for our developers.'
| ' At Focal Point, you can visit our message boards and browse through numerous'
| ' helpful resources.</full>';
END
TABLE FILE CAR
BY COUNTRY NOPRINT PAGE-BREAK
HEADING
"<XX"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET NEWLAYOUT ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
type=report, font=courier, size=10, $
type=datamatrix, position=(0 0), dimension=(5 3), $
type=heading, position=(1 2), dimension=(7 1.8), markup=on, wrap=on, $
END
This message has been edited. Last edited by: Waz,
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 13, 2012, 10:45 AM
John_Edwards
Neither one of these appear to address one of my issues -- I need empty strings to disappear from the report. In order for that to happen I need to wrap text. I have 100 potential lines from which the end user will select one to four for inclusion in the letter, and I need the rest to disappear. I can do this with FOC_NONE if it's text, but not if it's fields.
Is it possible to wrap text in a TABHEADING?
J.
March 13, 2012, 11:16 AM
j.gross
Just combine (catenate) the selected boilerplate elements into a single alpha variable, and imbed that one (like Waz's XX) in the report heading.
- Jack Gross WF through 8.1.05
March 13, 2012, 11:26 AM
John_Edwards
It's a bullet list, so that's going to be painful as well. If I could embed a CR/LF in the string it wouldn't be so bad -- anyone know how to do that?
Wrapping text should have been a feature in 4.3.5. This is really a stupid oversight.
J.
March 13, 2012, 12:00 PM
j.gross
Use dalog manager switches to turn the heading lines on and off.
Building on Waz's sample code, this turns them on/off randomly, to simulate variable user selections.
This message has been edited. Last edited by: j.gross,
March 13, 2012, 12:41 PM
John_Edwards
HO! THAT is the secret to this.
Incoming text arrives in an amper variable. Default it to FOC_NONE just in case --
-DEFAULT &REASON_1 = 'FOC_NONE';
Create a kill switch for lines that aren't filled out --
-SET &KILL_LINE_1 = IF &REASON_1 EQ 'FOC_NONE' THEN 'FOC_NONE' ELSE '';
Create a field for the table you're reporting on --
REASON_1/A1000 = '&REASON_1';
Then include both the kill switch and the defined field in the HEADING/SUBHEAD/SUBFOOT/FOOTING --
TABLE FILE HOLD3
PRINT OUTPUT_FIELDS
ON TABLE SUBHEAD
"&KILL_LINE_1 <REASON_1"
ON TABLE PCHOLD FORMAT PDF
.
.
.
TYPE=TABHEADING,
LINE=1,
OBJECT=FIELD,
ITEM=1,
WRAP=6.8,
$
.
.
.
END
I was in the process of adjusting the lines in JavaScript which had ugly-as-**** written all over it. This is something that can be modified quickly and easily and the user interface code doesn't get crushed.
Thanks bud!
J.
March 13, 2012, 12:51 PM
j.gross
Close your [ code ].
TABLE FILE HOLD3
PRINT OUTPUT_FIELDS
ON TABLE SUBHEAD
"* &KILL_LINE_1 <REASON_1"
"* &KILL_LINE_2 <REASON_2"
"* &KILL_LINE_3 <REASON_3"
ON TABLE PCHOLD FORMAT PDF
END
Right -- GUI will tolerate &vars within the " ".
March 13, 2012, 05:20 PM
Waz
quote:
It's a bullet list
I read that line very differntly.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
March 16, 2012, 09:32 AM
MAdams1
Also I've noticed that with PDF, having SET PRINTPLUS = ON helps.
Just sayin'
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML