Presentation is loading. Please wait.

Presentation is loading. Please wait.

FOCUS and WebFOCUS Output Formats: The More You Know

Similar presentations


Presentation on theme: "FOCUS and WebFOCUS Output Formats: The More You Know"— Presentation transcript:

1 FOCUS and WebFOCUS Output Formats: The More You Know
Walter F. Blood Technical Director, FOCUS Division November, 2009

2 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

3 HTML Output Copyright 2009, Information Builders. Slide 3 3

4 FOCUS and WebFOCUS Output Formats Scrolling 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. WebFOCUS/iWay New Features > Reporting Language Enhancements > Scrolling HTML Report Output Scrolling HTML Report Output How to: Scroll Report Output Reference: Usage Notes for Freezing Areas of HTML Report Output You may want to scroll the data in a report while freezing headings, column titles, and footings in order to see the context of the report output while scrolling. Using StyleSheet attributes, you can set aside a scrollable area for HTML report output. For information on working with stylesheets, see the Creating and Managing a WebFOCUS StyleSheet chapter in Creating Reports With WebFOCUS Language. Top of page Syntax: How to Scroll Report Output Using StyleSheet attributes, you can set aside a scrollable area for HTML report output: TYPE=REPORT, HFREEZE={ON|TOP|BOTTOM|OFF}, [ SCROLLHEIGHT={4|nn[.n]}], $ where: 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. Reference: Usage Notes for Freezing Areas of HTML Report Output The request must include the setting ON TABLE SET HTMLCSS ON. The following features are not supported: PAGE-BREAK, Compound Reports, TOC (Table of Contents), and On-Demand Paging. Information Builders

5 FOCUS and WebFOCUS Output Formats Scrolling HTML Report Output
TABLE FILE CAR HEADING "Car Report" PRINT CAR MODEL SEATS RCOST DCOST BY COUNTRY FOOTING "Run on &TOD" ON TABLE COLUMN-TOTAL ON TABLE SET HTMLCSS ON ON TABLE SET PAGE OFF ON TABLE SET STYLE * TYPE=HEADING, JUSTIFY=CENTER,$ ENDSTYLE END WebFOCUS/iWay New Features > Reporting Language Enhancements > Scrolling HTML Report Output Scrolling HTML Report Output How to: Scroll Report Output Reference: Usage Notes for Freezing Areas of HTML Report Output You may want to scroll the data in a report while freezing headings, column titles, and footings in order to see the context of the report output while scrolling. Using StyleSheet attributes, you can set aside a scrollable area for HTML report output. For information on working with stylesheets, see the Creating and Managing a WebFOCUS StyleSheet chapter in Creating Reports With WebFOCUS Language. Top of page Syntax: How to Scroll Report Output Using StyleSheet attributes, you can set aside a scrollable area for HTML report output: TYPE=REPORT, HFREEZE={ON|TOP|BOTTOM|OFF}, [ SCROLLHEIGHT={4|nn[.n]}], $ where: 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. Reference: Usage Notes for Freezing Areas of HTML Report Output The request must include the setting ON TABLE SET HTMLCSS ON. The following features are not supported: PAGE-BREAK, Compound Reports, TOC (Table of Contents), and On-Demand Paging. Information Builders Copyright 2009, Information Builders. Slide 5

6 FOCUS and WebFOCUS Output Formats Scrolling HTML Report Output
TABLE FILE CAR HEADING "Car Report" PRINT CAR MODEL SEATS RCOST DCOST BY COUNTRY FOOTING "Run on &TOD" ON TABLE COLUMN-TOTAL ON TABLE SET HTMLCSS ON ON TABLE SET PAGE OFF ON TABLE SET STYLE * TYPE=REPORT,HFREEZE=ON, SCROLLHEIGHT=2.0,$ TYPE=HEADING,JUSTIFY=CENTER,$ ENDSTYLE END WebFOCUS/iWay New Features > Reporting Language Enhancements > Scrolling HTML Report Output Scrolling HTML Report Output How to: Scroll Report Output Reference: Usage Notes for Freezing Areas of HTML Report Output You may want to scroll the data in a report while freezing headings, column titles, and footings in order to see the context of the report output while scrolling. Using StyleSheet attributes, you can set aside a scrollable area for HTML report output. For information on working with stylesheets, see the Creating and Managing a WebFOCUS StyleSheet chapter in Creating Reports With WebFOCUS Language. Top of page Syntax: How to Scroll Report Output Using StyleSheet attributes, you can set aside a scrollable area for HTML report output: TYPE=REPORT, HFREEZE={ON|TOP|BOTTOM|OFF}, [ SCROLLHEIGHT={4|nn[.n]}], $ where: 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. Reference: Usage Notes for Freezing Areas of HTML Report Output The request must include the setting ON TABLE SET HTMLCSS ON. The following features are not supported: PAGE-BREAK, Compound Reports, TOC (Table of Contents), and On-Demand Paging. Information Builders Copyright 2009, Information Builders. Slide 6

