FOCUS and WebFOCUS Output Formats: The More You Know Walter F. Blood Technical Director, FOCUS...
-
Upload
sheila-bradley -
Category
Documents
-
view
233 -
download
0
Transcript of FOCUS and WebFOCUS Output Formats: The More You Know Walter F. Blood Technical Director, FOCUS...
FOCUS and WebFOCUS Output Formats: The More You Know
Walter F. BloodTechnical Director, FOCUS Division
November, 2009
Copyright 2009, Information Builders. Slide 1
FOCUS and WebFOCUS Output Formats Agenda HTML Output
Scrolling HTML Report Output SHOWBLANKS (HTML and EXL2K) TITLETEXT Attribute (HTML and EXL2K)
EXL2K Output Locking EXCEL Spreadsheet Values Identifying Null Values in Excel 2000 EXCEL Table of Contents and EXCEL Named Ranges EXL2K LANDSCAPE and BORDER Options
PDF Output Compressing PDF Output Files Respect Carriage Returns and / or Line Feeds Displaying the Total Number of Pages in a Sort Group: BYLASTPAGE Displaying Images stored in BLOB fields
HTML Output
Copyright 2009, Information Builders. Slide 3
FOCUS and WebFOCUS Output FormatsScrolling HTML Report Output
TYPE=REPORT, HFREEZE={ON|TOP|BOTTOM|OFF},
[SCROLLHEIGHT={4|nn[.n]}], $ HFREEZE=ON
Freezes the HEADING, COLUMN TITLEs, GRAND TOTALs and FOOTING
HFREEZE=TOP Freezes the HEADING and COLUMN TITLEs
HFREEZE=BOTTOM Freezes the GRAND TOTALs and FOOTING
nn[.n] Is the height, in inches, of the scrollable area. The default
is 4 inches.
Copyright 2009, Information Builders. Slide 4
FOCUS and WebFOCUS Output FormatsScrolling HTML Report Output
Copyright 2009, Information Builders. Slide 5
TABLE FILE CARHEADING"Car Report"PRINT CAR MODEL SEATS RCOST DCOSTBY COUNTRYFOOTING"Run on &TOD"ON TABLE COLUMN-TOTALON TABLE SET HTMLCSS ONON TABLE SET PAGE OFFON TABLE SET STYLE *TYPE=HEADING, JUSTIFY=CENTER,$ENDSTYLEEND
FOCUS and WebFOCUS Output FormatsScrolling HTML Report Output
Copyright 2009, Information Builders. Slide 6
TABLE FILE CARHEADING"Car Report"PRINT CAR MODEL SEATS RCOST DCOSTBY COUNTRYFOOTING"Run on &TOD"ON TABLE COLUMN-TOTALON TABLE SET HTMLCSS ONON TABLE SET PAGE OFFON TABLE SET STYLE *TYPE=REPORT,HFREEZE=ON, SCROLLHEIGHT=2.0,$TYPE=HEADING,JUSTIFY=CENTER,$ENDSTYLEEND
FOCUS and WebFOCUS Output FormatsScrolling HTML Report Output
Copyright 2009, Information Builders. Slide 7
HFREEZE=TOP
HFREEZE=BOTTOM
FOCUS and WebFOCUS Output FormatsSET SHOWBLANKS (HTML and EXL2K)
Copyright 2009, Information Builders. Slide 8
SET SHOWBLANKS=OFFDEFINE FILE MOVIESNEWCAT/A30 = IF CATEGORY EQ 'ACTION' THEN ' ACTION' ELSE IF CATEGORY EQ 'SCI/FI' THEN 'SCIENCE FICTION' ELSE IF CATEGORY EQ 'TRAIN/EX' THEN ' TRANING EXERCISE' ELSE IF CATEGORY EQ 'COMEDY' THEN 'COMEDY ' ELSE 'GENERAL';ENDTABLE FILE MOVIESSUM CATEGORY LISTPR/D12.2 COPIESBY NEWCAT ON TABLE SET STYLE *GRID=OFF,$TYPE=REPORT,FONT=COURIER NEW,$ENDSTYLEEND
SET SHOWBLANKS=ONON TABLE SET SHOWBLANKS ON
FOCUS and WebFOCUS Output FormatsSET SHOWBLANKS (HTML and EXL2K)
Preserve leading and internal blanks in HTML and EXL2K output Trailing blanks will not be preserved except in HEADING,
SUBHEAD, FOOTING, and SUBFOOT lines that use the default HEADING or FOOTING alignment
Copyright 2009, Information Builders. Slide 9
SET SHOWBLANKS=ONDEFINE FILE MOVIESNEWCAT/A30 = IF CATEGORY EQ 'ACTION' THEN ' ACTION' ELSE IF CATEGORY EQ 'SCI/FI' THEN 'SCIENCE FICTION' ELSE IF CATEGORY EQ 'TRAIN/EX' THEN ' TRANING EXERCISE' ELSE IF CATEGORY EQ 'COMEDY' THEN 'COMEDY ' ELSE 'GENERAL';ENDTABLE FILE MOVIESSUM CATEGORY LISTPR/D12.2 COPIESBY NEWCAT ON TABLE SET STYLE *GRID=OFF,$TYPE=REPORT,FONT=COURIER NEW,$ENDSTYLEEND
FOCUS and WebFOCUS Output Formats TITLETEXT Attribute
TABLE FILE CARSUM RCOST DCOSTBY COUNTRYBY CARBY MODELON TABLE PCHOLD FORMAT HTMLON TABLE SET STYLE *TYPE=REPORT,FONT=COURIER NEW, TITLETEXT='Car Sales Report',$ENDSTYLEEND
Using HTML allows the Browser Title to be customized
Feature not applicable to PDF
FOCUS and WebFOCUS Output Formats TITLETEXT Attribute
TABLE FILE CARSUM RCOST DCOSTBY COUNTRYBY CARBY MODELON TABLE PCHOLD FORMAT EXL2KON TABLE SET STYLE *TYPE=REPORT,FONT=COURIER NEW, TITLETEXT='Car Sales Report',$ENDSTYLEEND
Excel limits the length of worksheet titlesto 31 characters.
The following special characters cannot be used:
':', '?', '*', and '/'.
EXL2K Output
Copyright 2009, Information Builders. Slide 12
FOCUS and WebFOCUS Output FormatsLocking EXCEL Spreadsheet / Columns / ValuesTYPE=REPORT, PROTECTED={ON|OFF}, [LOCKED={ON|
OFF}],$ PROTECTED=ON
Required to lock a spreadsheet. If the LOCKED=OFF attribute is omitted, the entire
spreadsheet is locked.PROTECTED=OFF
Spreadsheet is not locked. Default behavior.LOCKED=ON
Locks the entire spreadsheet with PROTECTED=ONLOCKED=OFF
Unlocks the spreadsheet as a whole, but enables you to lock or unlock specific cells or groups of cells.
TYPE=type,[COLUMN=columnspec],LOCKED={ON|OFF},$
Copyright 2009, Information Builders. Slide 13
FOCUS and WebFOCUS Output FormatsLock an Entire Excel Spreadsheet
Copyright 2009, Information Builders. Slide 14
TABLE FILE CAR HEADING "Profit By Car " " " SUM RETAIL_COST DEALER_COST COMPUTE PROFIT/D12.2= RETAIL_COST - DEALER_COST; BY CAR ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * TYPE=REPORT,COLOR=BLUE, BACKCOLOR=SILVER,SIZE=9,$TYPE=REPORT,PROTECTED=ON,$ TYPE=HEADING,STYLE=BOLD, SIZE=14,$ TYPE=TITLE,STYLE=BOLD,SIZE=11,$ ENDSTYLE END
FOCUS and WebFOCUS Output FormatsLock a Single Column on an Excel Spreadsheet
Copyright 2009, Information Builders. Slide 15
TABLE FILE CAR HEADING "Profit By Car </1" SUM RETAIL_COST DEALER_COST COMPUTE PROFIT/D12.2= RETAIL_COST - DEALER_COST; BY CAR ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * TYPE=REPORT,COLOR=BLUE, BACKCOLOR=SILVER,SIZE=9,$TYPE=REPORT, PROTECTED=ON,LOCKED=OFF,$ TYPE=HEADING,STYLE=BOLD, SIZE=14,$ TYPE=TITLE,STYLE=BOLD,SIZE=11,$TYPE=DATA,COLUMN=2,LOCKED=ON,$ ENDSTYLE END
FOCUS and WebFOCUS Output FormatsIdentifying Null Values in Excel 2000
Copyright 2009, Information Builders. Slide 16
ON TABLE SET EMPTYCELLS [ON|OFF]
ON Indicates that empty spaces are displayed in the cells of the report for each field
where null values are retrieved from the database. ON is the default.
OFF Indicates that zeros, or the character string specified with the SET NODATA
command, will be displayed in the cells of the report for each field where null values are retrieved from the database. OFF must be specified when using SET NODATA.
ON TABLE SET NODATA string String of characters displayed in the cells of the report for each field where
null values are retrieved from the database. Maximum number of characters is 11 If the number of characters in the string exceeds the length of the output
field, the additional characters will not be displayed.
If special characters are used, the string must be enclosed in single quotes.
FOCUS and WebFOCUS Output FormatsIdentifying Null Values in Excel 2000
Copyright 2009, Information Builders. Slide 17
TABLE FILE CARSUM SALES BY COUNTRY ACROSS SEATSON TABLE PCHOLD FORMAT EXL2KEND
TABLE FILE CARSUM SALES BY COUNTRY ACROSS SEATSON TABLE SET EMPTYCELLS OFFON TABLE SET NODATA 'n/a' ON TABLE PCHOLD FORMAT EXL2KEND
ON TABLE SET EMPTYCELLS OFF-*ON TABLE SET NODATA 'n/a'
FOCUS and WebFOCUS Output FormatsEXCEL Table of Contents
Copyright 2009, Information Builders. Slide 18
ON TABLE {HOLD|PCHOLD} FORMAT EXL2K BYTOC
SET COMPOUND=BYTOC
Only a single BY field is allowed in EXL2K Multiple BY fields are allowed in HTML Optional number following BYTOC keyword can only be 1
Report must contain at least one BY field. BY field can be NOPRINT’d
Worksheet tab names are the BY field values that correspond to the data on the current worksheet
TITLETEXT keyword in the stylesheet will be ignored.
FOCUS and WebFOCUS Output FormatsEXCEL Table of Contents
Copyright 2009, Information Builders. Slide 19
SET COMPOUND=BYTOCTABLE FILE CARPRINT SALES BY COUNTRY NOPRINT BY CARON TABLE PCHOLD FORMAT EXL2KON TABLE SET STYLE *TYPE=REPORT,STYLE=BOLD,COLOR=YELLOW,BACKCOLOR=BLACK,$TYPE=DATA,BACKCOLOR=RED, $TYPE=DATA,COLUMN=CAR,COLOR=BLUE,BACKCOLOR=YELLOW,$END
FOCUS and WebFOCUS Output FormatsEXCEL Named Ranges
Copyright 2009, Information Builders. Slide 20
TYPE=type, IN-RANGES=rangename, $type
Identifies the WebFOCUS report component to be included in the range. Normally, both of the following are used together:
DATA adds the DATA element of the report to the named range (excludes heading, footing, and column titles).
TITLE adds the TITLE element of the report to the named range (includes all column titles).
Multiple elements can be added to the same named range.rangename
The name assigned to the output in the Excel workbook
FOCUS and WebFOCUS Output FormatsEXCEL Named Ranges
Copyright 2009, Information Builders. Slide 21
TABLE FILE GGSALESPRINT PRODUCT DATE UNITSBY REGIONBY DOLLARSON TABLE SET PAGE-NUM OFF ON TABLE SET BYDISPLAY ON ON TABLE NOTOTALON TABLE PCHOLD FORMAT EXL2KON TABLE SET STYLE * UNITS=IN,SQUEEZE=ON, ORIENTATION=PORTRAIT, $TYPE=REPORT,FONT='ARIAL', SIZE=9,COLOR='BLACK', BACKCOLOR='NONE',STYLE=NORMAL,$ TYPE=DATA,IN-RANGES='RegionalSales', $TYPE=TITLE,STYLE=BOLD, IN-RANGES='RegionalSales', $ ENDSTYLEEND
FOCUS and WebFOCUS Output Formats EXL2K LANDSCAPE and BORDER Options
StyleSheet Options: ORIENTATION=LANDSCAPE BORDER=ON are now supported for EXL2K report output.
The BORDER attribute supports the same options as currently available for FORMAT PDF except for border options available in Adobe PDF but not available in Microsoft Excel: Border line width: Excel 2003 does not have an option for
specifying a number to precisely set the border line width (thickness) in points.
Borders with grooves and ridges: Excel 2003 does not have an option for specifying grooved or ridged borders.
FORMAT EXL2K does not support the GRID=ON parameter.Available in Release 7.6.9
Copyright 2009, Information Builders. Slide 22
FOCUS and WebFOCUS Output Formats EXL2K LANDSCAPE and BORDER Options
Copyright 2009, Information Builders. Slide 23
TABLE FILE CARPRINT 'CAR.BODY.RETAIL_COST' 'CAR.BODY.DEALER_COST' 'CAR.BODY.SALES' 'CAR.BODY.SEATS'BY 'CAR.ORIGIN.COUNTRY'BY 'CAR.COMP.CAR'ON TABLE SET PAGE-NUM OFFON TABLE NOTOTALON TABLE PCHOLD FORMAT EXL2KON TABLE SET HTMLCSS ONON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE,$TYPE=REPORT, BORDER-TOP=LIGHT, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, FONT='ARIAL', SIZE=9,$
TYPE=TITLE, STYLE=BOLD,$TYPE=HEADING, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, SIZE=12, STYLE=BOLD,$TYPE=FOOTING, BORDER-TOP=OFF, BORDER-BOTTOM=OFF, BORDER-LEFT=OFF, BORDER-RIGHT=OFF, SIZE=12, STYLE=BOLD,$ENDSTYLEEND
FOCUS and WebFOCUS Output Formats EXL2K LANDSCAPE and BORDER Options
Copyright 2009, Information Builders. Slide 24
FOCUS and WebFOCUS Output Formats EXL2K LANDSCAPE and BORDER Options
Copyright 2009, Information Builders. Slide 25
PDF Output
Copyright 2009, Information Builders. Slide 26
FOCUS and WebFOCUS Output FormatsCompressing PDF Output Files
SET FILECOMPRESS = {ON|OFF}ON
Compresses PDF output files. The compressed PDF file size can be reduced to 25% of
the original PDF file size. OFF
Does not compress PDF output files. OFF is the default value.
This command applies to PDF output only It is ignored by all other output formats
Copyright 2009, Information Builders. Slide 27
FOCUS and WebFOCUS Output FormatsCompressing PDF Output Files
Copyright 2009, Information Builders. Slide 28
SET FILECOMPRESS=ONTABLE FILE GGSALESPRINT BUDUNITS UNITS BUDDOLLARS DOLLARSBY CATEGORYON TABLE SUBHEAD "SALES REPORT""**(CONFIDENTIAL)**""December 2001 </1" ON TABLE COLUMN-TOTALON TABLE SET PAGE-NUM OFF ON TABLE SET ONLINE-FMT PDF ON TABLE SET SQUEEZE ONON TABLE SET STYLESHEET * TYPE=TABHEADING,JUSTIFY=CENTER, GRID=ON,BACKCOLOR=SILVER,$ ENDSTYLEEND
FOCUS and WebFOCUS Output FormatsRespect Carriage Returns and / or Line Feeds: LINEBREAK
TYPE=REPORT,LINEBREAK='type',$
REPORT is the type of report component. TYPE must be REPORT; otherwise an error will result.
'type‘ specifies that line breaks will be inserted in a report based on the following:
LF Inserts a line break after each line-feed character found in all An and AnV fields.
CR Inserts a line break after each carriage-return character found in all An and AnV
fields. LFCR
Inserts a line break after each combination of a line-feed character followed by a carriage-return character found in all An and AnV fields.
CRLF Inserts a line break after each combination of a carriage-return character followed
by a line-feed character found in all An and AnV fields.
If An/AnV fields are included in HEADINGs (SUBHEADs, SUBFOOTs), WRAP=n attribute must be included in the Stylesheet syntax for these fields to make the LINEBREAK attribute effective.
Copyright 2009, Information Builders. Slide 29
FOCUS and WebFOCUS Output FormatsRespect Carriage Returns and / or Line Feeds: LINEBREAK
Copyright 2009, Information Builders. Slide 30
DEFINE FILE CAR
CR/A1 = HEXBYT(13, 'A1');
LF/A1 = HEXBYT(10, 'A1');
CRLF/A2 = CR || LF;
ABC1/A5 = EDIT (COUNTRY, '99999');
ABC2/A10 = EDIT (COUNTRY, '$$$$$9999999999');
ABC3/A30 = ABC1 || CRLF || ABC2;
ABC4/A30V = ABC1 || CRLF || ABC2;
END
TABLE FILE CAR
ABC3 ABC4
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,LINEBREAK='CRLF',$
ENDSTYLE
END
Works for PDF and EXL2K
What about HTML?
FOCUS and WebFOCUS Output FormatsRespect Carriage Returns and / or Line Feeds: LINEBREAK
Copyright 2009, Information Builders. Slide 31
…<TABLE BORDER CELLPADDING=1><TR><TD COLSPAN=2><TABLE CELLPADDING=0 WIDTH="100%"><TR><TD>PAGE 1</TD></TR></TABLE></TD></TR><TR><TD VALIGN=BOTTOM>ABC3</TD><TD VALIGN=BOTTOM>ABC4</TD></TR><TR><TD>ENGLAND</TD><TD>ENGLAND</TD></TR><TR><TD>JAPAN</TD><TD>JAPAN</TD></TR><TR><TD>ITALY</TD><TD>ITALY</TD></TR><TR><TD>W GERMANY</TD>…
FOCUS and WebFOCUS Output FormatsRespect Carriage Returns and / or Line Feeds: LINEBREAK
Copyright 2009, Information Builders. Slide 32
DEFINE FILE CAR CR/A1 = HEXBYT(13, 'A1'); LF/A1 = HEXBYT(10, 'A1'); CRLF/A2 = CR || LF; ABC1/A5 = EDIT (COUNTRY, '99999'); ABC2/A10 = EDIT (COUNTRY, '$$$$$9999999999'); ABC3/A30 = ABC1 || CRLF || ABC2; ABC3A/A32=STRREP(32,ABC3,2,CRLF,4,'<BR>',32,'A32'); ABC4/A30V = ABC1 || CRLF || ABC2; ABC4A/A32V=STRREP(32,ABC4,2,CRLF,4,'<BR>',32,'A32V'); ENDTABLE FILE CARPRINT ABC3A ABC4AON TABLE PCHOLD FORMAT HTMLEND
Use Global Replacement of CRLF with <BR>
or
Use <PRE> tag at beginning and </PRE> atend of field
FOCUS and WebFOCUS Output Formats Display Total Number of Pages in a Sort Group: BYLASTPAGE
{HEADING|FOOTING}
"Page <TABPAGENO of <BYLASTPAGE“ Display the number of pages of output within each sort group when
a report uses the REPAGE option to reset the page numbers for each sort group.
PAGE-BREAK is required on the same sort field using REPAGE or a lower level sort field. PAGE-BREAK starts a new page for each sort break.
REPAGE resets the page number to 1 for each sort break. <TABPAGENO is the current page number. <BYLASTPAGE is the last page number before the REPAGE. If the REPAGE option is not used in the report, the total number of
pages in the report (<TABLASTPAGE variable) is used for <BYLASTPAGE
Copyright 2009, Information Builders. Slide 33
FOCUS and WebFOCUS Output Formats Display Total Number of Pages in a Sort Group: BYLASTPAGE
Copyright 2009, Information Builders. Slide 34
TABLE FILE GGSALESHEADING CENTER"<PRODUCT : Page <TABPAGENO of <BYLASTPAGE " SUM UNITSBY PRODUCT NOPRINT REPAGEBY REGION PAGE-BREAKBY CATEGORYBY CITYON TABLE PCHOLD FORMAT PDFEND
FOCUS and WebFOCUS Output Formats Display Total Number of Pages in a Sort Group: BYLASTPAGE
Copyright 2009, Information Builders. Slide 35
Supported with styled output formats such as HTML & EXL2K
FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields
TYPE=headtype,[BY=byfield,],IMAGE=(blobfield), POSITION=(+xpos +ypos), SIZE=(width height), [PRESERVERATIO={ON|OFF}],$
TYPE=DATA, COLUMN=bloboutputfield, IMAGE=(blobfield), SIZE=(width height),[PRESERVERATIO={ON|OFF}] $
headtype HEADING, FOOTING, SUBHEAD, or SUBFOOT
blobfield Is any valid column reference for the BLOB field that contains
the image. BLOB field must be referenced in PRINT or LIST command
BLOB field must NOT be referenced in the HEADING/FOOTING/SUBHEAD/SUBFOOT
Copyright 2009, Information Builders. Slide 36
FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields
Copyright 2009, Information Builders. Slide 37
xpos yposOffsets from the top-left corner of HEADING, SUBHEAD, FOOTING OR SUBFOOTSpecified by the UNITS parameter (default is inches). These numbers are specified with a leading plus (+) sign to indicate that they are relative to the top-left corner of the report component, as opposed to absolute page coordinates.
width heightSpecify the dimensions to which the image is to be scaled If omitted, the original dimensions of the image are used
For a report columnIf omitted, default size is 1 inch by 1 inch.Width of the column and spacing between the lines is automatically adjusted to accommodate the image.
FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields
Copyright 2009, Information Builders. Slide 38
bloboutputfieldDesignates the column to be replaced with an image (usually this will be the image field itself). Multiple report columns can contain images.
PRESERVERATIO={ON|OFF}ON specifies that the aspect ratio (ratio of height to width) of the image should be preserved when it scaled to the specified SIZE.
Avoids distorting the appearance of the image. The image is scaled to the largest size possible within the bounds specified by SIZE for which the aspect ratio can be maintained.
OFF does not maintain the aspect ratio. OFF is the default value.
FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields
Copyright 2009, Information Builders. Slide 39
FILENAME=RETAILIMAGE, SUFFIX=SQLMSS , $SEGMENT=RETAILIMAGE, SEGTYPE=S0, $FIELDNAME=PRODUCTID, ALIAS=PRODUCTID, USAGE=A5, ACTUAL=A5, $FIELDNAME=PRODIMAGE, ALIAS=F02BLOB50000, USAGE=BLOB, ACTUAL=BLOB, MISSING=ON, $
JOIN PRODUCTID IN RETAILDETAIL TO PRODUCTID IN RETAILIMAGETABLE FILE RETAILDETAILHEADING CENTER"Product List"" "PRINT NAME/A30 PRICE PRODIMAGE AS 'PICTURE'BY PRODUCTID NOPRINTBY NAME NOPRINTON NAME UNDER-LINEON TABLE SET PAGE NOPAGEON TABLE PCHOLD FORMAT PDFON TABLE SET STYLE *TYPE=REPORT,COLOR=BLUE,$TYPE=HEADING, SIZE = 18, FONT = ARIAL, COLOR=RED,$TYPE=DATA,COLUMN=PRODIMAGE,IMAGE=(PRODIMAGE),SIZE=(1 1),$…
FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields
Copyright 2009, Information Builders. Slide 40
FOCUS and WebFOCUS Output Formats