Focal Point
[CASE-OPENED] Data Alignment after a WRAP

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

October 22, 2014, 05:20 AM
Ian Dalton
[CASE-OPENED] Data Alignment after a WRAP
Hopefully this is a simple one......
I want to align MODEL and RCOST to be placed to the right of the LAST part of the wrapped CAR name eg. in the example below against MEO (the last line of ALPHA ROMEO) and ATI (the last last of MASERATI) and NOT the first line of the WRAP. Here is my code....
 
TABLE FILE CAR
PRINT MODEL RCOST
   BY COUNTRY 
   BY CAR UNDER-LINE
WHERE COUNTRY EQ 'ITALY';
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='A4',
     SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
     FONT=Helvetica,
     SIZE=9,
     COLOR='BLACK',
     STYLE=NORMAL,
$
TYPE=REPORT,
     COLUMN=CAR,
     WRAP=0.3,
$
TYPE=DATA,
     SIZE=9,
     BACKCOLOR=( RGB(234 234 255) 'WHITE' ),
$
TYPE=DATA,
     COLUMN=RCOST,
     JUSTIFY=LEFT,
$
TYPE=TITLE,
     BORDER=LIGHT,
     BORDER-STYLE=RIDGE,
     BORDER-COLOR=RGB(51 51 153),
     SIZE=9,
     STYLE=BOLD,
$
ENDSTYLE
END
-RUN


Regards,
Ian

This message has been edited. Last edited by: <Kathryn Henning>,


_______________________
*** WebFOCUS 8.1.05M ***
October 22, 2014, 06:52 AM
Alan B
Don't believe this is possible Ian.


Alan.
WF 7.705/8.007
October 22, 2014, 07:03 AM
Ian Dalton
Yes you maybe right Alan, but if you change the FORMAT to EXL07 it works fine.


_______________________
*** WebFOCUS 8.1.05M ***
October 28, 2014, 06:53 AM
Ian Dalton
Due to lack of replies apart from Alan B, I am opening a new case for this unless I hear from anyone out there who has a workaround.
Regards,
Ian


_______________________
*** WebFOCUS 8.1.05M ***
October 28, 2014, 07:42 AM
Ram Prasad E
Try this. Will it help.
SET NODATA = ''
APP PATH IBISAMP
-RUN
TABLE FILE CAR
SUM 
COMPUTE MODEL_1/A50=''; 
COMPUTE RCOST_1/I11=0;
BY COUNTRY 
BY CAR
WHERE COUNTRY EQ 'ITALY';
ON TABLE HOLD AS HLD_1
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
TABLE FILE CAR
PRINT 
COMPUTE MODEL_1/A50=MODEL; 
COMPUTE RCOST_1/I11=RCOST;
BY COUNTRY 
BY CAR
WHERE COUNTRY EQ 'ITALY';
ON TABLE HOLD AS HLD_2
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
?FF HLD_1
?FF HLD_2
TABLE FILE HLD_2
PRINT
COUNTRY
CAR
MODEL_1
RCOST_1
ON TABLE HOLD AS HLD_3
MORE
FILE HLD_1
END
-RUN

TABLE FILE HLD_3
PRINT 
MODEL_1
COMPUTE RCOST_2/I11 MISSING ON = IF MODEL_1 NE '' THEN RCOST_1 ELSE MISSING;
BY COUNTRY 
BY CAR UNDER-LINE
BY MODEL_1 NOPRINT
WHERE COUNTRY EQ 'ITALY';
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,      PAGESIZE='A4',      SQUEEZE=ON,      ORIENTATION=LANDSCAPE, $
TYPE=REPORT,      FONT=Helvetica,      SIZE=9,      COLOR='BLACK',      STYLE=NORMAL, $
TYPE=REPORT,      COLUMN=CAR,      WRAP=0.3, $ 
TYPE=DATA,      SIZE=9,      BACKCOLOR=( RGB(234 234 255) 'WHITE' ), $
TYPE=DATA,     COLUMN=RCOST,     JUSTIFY=LEFT, $
TYPE=TITLE,     BORDER=LIGHT,     BORDER-STYLE=RIDGE,     BORDER-COLOR=RGB(51 51 153),     SIZE=9,     STYLE=BOLD, $
ENDSTYLE
END
-RUN




WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
October 28, 2014, 07:55 AM
MartinY
I don't thing that it does Ram.
What Ian wants, if I'm understanding properly, it's to have the "2000 GT VELOCE 6820" on the same line as "MEO" and "DORA 2 DORR 31500" on the same line as "ATI" as Excel does which I think it's not possible.

When you WRAP data, WF creates new "virtual" lines on the report (PDF format) to display the whole data and for WF the MODEL_1 and RCOST_2 data are placed on the same line as CAR. But for Excel it creates cell and just carriage return in the same cell for the WRAP.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
October 28, 2014, 09:26 AM
Ian Dalton
Your workaround is pretty close Ram so many thanks for this but as Martin quite rightly mentions, ideally, I would like the model on the same line as 'MEO' etc. If we can't, then I will go with Ram's technique.


_______________________
*** WebFOCUS 8.1.05M ***
October 28, 2014, 12:25 PM
Ram Prasad E
In your example I could see 3 characters in first line where as 2 characters in second line. If its going to be same number of characters in each WRAP row, then it should be possible. Space required to display character W is different from that of character I. So its difficult to predict number of WRAP lines of each CAR value. That's the real challenge here.


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/