7 FOCUS and WebFOCUS Output Formats Scrolling HTML Report Output
HFREEZE=TOP HFREEZE=BOTTOM WebFOCUS/iWay New Features > Reporting Language Enhancements > Scrolling HTML Report Output Scrolling HTML Report Output How to: Scroll Report Output Reference: Usage Notes for Freezing Areas of HTML Report Output You may want to scroll the data in a report while freezing headings, column titles, and footings in order to see the context of the report output while scrolling. Using StyleSheet attributes, you can set aside a scrollable area for HTML report output. For information on working with stylesheets, see the Creating and Managing a WebFOCUS StyleSheet chapter in Creating Reports With WebFOCUS Language. Top of page Syntax: How to Scroll Report Output Using StyleSheet attributes, you can set aside a scrollable area for HTML report output: TYPE=REPORT, HFREEZE={ON|TOP|BOTTOM|OFF}, [ SCROLLHEIGHT={4|nn[.n]}], $ where: 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. Reference: Usage Notes for Freezing Areas of HTML Report Output The request must include the setting ON TABLE SET HTMLCSS ON. The following features are not supported: PAGE-BREAK, Compound Reports, TOC (Table of Contents), and On-Demand Paging. Information Builders Copyright 2009, Information Builders. Slide 7

8 FOCUS and WebFOCUS Output Formats SET SHOWBLANKS (HTML and EXL2K)
SET SHOWBLANKS=ON ON TABLE SET SHOWBLANKS ON SET SHOWBLANKS=OFF DEFINE FILE MOVIES NEWCAT/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'; END TABLE FILE MOVIES SUM CATEGORY LISTPR/D12.2 COPIES BY NEWCAT ON TABLE SET STYLE * GRID=OFF,$ TYPE=REPORT,FONT=COURIER NEW,$ ENDSTYLE WebFOCUS/iWay New Features > Reporting Language > Preserving Leading and Internal Blanks in Reports Preserving Leading and Internal Blanks in Reports How to: Preserve Leading and Internal Blanks in HTML and EXL2K Reports By default, HTML browsers and Excel remove leading and trailing blanks from text and compress multiple internal blanks to a single blank. If you want to preserve leading and internal blanks in HTML and EXL2K report output, you can issue the SET SHOWBLANKS=ON command. Even if you issue this command, trailing blanks will not be preserved except in heading, subheading, footing, and subfooting lines that use the default heading or footing alignment. Top of page Syntax: How to Preserve Leading and Internal Blanks in HTML and EXL2K Reports In a FOCEXEC, or in a profile use the following syntax SET SHOWBLANKS = {OFF|ON} In a request, use the following syntax ON TABLE SET SHOWBLANKS {OFF|ON} where: OFF Removes leading blanks and compresses internal blanks in HTML and EXL2K report output. ON Preserves leading blanks internal blanks in HTML and EXL2K report output. Also preserves trailing blanks in heading, subheading, footing, and subfooting lines that use the default heading or footing alignment. Example: Preserving Leading and Internal Blanks in HTML and EXL2K Report Output The following request creates a virtual field that adds leading blanks to the value ACTION and both leading and internal blanks to the values TRAIN/EX and SCI/FI in the CATEGORY field. It also adds trailing blanks to the value COMEDY: SET SHOWBLANKS = OFF DEFINE FILE MOVIES NEWCAT/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'; END TABLE FILE MOVIES SUM CATEGORY LISTPR/D12.2 COPIES BY NEWCAT ON TABLE SET STYLE * GRID=OFF,$ TYPE=REPORT, FONT=COURIER NEW,$ ENDSTYLE END With SHOWBLANKS OFF, these additional blanks are removed: With SHOWBLANKS ON, the additional leading and internal blanks are preserved. Note that trailing blanks are not preserved: Information Builders Audience: All Product: Information Builders Operating System: All Category: Technical Documentation Group: Information Builders File: 760snf/source/topic148.htm Release: and 6.2 Index Terms: SET parameters:SHOWBLANKS; SHOWBLANKS SET parameter;SET parameters; Copyright 2009, Information Builders. Slide 8

9 FOCUS and WebFOCUS Output Formats SET 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 SET SHOWBLANKS=ON DEFINE FILE MOVIES NEWCAT/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'; END TABLE FILE MOVIES SUM CATEGORY LISTPR/D12.2 COPIES BY NEWCAT ON TABLE SET STYLE * GRID=OFF,$ TYPE=REPORT,FONT=COURIER NEW,$ ENDSTYLE HTML browsers and Excel remove leading and trailing blanks from text and compress multiple internal blanks to a single blank Preserve leading and internal blanks in HTML and EXL2K report output, you can issue the SET SHOWBLANKS=ON command Trailing blanks will not be preserved except in heading, subheading, footing, and subfooting lines that use the default heading or footing alignment Copyright 2009, Information Builders. Slide 9

10 FOCUS and WebFOCUS Output Formats TITLETEXT Attribute
TABLE FILE CAR SUM RCOST DCOST BY COUNTRY BY CAR BY MODEL ON TABLE PCHOLD FORMAT HTML ON TABLE SET STYLE * TYPE=REPORT,FONT=COURIER NEW, TITLETEXT='Car Sales Report',$ ENDSTYLE END Using HTML allows the Browser Title to be customized Feature not applicable to PDF

11 FOCUS and WebFOCUS Output Formats TITLETEXT Attribute
TABLE FILE CAR SUM RCOST DCOST BY COUNTRY BY CAR BY MODEL ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * TYPE=REPORT,FONT=COURIER NEW, TITLETEXT='Car Sales Report',$ ENDSTYLE END Excel limits the length of worksheet titles to 31 characters. The following special characters cannot be used: ':', '?', '*', and '/'.

