Presentation is loading. Please wait.

Presentation is loading. Please wait.

STYLESHEET Exposed Bob Zinn WebFOCUS Specialist The University of North Carolina at Greensboro.

Similar presentations


Presentation on theme: "STYLESHEET Exposed Bob Zinn WebFOCUS Specialist The University of North Carolina at Greensboro."— Presentation transcript:

1 STYLESHEET Exposed Bob Zinn WebFOCUS Specialist The University of North Carolina at Greensboro

2 Agenda Concepts of WebFOCUS StyleSheet Internal Cascading StyleSheet Identifying Selected Report Components –Columns –Data –Total and Subtotal Rows –Column Titles –Headings and Footings Conditional Styling Drill-Down

3 Concepts StyleSheet enables you to format and produce attractive reports that highlight key information. StyleSheets allow you to specify various characteristics of your report and format report components individually. StyleSheets may be internal or external to the report request –Internal - when you need to apply a StyleSheet to only one report –External - as a separate file. This enables you to apply one StyleSheet to multiple reports

4 Concepts Use a StyleSheet to: Format report individual components Incorporate graphical elements Format data that meets specified conditions Create dynamic hyperlinks Create macros that enable you to streamline your formatting specifications Use external Cascading StyleSheets

5 Internal CSS for HTML Reports Internal Cascading Style Sheet are created with: ON TABLE SET HTMLCSS {ON|OFF} where: ON - Generates an internal Cascading Style Sheet in the HTML report to control most aspects of the report's appearance. OFF - No generation of an internal Cascading Style Sheet. Formatting tags are placed in each HTML table cell used to create the report.

6 Internal CSS for HTML Reports Improves performance by reducing the size of the HTML file which decreases transmission bandwidth. Result - large reports display more quickly. Provide more formatting options for your HTML report Internal Cascading Style Sheets enable HTML support for the UNITS, BOTTOMMARGIN, TOPMARGIN, LEFTMARGIN, RIGHTMARGIN, SIZE, POSITION, WRAP, and PAGECOLOR attributes. Enables addition and removal of underlines from most report components and specify the starting position and size of an image

7 Sample Report Procedure TABLE FILE CAR PRINT COUNTRY ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, LEFTMARGIN= , RIGHTMARGIN= , TOPMARGIN= , BOTTOMMARGIN= , SQUEEZE=ON, ORIENTATION=PORTRAIT, $ $ StyleSheet comment TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, COLOR='BLACK', BACKCOLOR='NONE', STYLE=NORMAL, TOPGAP= , BOTTOMGAP= , $ -* Dialogue Manager comment

8 Sample Report Procedure TYPE=TITLE, STYLE=BOLD,$ TYPE=TABHEADING, SIZE=12, STYLE=BOLD,$ TYPE=TABFOOTING, SIZE=12, STYLE=BOLD,$ TYPE=HEADING, SIZE=12, STYLE=BOLD,$ TYPE=FOOTING, SIZE=12, STYLE=BOLD,$ TYPE=SUBHEAD, SIZE=10, STYLE=BOLD,$ TYPE=SUBFOOT, SIZE=10, STYLE=BOLD,$ TYPE=SUBTOTAL, BACKCOLOR=RGB( ),$ TYPE=ACROSSVALUE, SIZE=9,$ TYPE=ACROSSTITLE, STYLE=BOLD,$ TYPE=GRANDTOTAL, BACKCOLOR=RGB( ), STYLE=BOLD,$ ENDSTYLE END

9 Identify the report section Identify Subtype – Additional attributes such as COLUMN, LINE, OBJECT, or ITEM, to identify a specific component. Identifying Report Section TYPE=section REPORTDATATITLE TEXTACROSSVALUEACROSSTITLE UNDERLINESKIPLINEPAGENUM HEADINGSUBHEADTABHEADING FOOTINGSUBFOOTTABFOOTING RECAPSUBTOTALGRANDTOTAL

10 Identify report attributes BORDER has several formats: –BORDER [-POSITION] values include TOP, BOTTOM, LEFT, RIGHT –BORDER [-POSITION] –STYLE values include SOLID, DOUBLE, DASHED, DOTTED, etc –BORDER [-POSITION] –COLOR values include color or RGB(r g b) Identifying Attributes ATTRIBUTE FONTSIZECOLOR BACKCOLORPAGECOLORSTYLE JUSTIFYTITLETEXTGRID WRAPWHENIMAGE BACKIMAGEBORDERPOSITION

11 TYPE=REPORT, subtype=value Where subtype identifies: COLUMN specifies –a sort column (generated by BY), –a display column (generated by PRINT, LIST, SUM, or COUNT) –a computed column (generated by COMPUTE) –a column of row totals (generated by ROW-TOTAL). ACROSSCOLUMN specifies every instance of a column that is repeated across a horizontal sort (ACROSS) row. Identifying Subtype

12 COLUMN=value Identifying report columns using values: Nn - Identifies a column by its position in the report. To determine this value, count vertical sort (BY) fields, display fields, and ROW- TOTAL fields, from left to right, including NOPRINT fields. Pn - Identifies a column by its position in the report. To determine the value of n, count vertical sort (BY) fields, display fields, and ROWTOTAL fields from left to right. Do not count NOPRINT fields. Cn - Identifies a display column by its position in the report. To determine the value of n, count only display fields from left to right. Identifying Subtype

