Focal Point
Align Fields in Reports

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

March 09, 2007, 02:58 PM
SG
Align Fields in Reports
Is there a way to align fields vertically?

I am creating a fex file and my requirement is as follows:

Field1 Field3 Field4
Field2 Field5


Field6 Field7 Field8 ...........

Thanks,
SG.
March 09, 2007, 03:19 PM
ET
Try using over

TABLE FILE FILENAME
PRINT Field1 Field3 Field4
OVER Field2 Field5
OVER Field6 Field7 Field8
END

Good luck

et


FOCUS 7.6 MVS PDF,HTML,EXCEL
March 09, 2007, 04:08 PM
SG
Hi ET,
works great but the alignment is not what I want.
Everything is towards left. I want to place some fields to the right of the screen and some in the center and some to the left.

Thanks,
SG


Webfocus 7.6.8
PDF,HTML & EXCEL
March 10, 2007, 04:18 AM
OPALTOSH
You should be able to do the alignment in your stylesheet.
March 10, 2007, 06:55 AM
Alan B
Here's an example of utilising OVER in a grid type layout, as OPALTOSH said, using a style sheet to help.
  
SET LINES=999
DEFINE FILE CAR
DUMMY/A1 = ' ';
HR/A6='<HR>';
END
TABLE FILE CAR
PRINT
     COUNTRY      AS '' 
     DUMMY        AS '' 
     DUMMY        AS '' 
     DUMMY        AS '' OVER
     CAR          AS ''
     DEALER_COST  AS ''
     DUMMY        AS '' 
     DUMMY        AS '' OVER
     MODEL        AS ''
     RETAIL_COST  AS ''
     SALES        AS '' 
     DUMMY        AS '' 
BY   COUNTRY      NOPRINT
BY   CAR          NOPRINT
BY   MODEL NOPRINT
BY   SALES        NOPRINT
ON MODEL SUBFOOT
"<HR "
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=PTS,
     SQUEEZE=OFF,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=REPORT,
COLUMN=P1,
WIDTH=30,
JUSTIFY=LEFT,
$
TYPE=REPORT,
COLUMN=P2,
WRAP=200,
JUSTIFY=RIGHT,
$
TYPE=REPORT,
COLUMN=P3,
WRAP=200,
JUSTIFY=RIGHT,
$
TYPE=REPORT,
COLUMN=P4,
WRAP=10,
$
TYPE=REPORT,
COLUMN=P9,
JUSTIFY=RIGHT,
$
ENDSTYLE
END

Basically, I set up a report with GRID=ON, and fill in empty matrix cells with a field DUMMY to ensure better alignment (not strictly necessary but it does seem to help). I set the width of the columns in the top row, using WIDTH or WRAP, whichever works better. There is an extra column on the end to ensure that the horizontal rule, the
<HR>
,goes further than almost the end of column 3. After complete, turn GRID=OFF.

Basically play with this code to get a feel for what you can do before turning your atttention to your real report.


Alan.
WF 7.705/8.007
March 12, 2007, 10:18 AM
SG
Thanks All,
sg


Webfocus 7.6.8
PDF,HTML & EXCEL