12 EXL2K Output Copyright 2009, Information Builders. Slide 12 12

13 TYPE=REPORT, PROTECTED={ON|OFF}, [LOCKED={ON|OFF}],$
FOCUS and WebFOCUS Output Formats Locking EXCEL Spreadsheet / Columns / Values TYPE=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=ON LOCKED=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},$ WebFOCUS/iWay New Features > Reporting Language Enhancements > Locking Excel Spreadsheet Values Locking Excel Spreadsheet Values How to: Lock a Spreadsheet Lock Specific Cells Within a Spreadsheet Lock an Entire Excel Spreadsheet Lock a Single Column on an Excel Spreadsheet Using StyleSheet attributes, you can lock Excel spreadsheet values so they are read-only. These attributes apply to all Excel formats including EXL2K, EXL2K PIVOT, and EXL2K FORMULA. For more information on working with Excel spreadsheets, see the Choosing a Display Format chapter in Creating Reports With WebFOCUS Language. For information on working with stylesheets, see the Creating and Managing a WebFOCUS StyleSheet chapter in Creating Reports With WebFOCUS Language. Top of page Syntax: How to Lock a Spreadsheet TYPE=REPORT, PROTECTED={ON|OFF}, [LOCKED={ON|OFF}],$ where: TYPE=REPORT, PROTECTED=ON Is necessary to lock a spreadsheet. PROTECTED=OFF is the default. If you omit the LOCKED=OFF attribute, the entire spreadsheet is locked. LOCKED=ON Locks the entire spreadsheet. LOCKED=OFF Unlocks the spreadsheet as a whole, but enables you to lock or unlock specific cells or groups of cells. Syntax: How to Lock Specific Cells Within a Spreadsheet Once you include the following declaration in your StyleSheet, you can specify the LOCKED attribute for specific cells or groups of cells: TYPE=REPORT, PROTECTED=ON, LOCKED=OFF,$ To lock specific parts of the spreadsheet, add the LOCKED=ON attribute to the StyleSheet declaration for the cells you want to lock. TYPE=type, [COLUMN=columnspec] ,LOCKED={ON|OFF},$ where: type Is the type of element that describes the cells to be locked. columnspec Is a valid column specification. Syntax: How to Lock an Entire Excel Spreadsheet The following request locks the entire spreadsheet because the StyleSheet declarations include the following declaration: TYPE=REPORT, PROTECTED=ON,$ The request is: TABLE FILE CAR HEADING "Profit By Car " " " SUM RETAIL_COST AND DEALER_COST AND COMPUTE PROFIT/D12.2 = RETAIL_COST - DEALER_COST; BY CAR ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD AS EXLFORM1 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 You cannot edit any value on the spreadsheet. Any attempt to do so displays a message that the sheet is protected. Syntax: How to Lock a Single Column on an Excel Spreadsheet The following request locks the second column (RETAIL_COST) because the StyleSheet declarations include the following declarations: TYPE=REPORT, PROTECTED=ON, LOCKED=OFF,$ TYPE=DATA, COLUMN=2, LOCKED=ON,$ The request is: TABLE FILE CAR HEADING "Profit By Car " " " SUM RETAIL_COST AND DEALER_COST AND COMPUTE PROFIT/D12.2 = RETAIL_COST - DEALER_COST; BY CAR ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD AS EXLFORM2 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 You cannot edit any value in column 2, although you can edit values in other columns. Any attempt to edit a value in column 2 displays a message that the cells are protected. Information Builders Copyright 2009, Information Builders. Slide 13

14 FOCUS and WebFOCUS Output Formats Lock an Entire Excel Spreadsheet
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 The following request locks the entire spreadsheet because the StyleSheet declarations include the following declaration: TYPE=REPORT, PROTECTED=ON,$ You cannot edit any value on the spreadsheet. Any attempt to do so displays a message that the sheet is protected. Copyright 2009, Information Builders. Slide 14

15 FOCUS and WebFOCUS Output Formats Lock a Single Column on an Excel Spreadsheet
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 The following request locks the second column (RETAIL_COST) because the StyleSheet declarations include the following declarations: TYPE=REPORT, PROTECTED=ON, LOCKED=OFF,$ TYPE=DATA, COLUMN=2, LOCKED=ON,$ You cannot edit any value in column 2, although you can edit values in other columns. Any attempt to edit a value in column 2 displays a message that the cells are protected. Copyright 2009, Information Builders. Slide 15

