Focal Point
PDF Report Styling

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

December 19, 2011, 05:06 PM
wf_devloper
PDF Report Styling
Hi,
I have couple of styling questions related to PDF report.


1.Is there a way to center align the sort data to the page that is when u run the below code i need to the value of SORT VAL column at the center of the page instead of displaying it at the first row.

2.Can we display the value of SORT VAL column once on every page instead of displaying at the beginning of the report.

Thanks for your time.


FILEDEF H1 DISK H1( APPEND
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS H1 FORMAT ALPHA
END
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS H1 FORMAT ALPHA
END
DEFINE FILE H1
'SORT VAL'/A10 = 'FIRST COL';
END
TABLE FILE H1
PRINT
COUNTRY
CAR
MODEL
SALES
LENGTH
CAR
COUNTRY
MODEL
SALES
BY 'SORT VAL'
ON TABLE PCHOLD FORMAT PDF
ON TABLE NOTOTAL
ON TABLE SET PAGE OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, LEFTMARGIN=0.81250000, RIGHTMARGIN=0.11250000, TOPMARGIN=0, BOTTOMMARGIN=0.050000000, ORIENTATION=LANDSCAPE,$
TYPE=REPORT,GRID=OFF,FONT='ARIAL',SIZE=8,STYLE=NORMAL,LEFTGAP = .031,RIGHTGAP = .031,TOPGAP = .05,BOTTOMGAP = .05,$
TYPE = TITLE, GRID=OFF, TOPGAP=0.04, BOTTOMGAP=0.04, $
TYPE=TITLE, STYLE=-UNDERLINE+BOLD,BORDER= LIGHT,BORDER-COLOR = SILVER,JUSTIFY = CENTER,$
TYPE=REPORT,COLUMN=P1,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P2,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P3,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P4,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P5,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P6,SQUEEZE=1.25 ,WRAP=1.25 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P7,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P8,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P9,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P10,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$

TYPE=DATA, SIZE=8,BORDER= LIGHT,BORDER-COLOR = SILVER,JUSTIFY = CENTER,$

ENDSTYLE
END


WF 7.7.05 on Linux
HTML, PDF, EXCEL
December 19, 2011, 06:09 PM
Mighty Max
Move 'SORT VAL' to a HEADING. Also it's not good to use fieldnames with spaces. Use SORT_VAL or redfine the field.

  
BY 'SORT VAL' NOPRINT
HEADING
"<SORT VAL"



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
December 20, 2011, 09:04 AM
wf_devloper
heading is displayed on top of the page but i want the data to be centered to the middle of the page vertically.


WF 7.7.05 on Linux
HTML, PDF, EXCEL
December 20, 2011, 09:58 AM
RSquared
Try using A SUBHEADING.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
December 20, 2011, 11:08 AM
wf_devloper
I want the data in the column 'SORT VAL' to be displayed in the middle of the column instead of the first row.


WF 7.7.05 on Linux
HTML, PDF, EXCEL
December 20, 2011, 11:22 AM
RSquared
Can you give an example of the report layout?

Thanx


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
December 20, 2011, 12:40 PM
wf_devloper
If you run the above code you see that the first column is 'SORT VAL' and the data 'FIRST COL' is displayed in the first row and instead of displaying it in the first row i want 'FIRST COL' to be aligned to the middle of 10th and 11th row.


WF 7.7.05 on Linux
HTML, PDF, EXCEL
December 20, 2011, 01:23 PM
RSquared
Try something like this.
 
FILEDEF H1 DISK H1( APPEND
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS H1 FORMAT ALPHA
END
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS H1 FORMAT ALPHA
END
DEFINE FILE H1
'SORT VAL'/A10 = 'FIRST COL';
END
TABLE FILE H1
PRINT
COUNTRY IN 0
CAR	   IN 10
MODEL  IN 20
SALES  IN 30
LENGTH IN 50
CAR    IN 60
COUNTRY IN 67
MODEL   IN 75
SALES   IN 85
BY 'SORT VAL' IN 40
ON TABLE PCHOLD FORMAT PDF
ON TABLE NOTOTAL
ON TABLE SET PAGE OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, LEFTMARGIN=0.81250000, RIGHTMARGIN=0.11250000, TOPMARGIN=0, BOTTOMMARGIN=0.050000000, ORIENTATION=LANDSCAPE,$
TYPE=REPORT,GRID=OFF,FONT='ARIAL',SIZE=8,STYLE=NORMAL,LEFTGAP = .031,RIGHTGAP = .031,TOPGAP = .05,BOTTOMGAP = .05,$
TYPE = TITLE, GRID=OFF, TOPGAP=0.04, BOTTOMGAP=0.04, $
TYPE=TITLE, STYLE=-UNDERLINE+BOLD,BORDER= LIGHT,BORDER-COLOR = SILVER,JUSTIFY = CENTER,$
TYPE=REPORT,COLUMN=P1,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P2,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P3,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P4,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P5,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P6,SQUEEZE=1.25 ,WRAP=1.25 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P7,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P8,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P9,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P10,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$

TYPE=DATA, SIZE=8,BORDER= LIGHT,BORDER-COLOR = SILVER,JUSTIFY = CENTER,$

ENDSTYLE
END




WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
December 20, 2011, 02:10 PM
Dgraff
Or you could open this in the GUI enter heading mode make 1 item and center it looks like this

TABLE FILE H1
PRINT
'H1.H1.COUNTRY'
'H1.H1.CAR'
'H1.H1.MODEL'
'H1.H1.SALES'
'H1.H1.LENGTH'
'H1.H1.CAR'
'H1.H1.COUNTRY'
'H1.H1.MODEL'
'H1.H1.SALES'
BY 'SORT_VAL' NOPRINT
HEADING
"ON TABLE SET PAGE OFF
ON TABLE SET PAGE NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.805556,
RIGHTMARGIN=0.055556,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.041667,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
STYLE=NORMAL,
RIGHTGAP=0.027778,
LEFTGAP=0.027778,
TOPGAP=0.041667,
BOTTOMGAP=0.041667,
$
TYPE=DATA,
SIZE=8,
JUSTIFY=CENTER,
$
TYPE=TITLE,
STYLE=BOLD,
TOPGAP=0.027778,
BOTTOMGAP=0.027778,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
OBJECT=FIELD,
ITEM=1,
JUSTIFY=CENTER,
WIDTH=8.500,
$
TYPE=REPORT,
COLUMN=N1,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N2,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N3,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N4,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N5,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N6,
SIZE=8,
STYLE=NORMAL,
WRAP=1.250000,
$
TYPE=REPORT,
COLUMN=N7,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N8,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N9,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N10,
SIZE=8,
STYLE=NORMAL,
WRAP=0.750000,
$
ENDSTYLE
END


Duane

WebFOCUS 8.0.7
DS 8.0.7 AS 8.0.7
Windows
Output: Excel, HTML, PDF, AHTML,Mobile
In Focus 1982
December 20, 2011, 05:53 PM
mgrackin
@WF_DEVLOPER

I wrote a couple of WebFOCUS articles years ago that may be of help to you. Here is a direct link to the second one which is located under the IBI Developer Center:

WebFOCUS HTML and PDF Report Design - Part II


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
December 21, 2011, 08:58 AM
wf_devloper
Hi All,
thanks for the replies. I am sorry for not able to explain my issue properly. What i am looking for is to display the SORT_VAL column the way it is displayed in the below report with out displaying the empty space underneath the other columns. I just want to move the sort_val data only.

FILEDEF H1 DISK H1( APPEND
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS H1 FORMAT ALPHA
END
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS H1 FORMAT ALPHA
END
DEFINE FILE H1
LF/A1 = HEXBYT(10, 'A1');
CR/A1 = HEXBYT(13, 'A1');
CRLF/A2 = CR || LF;

'SORT_VAL'/A100 = CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || CRLF || 'FIRST COL';
END
TABLE FILE H1
PRINT
COUNTRY
CAR
MODEL
SALES
LENGTH
CAR
COUNTRY
MODEL
SALES
BY 'SORT_VAL'
ON TABLE PCHOLD FORMAT PDF
ON TABLE NOTOTAL
ON TABLE SET PAGE OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, LEFTMARGIN=0.81250000, RIGHTMARGIN=0.11250000, TOPMARGIN=0, BOTTOMMARGIN=0.050000000, ORIENTATION=LANDSCAPE,$
TYPE=REPORT,GRID=OFF,FONT='ARIAL',SIZE=8,STYLE=NORMAL,LEFTGAP = .031,RIGHTGAP = .031,TOPGAP = .05,BOTTOMGAP = .05, LINEBREAK = 'CRLF',$
TYPE = TITLE, GRID=OFF, TOPGAP=0.04, BOTTOMGAP=0.04, $
TYPE=TITLE, STYLE=-UNDERLINE+BOLD,BORDER= LIGHT,BORDER-COLOR = SILVER,JUSTIFY = CENTER,$
TYPE=REPORT,COLUMN=P1,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P2,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P3,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P4,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P5,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P6,SQUEEZE=1.25 ,WRAP=1.25 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P7,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P8,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P9,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$
TYPE=REPORT,COLUMN=P10,SQUEEZE=.75 ,WRAP=.75 ,SIZE=8,STYLE=NORMAL,$

TYPE=DATA, SIZE=8,BORDER= LIGHT,BORDER-COLOR = SILVER,JUSTIFY = CENTER,$

ENDSTYLE
END


WF 7.7.05 on Linux
HTML, PDF, EXCEL