13 COLUMN=value FIELD - Identifies a column by its field name. When a field occurs more than once, use field(n) to select a particular occurrence or field(*) to select all occurrences of the field. ROWTOTAL - Identifies a column of row totals generated using ROW-TOTAL. When used with ACROSS and multiple display commands, ROWTOTAL generates multiple total columns. Use ROWTOTAL(n) to select a particular total column. Use ROWTOTAL(field) to select the row total column for a particular field. Use ROWTOTAL(*) to select all row total columns in the report. Identifying Subtype

14 Identifying Total or Subtotal Identify an Entire Total or Subtotal Row TYPE=section, [BY=sortcolumn] TYPE identifies a subtotal or total: GRANDTOTAL - a grand total (generated by COLUMN-TOTAL, SUBTOTAL, SUB-TOTAL, RECOMPUTE, or SUMMARIZE). SUBTOTAL - a subtotal (generated by SUBTOTAL, SUB-TOTAL, RECOMPUTE, or SUMMARIZE). RECAP - a subtotal calculation (generated by ON sortfield RECAP or ON sortfield COMPUTE). BY=sortcolumn identifies the subtotal commands when there are multiple subtotal statements. Use either Bn or fieldname as the identifier.

15 Identifying Data Identify All Data TYPE = DATA Identifies all report data except totals, grand totals, subtotals, and ACROSS values. Identify a Data Column TYPE=DATA, COLUMN=column Where column identifies the column. Example: TYPE=DATA, Size=10,$

16 Identifying Column Title Identify All Column Titles TYPE=TITLE Identify a Specific Column Title TYPE=TITLE, COLUMN=column Where column identifies a specific column title. Example: TYPE=TITLE, STYLE=BOLD+UNDERLINE,$

17 Identifying Heading or Footing TYPE=section, [BY=sortcolumn] TYPE=section identifies any of the following: –TABHEADING - report heading. Appears at the beginning of the report. Generated by ON TABLE SUBHEAD statement. –TABFOOTING - report footing. Appears at the end of the report. Generated by ON TABLE SUBFOOT statement. –HEADING - page heading. Appears at the top of each report page. Generated by HEADING statement. –FOOTING - page footing. Appears at the bottom of each report page. Generated by FOOTING statement. –SUBHEAD - sort heading. Appears at the beginning of a BY sort group. Generated by ON sortfield SUBHEAD statement. –SUBFOOT - sort footing. Appears at the end of a BY sort group. Generated by ON sortfield SUBFOOT statement.

18 Identify Heading or Footing Objects Identify a Object in a Heading or Footing TYPE=type, [LINE=line_number], [OBJECT=[TEXT,FIELD], [ITEM=item_number] TYPE=type identifies TABHEADING, TABFOOTING, HEADING, FOOTING, SUBHEAD, SUBFOOT. Note: LINE, OBJECT, and ITEM are optional LINE=line identifies a line by its position. Only need when specific identification is required. OBJECT=TEXT,FIELD identifies the object as text or a field. ITEM=item identifies an item by its position in a line.

19 Heading With Line and Object TABLE FILE CAR "Vehicle Profile Per Country" "

20 Heading With Line and Object

21 Conditional Styling DEFINE FILE CAR PROFIT/D9.2 = RCOST-DCOST; END TABLE FILE CAR HEADING "Vehicle Profit" " SUM DCOST RCOST PROFIT -*COMPUTE PROFIT/D9.2 = RCOST- DCOST; BY HIGHEST PROFIT NOPRINT BY COUNTRY BY CAR BY MODEL ON TABLE SET BYDISPLAY ON ON TABLE SET PAGE-NUM OFF ON TABLE SET STYLESHEET * TYPE=REPORT, GRID=OFF, $ TYPE=DATA, BACKCOLOR=AQUA, STYLE=BOLD, WHEN=PROFIT GT 5000, $ TYPE=DATA, BACKCOLOR=YELLOW, STYLE=BOLD, WHEN=PROFIT GT 2000, $ TYPE=DATA, BACKCOLOR=PINK, STYLE=ITALIC, WHEN=PROFIT LT 1000, $ TYPE=DATA, COLUMN=C3, BACKCOLOR=AQUA, COLOR=RED, STYLE=BOLD+ITALIC, WHEN=PROFIT GT 6 000, $ TYPE=DATA, BACKCOLOR=SILVER, FONT='Arial', $ TYPE=HEADING, FONT='Arial', STYLE=BOLD, SIZE=11, $ ENDSTYLE END

22 Conditional Styling

23 Drill-Down Example TABLE FILE CAR "Bob's Auto Sales" SUM DEALER_COST/D10.2!e RETAIL_COST/D10.2!e SALES/D12.2!e BY COUNTRY BY CAR BY MODEL ON TABLE SET ONLINE-FMT HTML ON TABLE SET PAGE OFF ON TABLE SET STYLE * TYPE=DATA,COLUMN=MODEL,FONT='ARIAL', COLOR='RED',FOCEXEC=CARDRLL2(VAR=MODEL),TARGET='_blank',$ TYPE=DATA, BACKCOLOR=('WHITE' RGB( )),$ alternate background TYPE=HEADING, IMAGE=carlogo.gif,$ TYPE=HEADING, OBJECT=TEXT, STYLE=BOLD, SIZE=24,$ ENDSTYLE END

24 Drill-Down Example

25 TABLE FILE CAR PRINT COUNTRY CAR MODEL SEG.BODYTYPE WHERE MODEL EQ '&VAR'; END

26 Drill-Down Example

27 StyleSheet Exposed Summary Understanding the StyleSheet command allows for display control of the report Additional details may be found in the WebFOCUS Creating Reports Manual Experiment


Download ppt "STYLESHEET Exposed Bob Zinn WebFOCUS Specialist The University of North Carolina at Greensboro."

Similar presentations


Ads by Google