16 ON TABLE SET EMPTYCELLS [ON|OFF]
FOCUS and WebFOCUS Output Formats Identifying Null Values in Excel 2000 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. Identifying Null Values in Excel 2000 How to: Identify Null Values in Excel 2000 When an Excel 2000 report is run, and null values are retrieved for one or more fields, blank spaces are displayed by default in each cell of the report output for the empty (null) fields. This behavior is the result of SET EMPTYCELLS ON being set by default in the background of all Excel 2000 reports. If you want to identify null values with something other than blank spaces, a character string can be used to populate all empty fields in a report. Top of page Syntax: How to Identify Null Values in Excel 2000 To identify null values in Excel 2000, use ON TABLE SET NODATA character_string  ON TABLE SET EMPTYCELLS [ON|OFF] where: character_string Is the string of characters displayed in the cells of the report for each field where null values are retrieved from the database. The 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. SET EMPTYCELLS OFF must also be specified to make the SET NODATA command effective. 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. Example: Identifying Null Values in Excel 2000 The following syntax utilizes the default behavior of ON TABLE SET EMPTYCELLS ON, which is set in the background: TABLE FILE CAR SUM SALES BY COUNTRY ACROSS SEATS ON TABLE PCHOLD FORMAT EXL2K END The following output displays empty spaces in the cells of the report for each field where null values are retrieved from the database: The following syntax utilizes the SET NODATA command: TABLE FILE CAR SUM SALES BY COUNTRY ACROSS SEATS ON TABLE SET NODATA 'n/a' ON TABLE SET EMPTYCELLS OFF ON TABLE PCHOLD FORMAT EXL2K END Note: If you do not add SET EMPTYCELLS OFF, the SET NODATA command will be ignored. The following output displays 'n/a' in the cells of the report for each field where null values are retrieved from the database: The following syntax turns off the default SET EMPTYCELLS behavior and does not use SET NODATA, which makes it impossible to distinguish null values from zero quantities: TABLE FILE CAR SUM SALES BY COUNTRY ACROSS SEATS ON TABLE SET EMPTYCELLS OFF ON TABLE PCHOLD FORMAT EXL2K END The following output displays zeros in the cells of the report for each field where either null values are retrieved from the database or the quantity is zero: Copyright 2009, Information Builders. Slide 16

17 FOCUS and WebFOCUS Output Formats Identifying Null Values in Excel 2000
TABLE FILE CAR SUM SALES BY COUNTRY ACROSS SEATS ON TABLE PCHOLD FORMAT EXL2K END TABLE FILE CAR SUM SALES BY COUNTRY ACROSS SEATS ON TABLE SET EMPTYCELLS OFF ON TABLE SET NODATA 'n/a' ON TABLE PCHOLD FORMAT EXL2K END ON TABLE SET EMPTYCELLS OFF -*ON TABLE SET NODATA 'n/a' Copyright 2009, Information Builders. Slide 17

18 FOCUS and WebFOCUS Output Formats EXCEL Table of Contents
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. Creating Excel Tables of Contents Reports How to: Use the Excel Table of Contents Feature Reference: How to Name Worksheets Limitations of TOC Reports Excel Table of Contents (TOC) enables you to generate a multiple worksheet report in which a separate worksheet is generated for each value of the first BY field in the FOCUS report. Note: This feature can be used only with EXCEL 2002 or higher releases because it requires the Web Archive file format, which was not available in Excel 2000 and earlier releases. Top of page Syntax: How to Use the Excel Table of Contents Feature The syntax is identical to that of HTML TOC reports, except that only a single BY field is allowed in EXL2K, while multiple BY fields are allowed in HTML. ON TABLE {HOLD|PCHOLD} FORMAT EXL2K BYTOC Since only one level of TOC is allowed for EXL2K reports, the optional number following the BYTOC keyword can only be 1. As with HTML, the SET COMPOUND syntax, which precedes the TABLE command, may also be used to specify that a TOC be created: SET COMPOUND=BYTOC Since a TOC report is burst into worksheets according to the value of the first BY field in the report, the report must contain at least one BY field. The bursting field may be a NOPRINT field. Reference: How to Name Worksheets The worksheet tab names are the BY field values that correspond to the data on the current worksheet. If the user specifies the TITLETEXT keyword in the stylesheet, it will be ignored. Excel limits the length of worksheet titles to 31 characters. The following special characters cannot be used: ':', '?', '*', and '/'. If you want to use date fields as the bursting BY field, you can include the - character instead of the / character. The - character is valid in an Excel tab title. However, if you do use the / character, WebFOCUS will substitute it with the - character. Reference: Limitations of TOC Reports A TOC report cannot be embedded in a compound report. A TOC report cannot be a pivot table report. Note: FORMULA is not supported with bursting. Example: Creating a Simple TOC Report SET COMPOUND=BYTOC TABLE FILE CAR PRINT SALES BY COUNTRY NOPRINT BY CAR ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * type=report, style=bold, color=yellow, backcolor=black, $ type=data, backcolor=red, $ type=data, column=car, color=blue, backcolor=yellow, $ END The output is: WebFOCUS Copyright 2009, Information Builders. Slide 18

19 FOCUS and WebFOCUS Output Formats EXCEL Table of Contents
SET COMPOUND=BYTOC TABLE FILE CAR PRINT SALES BY COUNTRY NOPRINT BY CAR ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * TYPE=REPORT,STYLE=BOLD,COLOR=YELLOW,BACKCOLOR=BLACK,$ TYPE=DATA,BACKCOLOR=RED, $ TYPE=DATA,COLUMN=CAR,COLOR=BLUE,BACKCOLOR=YELLOW,$ END Reference: Limitations of TOC Reports A TOC report cannot be embedded in a compound report. A TOC report cannot be a pivot table report. Note: FORMULA is not supported with bursting. Copyright 2009, Information Builders. Slide 19

