Focal Point
[Case-Opened] ACROSSVALUE wrap and column width in PDF

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6117080126

June 08, 2012, 09:14 PM
TomC
[Case-Opened] ACROSSVALUE wrap and column width in PDF
After some head scratching I have finally managed to wrap ACROSSVALUEs in my PDF using the PARAG and GETTOK functions (why does a product costing tens of thousands of dollars require me - a user - to manipulate data to accomplish one of the most fundamental text-formatting problems?)

Wrapping looks like this:

DEFINE FILE DATA_HOLD
NEWREGION/A100=PARAG(100, region, '|', 20, NEWREGION);
REGIONP1/A20=GETTOK(NEWREGION, 100, 1, '|', 20, REGIONP1);
REGIONP2/A20=GETTOK(NEWREGION, 100, 2, '|', 20, REGIONP2);
REGIONP3/A20=GETTOK(NEWREGION, 100, 3, '|', 20, REGIONP3);
...
END

followed later on by:

ACROSS LOWEST region NOPRINT
ACROSS REGIONP1 AS ''
ACROSS REGIONP2 AS ''
ACROSS REGIONP3 AS ''
...

My problem now is that even with wrapped text the columns are the same width as before (with unwrapped text). The only reason I was wrapping the text was to reduce column width.

I've tried:
- Setting the WIDTH property on DATA COLUNMN=N2 or REPORT COLUMN=N2 etc. makes no difference
- Setting the WIDTH property on ACROSSVALUE makes no difference
- Setting the WRAP property on ACROSSVALUE simply wraps ACROSSVALUE to about 0.75" (real world measurements, not the comedy PDF 'measurements') regardless of the number I specify
- Setting SQUEEZE=on on ACROSSVALUE results in the 'no data' response! What's that about?
- Setting SQUEEZE=0.5 on REPORT COLUMN=N2 etc. does change column width, but the width seems in no way related to the number I provide. If I specify 0.5 (which I assume to be 1/2 inch) the column is about 2 inches wide. If I specify 0.1 the column is about 1.5 inches and all the data values are replaced by '!'. Columns are still significantly wider than the wrapped ACROSSVALUE text.

If I seem frustrated and disenchanted then my text is accurately portraying my feelings. Having previously used SSRS I had no idea I could spend hours of my time (and precious project budget) trying to
wrap
some
text.

Any suggestions on the width problem I described somewhere above - before I started moaning - would be really *really* appreciated.

Thanks,
Tom

This message has been edited. Last edited by: Kathleen Butler,


WebFocus 7.7
Windows Server 2008 R2
HTML Reporting
June 09, 2012, 02:21 PM
Danny-SRL
Tom,

I did a bit of research. See the following:
  
DEFINE FILE CAR
ASEAT/A20=DECODE SEATS(2 'TWO SEATER' 4 'REGULAR SEDAN' 5 'FAMILY WAGON');
END
-*
TABLE FILE CAR
SUM 
     DEALER_COST
BY   COUNTRY
ACROSS ASEAT
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
type=acrossvalue,
     ACROSS=1,
     WRAP=2,
$
ENDSTYLE
END

If you run this you will see that the acrossvalue wraps on a blank.

However, if you add some more styling, as follows:
  
DEFINE FILE CAR
ASEAT/A20=DECODE SEATS(2 'TWO SEATER' 4 'REGULAR SEDAN' 5 'FAMILY WAGON');
END

TABLE FILE CAR
SUM 
     DEALER_COST
BY  LOWEST COUNTRY
ACROSS ASEAT
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
type=acrossvalue,
     ACROSS=1,
     WRAP=2,
$
ENDSTYLE
END

you will see that the acrossvalue wraps on a few characters. Changing the value of WRAP has no effect.
I would open a case with IBI.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

June 11, 2012, 11:31 AM
Wep5622
quote:
Originally posted by TomC:
why does a product costing tens of thousands of dollars require me - a user - to manipulate data to accomplish one of the most fundamental text-formatting problems?


Because writing a proper one costs more, as tempting as that is.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
June 11, 2012, 02:53 PM
TomC
Danny-SRL thanks for your input and efforts, as you suggested I have opened a support case with IBI.

I'll reply back here if something useful comes of it.


WebFocus 7.7
Windows Server 2008 R2
HTML Reporting
June 11, 2012, 03:12 PM
j.gross
quote:
ACROSS LOWEST region NOPRINT
ACROSS REGIONP1 AS ''
ACROSS REGIONP2 AS ''
ACROSS REGIONP3 AS ''
...

My problem now is that even with wrapped text the columns are the same width as before (with unwrapped text).


Presumably that's because of the

ACROSS LOWEST region NOPRINT

I suggest you generate little sequence numbers to reflect position of region in alpabetical order, and then use

ACROSS LOWEST regionSeq NOPRINT


IIRC, that's what I did in "Word-wrap of ACROSS values in PDF output"

This message has been edited. Last edited by: j.gross,
June 18, 2012, 01:16 PM
TomC
The IBI support case I opened was eventually closed as irresolvable.

The closest we ever got was this article How to apply width to individual ACROSS column in Painter but it requires that you know the names of your ACROSS columns at design-time, thus (IMO) largely negating the value of ACROSS functionality.


WebFocus 7.7
Windows Server 2008 R2
HTML Reporting