20 FOCUS and WebFOCUS Output Formats EXCEL Named Ranges
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 Utilizing Excel Named Ranges How to: Use Excel Named Ranges Reference: Rules for Excel Named Ranges Support for Excel Named Ranges An Excel Named Range is a name assigned to a specific group of cells within an Excel worksheet that can be easily referenced by WebFOCUS applications. WebFOCUS StyleSheet language facilitates the generation of Named Ranges. The use of Excel Named Ranges provides many benefits, including the following: Provides advantages over static cell references, including the ability of named range data areas to expand to include new data added during scheduled workbook updates. Enables easy setup of Excel worksheets, created by WebFOCUS applications, as an ODBC (Open Database Connectivity) data source. Provides accurate, consistent data feeds to advanced Excel worksheet applications, which eliminates manual activities that tend to result in errors. Simplifies the process of referencing data in multiple worksheets. This is especially useful when named ranges are added to the output of an Excel Template report. Top of page Syntax: How to Use Excel Named Ranges To create Excel Named Ranges, use TYPE=type, IN-RANGES=rangename, $ where: 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). Note: Multiple elements can be added to the same named range. rangename Is the name assigned to the output in the Excel workbook your application is creating, and is also the name that will be referenced by other WebFOCUS applications. Example: Using Excel Named Ranges This example creates one report in one worksheet of an Excel workbook. The code specific to Excel Named Ranges appears in bold in the following syntax. TABLE FILE GGSALES PRINT PRODUCT DATE UNITS BY REGION BY DOLLARS ON TABLE SET PAGE-NUM OFF ON TABLE SET BYDISPLAY ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K ON 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', $ ENDSTYLE END The Excel output is: The name assigned to this Excel Named Range is RegionalSales. If additional rows of data are added, or columns of data are inserted, the named range will stretch to contain both new and existing data. Reference: Rules for Excel Named Ranges The Excel data area associated with a named range must be continuous and cannot contain any breaks in the data. Examples of report components containing breaks in the data that cannot be part of a named range include SUBHEAD and SUBFOOT. It is recommended that you use ON TABLE SET BYDISPLAY ON. This activates the option to display repeated sort values, which produces continuous output with no breaks in the data. Two different worksheets from the same workbook cannot have the same range name. When creating Compound Excel reports (multiple TABLE requests output to the same Excel workbook), each report must have a unique range name that is stored at the workbook level. Reference: Support for Excel Named Ranges Excel Named Ranges are supported for the following Excel formats: EXL2K, EXL2K FORMULA, EXL2 TEMPLATE Excel Named Ranges are not supported for the following Excel formats: EXL2K BYTOC, EXCEL PIVOT Excel Named Ranges are not supported with any report syntax that produces discontinuous data or uses columnar references that span multiple columns, which includes the following: ACROSSCOLUMN, RECAP, RECOMPUTE, SUBHEAD, SUBFOOT, SUBTOTAL, SUB-TOTAL, Copyright 2009, Information Builders. Slide 20

21 FOCUS and WebFOCUS Output Formats EXCEL Named Ranges
TABLE FILE GGSALES PRINT PRODUCT DATE UNITS BY REGION BY DOLLARS ON TABLE SET PAGE-NUM OFF ON TABLE SET BYDISPLAY ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K ON 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', $ ENDSTYLE END Utilizing Excel Named Ranges How to: Use Excel Named Ranges Reference: Rules for Excel Named Ranges Support for Excel Named Ranges An Excel Named Range is a name assigned to a specific group of cells within an Excel worksheet that can be easily referenced by WebFOCUS applications. WebFOCUS StyleSheet language facilitates the generation of Named Ranges. The use of Excel Named Ranges provides many benefits, including the following: Provides advantages over static cell references, including the ability of named range data areas to expand to include new data added during scheduled workbook updates. Enables easy setup of Excel worksheets, created by WebFOCUS applications, as an ODBC (Open Database Connectivity) data source. Provides accurate, consistent data feeds to advanced Excel worksheet applications, which eliminates manual activities that tend to result in errors. Simplifies the process of referencing data in multiple worksheets. This is especially useful when named ranges are added to the output of an Excel Template report. Top of page Syntax: How to Use Excel Named Ranges To create Excel Named Ranges, use TYPE=type, IN-RANGES=rangename, $ where: 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). Note: Multiple elements can be added to the same named range. rangename Is the name assigned to the output in the Excel workbook your application is creating, and is also the name that will be referenced by other WebFOCUS applications. Example: Using Excel Named Ranges This example creates one report in one worksheet of an Excel workbook. The code specific to Excel Named Ranges appears in bold in the following syntax. TABLE FILE GGSALES PRINT PRODUCT DATE UNITS BY REGION BY DOLLARS ON TABLE SET PAGE-NUM OFF ON TABLE SET BYDISPLAY ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K ON 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', $ ENDSTYLE END The Excel output is: The name assigned to this Excel Named Range is RegionalSales. If additional rows of data are added, or columns of data are inserted, the named range will stretch to contain both new and existing data. Reference: Rules for Excel Named Ranges The Excel data area associated with a named range must be continuous and cannot contain any breaks in the data. Examples of report components containing breaks in the data that cannot be part of a named range include SUBHEAD and SUBFOOT. It is recommended that you use ON TABLE SET BYDISPLAY ON. This activates the option to display repeated sort values, which produces continuous output with no breaks in the data. Two different worksheets from the same workbook cannot have the same range name. When creating Compound Excel reports (multiple TABLE requests output to the same Excel workbook), each report must have a unique range name that is stored at the workbook level. Reference: Support for Excel Named Ranges Excel Named Ranges are supported for the following Excel formats: EXL2K, EXL2K FORMULA, EXL2 TEMPLATE Excel Named Ranges are not supported for the following Excel formats: EXL2K BYTOC, EXCEL PIVOT Excel Named Ranges are not supported with any report syntax that produces discontinuous data or uses columnar references that span multiple columns, which includes the following: ACROSSCOLUMN, RECAP, RECOMPUTE, SUBHEAD, SUBFOOT, SUBTOTAL, SUB-TOTAL, Copyright 2009, Information Builders. Slide 21

22 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

23 FOCUS and WebFOCUS Output Formats EXL2K LANDSCAPE and BORDER Options
TABLE FILE CAR PRINT '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 OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET HTMLCSS ON ON 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, TYPE=FOOTING, ENDSTYLE END Copyright 2009, Information Builders. Slide 23

24 FOCUS and WebFOCUS Output Formats EXL2K LANDSCAPE and BORDER Options
Copyright 2009, Information Builders. Slide 24

25 FOCUS and WebFOCUS Output Formats EXL2K LANDSCAPE and BORDER Options
Copyright 2009, Information Builders. Slide 25

26 PDF Output

27 FOCUS and WebFOCUS Output Formats Compressing 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

28 FOCUS and WebFOCUS Output Formats Compressing PDF Output Files
SET FILECOMPRESS=ON TABLE FILE GGSALES PRINT BUDUNITS UNITS BUDDOLLARS DOLLARS BY CATEGORY ON TABLE SUBHEAD "SALES REPORT" "**(CONFIDENTIAL)**" "December 2001 </1" ON TABLE COLUMN-TOTAL ON TABLE SET PAGE-NUM OFF ON TABLE SET ONLINE-FMT PDF ON TABLE SET SQUEEZE ON ON TABLE SET STYLESHEET * TYPE=TABHEADING,JUSTIFY=CENTER, GRID=ON,BACKCOLOR=SILVER,$ ENDSTYLE END Copyright 2009, Information Builders. Slide 28

29 TYPE=REPORT,LINEBREAK='type',$
FOCUS and WebFOCUS Output Formats Respect 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. WebFOCUS Release 7.1.3 Respect CARRIAGE RETURNs (CR) and LINE FEEDs (LF) ALPHANUMERIC fields – both An and AnV formats Copyright 2009, Information Builders. Slide 29

30 FOCUS and WebFOCUS Output Formats Respect Carriage Returns and / or Line Feeds: LINEBREAK
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, '$$$$$ '); ABC3/A30 = ABC1 || CRLF || ABC2; ABC4/A30V = ABC1 || CRLF || ABC2; END TABLE FILE CAR PRINT ABC3 ABC4 ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT,LINEBREAK='CRLF',$ ENDSTYLE Works for PDF and EXL2K What about HTML? WebFOCUS Release 7.1.3 Respect CARRIAGE RETURNs (CR) and LINE FEEDs (LF) ALPHANUMERIC fields – both An and AnV formats Copyright 2009, Information Builders. Slide 30

31 FOCUS and WebFOCUS Output Formats Respect Carriage Returns and / or Line Feeds: LINEBREAK
<TABLE BORDER CELLPADDING=1> <TR> <TD COLSPAN=2> <TABLE CELLPADDING=0 WIDTH="100%"><TR> <TD> PAGE 1</TD></TR></TABLE></TD> </TR> <TD VALIGN=BOTTOM> ABC3</TD> ABC4</TD> ENGLA ND</TD> JAPAN </TD> ITALY W GER MANY</TD> WebFOCUS Release 7.1.3 Respect CARRIAGE RETURNs (CR) and LINE FEEDs (LF) ALPHANUMERIC fields – both An and AnV formats Copyright 2009, Information Builders. Slide 31

32 FOCUS and WebFOCUS Output Formats Respect Carriage Returns and / or Line Feeds: LINEBREAK
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, '$$$$$ '); 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'); END TABLE FILE CAR PRINT ABC3A ABC4A ON TABLE PCHOLD FORMAT HTML Use Global Replacement of CRLF with <BR> or Use <PRE> tag at beginning and </PRE> at end of field WebFOCUS Release 7.1.3 Respect CARRIAGE RETURNs (CR) and LINE FEEDs (LF) ALPHANUMERIC fields – both An and AnV formats Copyright 2009, Information Builders. Slide 32

33 "Page <TABPAGENO of <BYLASTPAGE“
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 Variable can only be used with styled output formats Displaying the Total Number of Pages in a Sort Group: <BYLASTPAGE How to: Display the Total Number of Pages Within Each Sort Group You can use the <BYLASTPAGE variable in a heading or footing to 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. This variable can only be used with styled output formats. If the REPAGE option is not used in the report, the total number of pages in the report (<TABLASTPAGE variable) is used for <BYLASTPAGE. Syntax: How to Display the Total Number of Pages Within Each Sort Group The request must have the following syntax and hold the output in a styled output format: BY sortfield PAGE-BREAK REPAGE The heading or footing can use the following syntax to display “Page x of y” {HEADING|FOOTING} "Page <TABPAGENO of <BYLASTPAGE" 242 WebFOCUS where: sortfield Is the sort field that has the REPAGE option. A PAGE-BREAK is required on the same sort field 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. Example: Paginating Within a Sort Group The following request against the GGSALES data source sorts by product, region, category, and city. It resets the pagination each time the product changes. The heading prints the current page number and the total within each product group: TABLE FILE GGSALES HEADING CENTER "<PRODUCT : Page <TABPAGENO of <BYLASTPAGE " SUM UNITS BY PRODUCT NOPRINT REPAGE BY REGION PAGE-BREAK BY CATEGORY BY CITY ON TABLE PCHOLD FORMAT PDF END The following partial output shows that the page number resets to 1 when the product changes and that the BYLASTPAGE variable displays the total number of pages for each product: WebFOCUS New Features 243 11. Reporting Language Enhancements 244 WebFOCUS Copyright 2009, Information Builders. Slide 33

34 FOCUS and WebFOCUS Output Formats Display Total Number of Pages in a Sort Group: BYLASTPAGE
TABLE FILE GGSALES HEADING CENTER "<PRODUCT : Page <TABPAGENO of <BYLASTPAGE " SUM UNITS BY PRODUCT NOPRINT REPAGE BY REGION PAGE-BREAK BY CATEGORY BY CITY ON TABLE PCHOLD FORMAT PDF END Variable can only be used with styled output formats Copyright 2009, Information Builders. Slide 34

35 Supported with styled output formats such as HTML & EXL2K
FOCUS and WebFOCUS Output Formats Display Total Number of Pages in a Sort Group: BYLASTPAGE Variable can only be used with styled output formats Supported with styled output formats such as HTML & EXL2K Copyright 2009, Information Builders. Slide 35

36 HEADING, FOOTING, SUBHEAD, or SUBFOOT blobfield
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 Variable can only be used with styled output formats Displaying the Total Number of Pages in a Sort Group: <BYLASTPAGE How to: Display the Total Number of Pages Within Each Sort Group You can use the <BYLASTPAGE variable in a heading or footing to 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. This variable can only be used with styled output formats. If the REPAGE option is not used in the report, the total number of pages in the report (<TABLASTPAGE variable) is used for <BYLASTPAGE. Syntax: How to Display the Total Number of Pages Within Each Sort Group The request must have the following syntax and hold the output in a styled output format: BY sortfield PAGE-BREAK REPAGE The heading or footing can use the following syntax to display “Page x of y” {HEADING|FOOTING} "Page <TABPAGENO of <BYLASTPAGE" 242 WebFOCUS where: sortfield Is the sort field that has the REPAGE option. A PAGE-BREAK is required on the same sort field 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. Example: Paginating Within a Sort Group The following request against the GGSALES data source sorts by product, region, category, and city. It resets the pagination each time the product changes. The heading prints the current page number and the total within each product group: TABLE FILE GGSALES HEADING CENTER "<PRODUCT : Page <TABPAGENO of <BYLASTPAGE " SUM UNITS BY PRODUCT NOPRINT REPAGE BY REGION PAGE-BREAK BY CATEGORY BY CITY ON TABLE PCHOLD FORMAT PDF END The following partial output shows that the page number resets to 1 when the product changes and that the BYLASTPAGE variable displays the total number of pages for each product: WebFOCUS New Features 243 11. Reporting Language Enhancements 244 WebFOCUS Copyright 2009, Information Builders. Slide 36

37 Specified by the UNITS parameter (default is inches).
FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields xpos ypos Offsets from the top-left corner of HEADING, SUBHEAD, FOOTING OR SUBFOOT Specified 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 height Specify the dimensions to which the image is to be scaled If omitted, the original dimensions of the image are used For a report column If 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. Variable can only be used with styled output formats Displaying the Total Number of Pages in a Sort Group: <BYLASTPAGE How to: Display the Total Number of Pages Within Each Sort Group You can use the <BYLASTPAGE variable in a heading or footing to 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. This variable can only be used with styled output formats. If the REPAGE option is not used in the report, the total number of pages in the report (<TABLASTPAGE variable) is used for <BYLASTPAGE. Syntax: How to Display the Total Number of Pages Within Each Sort Group The request must have the following syntax and hold the output in a styled output format: BY sortfield PAGE-BREAK REPAGE The heading or footing can use the following syntax to display “Page x of y” {HEADING|FOOTING} "Page <TABPAGENO of <BYLASTPAGE" 242 WebFOCUS where: sortfield Is the sort field that has the REPAGE option. A PAGE-BREAK is required on the same sort field 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. Example: Paginating Within a Sort Group The following request against the GGSALES data source sorts by product, region, category, and city. It resets the pagination each time the product changes. The heading prints the current page number and the total within each product group: TABLE FILE GGSALES HEADING CENTER "<PRODUCT : Page <TABPAGENO of <BYLASTPAGE " SUM UNITS BY PRODUCT NOPRINT REPAGE BY REGION PAGE-BREAK BY CATEGORY BY CITY ON TABLE PCHOLD FORMAT PDF END The following partial output shows that the page number resets to 1 when the product changes and that the BYLASTPAGE variable displays the total number of pages for each product: WebFOCUS New Features 243 11. Reporting Language Enhancements 244 WebFOCUS Copyright 2009, Information Builders. Slide 37

38 PRESERVERATIO={ON|OFF}
FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields bloboutputfield Designates 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. Variable can only be used with styled output formats Displaying the Total Number of Pages in a Sort Group: <BYLASTPAGE How to: Display the Total Number of Pages Within Each Sort Group You can use the <BYLASTPAGE variable in a heading or footing to 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. This variable can only be used with styled output formats. If the REPAGE option is not used in the report, the total number of pages in the report (<TABLASTPAGE variable) is used for <BYLASTPAGE. Syntax: How to Display the Total Number of Pages Within Each Sort Group The request must have the following syntax and hold the output in a styled output format: BY sortfield PAGE-BREAK REPAGE The heading or footing can use the following syntax to display “Page x of y” {HEADING|FOOTING} "Page <TABPAGENO of <BYLASTPAGE" 242 WebFOCUS where: sortfield Is the sort field that has the REPAGE option. A PAGE-BREAK is required on the same sort field 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. Example: Paginating Within a Sort Group The following request against the GGSALES data source sorts by product, region, category, and city. It resets the pagination each time the product changes. The heading prints the current page number and the total within each product group: TABLE FILE GGSALES HEADING CENTER "<PRODUCT : Page <TABPAGENO of <BYLASTPAGE " SUM UNITS BY PRODUCT NOPRINT REPAGE BY REGION PAGE-BREAK BY CATEGORY BY CITY ON TABLE PCHOLD FORMAT PDF END The following partial output shows that the page number resets to 1 when the product changes and that the BYLASTPAGE variable displays the total number of pages for each product: WebFOCUS New Features 243 11. Reporting Language Enhancements 244 WebFOCUS Copyright 2009, Information Builders. Slide 38

39 FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields
JOIN PRODUCTID IN RETAILDETAIL TO PRODUCTID IN RETAILIMAGE TABLE FILE RETAILDETAIL HEADING CENTER "Product List" " " PRINT NAME/A30 PRICE PRODIMAGE AS 'PICTURE' BY PRODUCTID NOPRINT BY NAME NOPRINT ON NAME UNDER-LINE ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT,COLOR=BLUE,$ TYPE=HEADING, SIZE = 18, FONT = ARIAL, COLOR=RED,$ TYPE=DATA,COLUMN=PRODIMAGE,IMAGE=(PRODIMAGE),SIZE=(1 1),$ Variable can only be used with styled output formats Displaying the Total Number of Pages in a Sort Group: <BYLASTPAGE How to: Display the Total Number of Pages Within Each Sort Group You can use the <BYLASTPAGE variable in a heading or footing to 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. This variable can only be used with styled output formats. If the REPAGE option is not used in the report, the total number of pages in the report (<TABLASTPAGE variable) is used for <BYLASTPAGE. Syntax: How to Display the Total Number of Pages Within Each Sort Group The request must have the following syntax and hold the output in a styled output format: BY sortfield PAGE-BREAK REPAGE The heading or footing can use the following syntax to display “Page x of y” {HEADING|FOOTING} "Page <TABPAGENO of <BYLASTPAGE" 242 WebFOCUS where: sortfield Is the sort field that has the REPAGE option. A PAGE-BREAK is required on the same sort field 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. Example: Paginating Within a Sort Group The following request against the GGSALES data source sorts by product, region, category, and city. It resets the pagination each time the product changes. The heading prints the current page number and the total within each product group: TABLE FILE GGSALES HEADING CENTER "<PRODUCT : Page <TABPAGENO of <BYLASTPAGE " SUM UNITS BY PRODUCT NOPRINT REPAGE BY REGION PAGE-BREAK BY CATEGORY BY CITY ON TABLE PCHOLD FORMAT PDF END The following partial output shows that the page number resets to 1 when the product changes and that the BYLASTPAGE variable displays the total number of pages for each product: WebFOCUS New Features 243 11. Reporting Language Enhancements 244 WebFOCUS 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, $ Copyright 2009, Information Builders. Slide 39

40 FOCUS and WebFOCUS Output Formats Displaying Images stored in BLOB fields
Variable can only be used with styled output formats Displaying the Total Number of Pages in a Sort Group: <BYLASTPAGE How to: Display the Total Number of Pages Within Each Sort Group You can use the <BYLASTPAGE variable in a heading or footing to 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. This variable can only be used with styled output formats. If the REPAGE option is not used in the report, the total number of pages in the report (<TABLASTPAGE variable) is used for <BYLASTPAGE. Syntax: How to Display the Total Number of Pages Within Each Sort Group The request must have the following syntax and hold the output in a styled output format: BY sortfield PAGE-BREAK REPAGE The heading or footing can use the following syntax to display “Page x of y” {HEADING|FOOTING} "Page <TABPAGENO of <BYLASTPAGE" 242 WebFOCUS where: sortfield Is the sort field that has the REPAGE option. A PAGE-BREAK is required on the same sort field 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. Example: Paginating Within a Sort Group The following request against the GGSALES data source sorts by product, region, category, and city. It resets the pagination each time the product changes. The heading prints the current page number and the total within each product group: TABLE FILE GGSALES HEADING CENTER "<PRODUCT : Page <TABPAGENO of <BYLASTPAGE " SUM UNITS BY PRODUCT NOPRINT REPAGE BY REGION PAGE-BREAK BY CATEGORY BY CITY ON TABLE PCHOLD FORMAT PDF END The following partial output shows that the page number resets to 1 when the product changes and that the BYLASTPAGE variable displays the total number of pages for each product: WebFOCUS New Features 243 11. Reporting Language Enhancements 244 WebFOCUS Copyright 2009, Information Builders. Slide 40

41 FOCUS and WebFOCUS Output Formats
Thank You !


Download ppt "FOCUS and WebFOCUS Output Formats: The More You Know"

Similar presentations


Ads by Google