Chapter 4 Managing a Report


Managing HTML format

From the HTML Format tab of the report property sheet, you can customize HTML reports and define their presentation style (color, font, background, header and footer) using:

PowerDesigner ships with a set of predefined HTML presentation templates, style sheets and header and footer files that you can use to generate your HTML reports. Predefined HTML presentation templates can be used as a basis to create your own HTML presentation templates in a text editor. All these files are stored in the Resource Files\HTML Report Style Sheets folder.

HTML presentation template

An HTML presentation template file has an .HTMLTPL extension and allows you to define the following properties:

When you apply an HTML presentation template to a report all the corresponding properties defined in the presentation template are displayed in their respective field in the Report property sheet. Beside, all the options you have defined before (ex: font) are no longer taken into account. The styles defined in the presentation template file will be applied.

Note   Report saved with previous versions
If you open a report saved in a previous version, the HTML presentation template has the values of the default HTML presentation template if these values are identical with the default ones. Otherwise, the Presentation template box will be empty (<None> value).

The HTML presentation template can include the following variables:

Variable Description
%DATE% Report date defined in report property sheet.
%TIME% Report generation time.
%MODELNAME% Model name of a report section.
%MODELCODE% Model code of a report section.
%MODULE% Module name of a report section.
%APPNAME% Application name (PowerDesigner).
%TITLE% Report title defined in report property sheet.
%AUTHOR% Report author defined in report property sheet.
%VERSION% Report version defined in report property sheet.
%SUMMARY% Report summary defined in report property sheet.
%NEXT% URL of the Next page of the home page.
%NEXTLABEL% Name of the Next page of the home page.

Style sheet structure

The following table describes the use of classes name in the creation of report style sheets:

Class names Description
BODY Defines the background styles for all report pages, except the home page frame and the browser frame page.
.BROWSERBODY Defines the background styles for the browser page.
.HOMEBODY Defines the background styles for the home page.
.TEXT Defines the default font styles for text blocks, like description, annotation, etc.
.TITLE Defines the default font styles for the title of the home page.
TABLE Defines the default styles for tables.
TD Defines the default styles for table cells.
Table.GRID Defines the styles for object list tables.
TABLE.GRID TD.HEADER Defines the styles for the header cells of object list tables.
TABLE.GRID TD Defines the styles for the cells of object list tables of even rows.
TABLE.GRID TD TD2 Defines the styles for the cells of object list tables of odd rows.
Table.FORM Defines the styles for object card tables.
TABLE.FORM TD.HEADER Defines the styles for the cell name of object card tables.
TABLE.FORM TD Defines the styles for the cell value of object card tables.
Table.TEXT Defines the styles for the tables around the text blocks.
TABLE.TEXT TD Defines the styles for the cells of tables around the text blocks.
Table.TITLE Defines the styles for the tables around the home page title.
TABLE.TITLE TD Defines the styles for the cells of tables around the home page title.
Table.GRAPHICS Defines the styles for the tables around graphics.
TABLE.GRAPHICS TD Defines the styles for the cells of tables around graphics.
H1 Defines the styles for level 1 headings.
H2 Defines the styles for level 2 headings.
H3 Defines the styles for level 3 headings.
HR Defines the styles for separator lines.
A:LINK Defines the default colors for non-visited hyperlinks.
A: VISITED Defines the default colors for visited hyperlinks.
A: HOVER Defines the default colors for highlighted hyperlinks.
.BROWSER Defines the default font styles for the browser.
A.BROWSER:LINK Defines the default colors for non-visited hyperlinks of the browser.
A.BROWSER:VISITED Defines the default colors for visited hyperlinks of the browser.
A.BROWSER:HOVER Defines the default colors for highlighted hyperlinks of the browser.
TABLE.NAVGROUP Defines the styles for the tables around the navigation buttons.
TABLE. NAVGROUP TD Defines the styles for the cells of tables around the navigation buttons.
.NAVBUTTON Defines the default font styles for the navigation buttons.
A.NAVBUTTON:LINK Defines the default styles for non-visited hyperlinks of the navigation buttons.
A.NAVBUTTON:VISITED Defines the default styles for visited hyperlinks of the navigation buttons.
A.NAVBUTTON:HOVER Defines the default styles for highlighted hyperlinks of the navigation buttons.

In a style sheet, you can define font, color, background, size, margin, and alignment for each class name.

HTML report properties

The HTML Format page includes the following properties. Each property is optional. If you do not want any HTML presentation template when generating, select <None> in the Template list:

Property Description
Template List of available HTML presentation template file names in the HTML Report Style Sheets folder.

You can click the Preview HTML Report Presentation Template tool to view the current HTML presentation template in your default browser.

You can click the Save HTML Report Presentation Template File tool to save changes you have made in a presentation template or to save a presentation template you have created.

You can click the Delete HTML Report Presentation Template File tool to delete a presentation template that you no longer want.

You can click the Select HTML Report Style Sheets tool to browse for an HTML presentation template in a folder of another version of PowerDesigner.
Style sheet Absolute or relative path of the style sheet file (CSS file). You can browse for a local or shared file (UNC), or type a URL.

You can click the Open HTML Report Style Sheets File tool to open the CSS file in your default text editor.

You can click the Browse for HTML Report Style Sheets File tool to browse for a CSS file within the folder you have selected for the presentation template.
Header

Location

Height
Absolute or relative path of the header file (HTML file). You can browse for a local file or shared file (UNC), or type a URL.

Height in pixels of the upper header.

You can click the Open HTML Report Header File tool to open the HTML file in your default editor.

You can click the Browse for HTML Report Header File tool to browse for an HTML header file within the folder you have selected for the presentation template.
Footer

Location

Height
Absolute or relative path of the footer file (HTML file). You can browse for a local file or shared file (UNC), or type a URL.

Height in pixels of the lower footer.

The tools beside the Footer box allow you to do the same actions as the ones beside the Header box.
Home page Absolute or relative path of the home page file (HTML file). You can browse for a local file or shared file (UNC), or type a URL.

The tools beside the Home page box allow you to do the same actions as the ones beside the Header box.
TOC

Level

Width
Number of maximum depth levels to display in the HTML table of contents (TOC). 3 is the default level.

Width of the table of content expressed as a percentage of the total width of the report window.
Image Format

SVG

PNG

JPEG
Format for Graphic items associated with diagrams. If your report contains large diagrams you should select the SVG format that allows you to interact with the graphics, see below for more details. During compression to reduce the graphic size, the PNG format (Portable Network Graphic) reduces the loss of quality but is longer to generate than the JPEG format.
List format

Number of rows per page

Links to additional results
Format for Lists.

You can define the number of rows you want to display in the list results.

You can also define the number of links to additional results displayed below the list. Additional results are numbers with hyperlinks to other pages containing the next rows of the list.
Add page break for top level list and cards Page breaks creation for each top level list and card to avoid long HTML pages.

Note   Show contents in HTML TOC
You can right-click a book item in the Report Items pane and deselect the Show contents in HTML TOC command to only display the title of the item without its contents in the table of contents.

Style sheets and headers and footers associated files

When you generate an HTML report and want to keep the links associated with your style sheets (CSS) or headers and footers files (HTML), we recommend you to gather the linked files in a special folder named as the file to which they are associated and located at the same level in your explorer.

For example, the header Header_Blue.html uses files that should be gathered in folder Header_Blue_files :


This is to make sure that when generating the report, the content of the associated folders is also copied and links associated to your style sheets and headers and footers work properly.

Location type dependent

Depending on their type of location (local or UNC paths, or URL), style sheet files, header and footer files and home page files are used the following way:

Location Use
Local path or UNC path The HTML or CSS file is copied into the report generation folder.
URL The reference in the HTML report uses the HTML or CSS file as it is.

Valid codepage

By default, PowerDesigner generates in the HTML page a character set (charset) built from the active codepage (Windows-ACP) of the current system.

If the charset is correct the HTML report can be displayed on all systems.

If the charset is not correct you must create the ReportHtmlCharset key in [HKEY_CURRENT_USER\Software\Sybase\PowerDesigner 12\General], and give it the value of the codepage that should be generated in HTML report.

You can find examples of HTML charset at the following Web address: http://www.w3.org/International/O-charset-lang.html.

SVG graphic format

Scalable Vector Graphics is an XML-based language for Web graphics from the World Wide Web Consortium (W3C). If you choose the SVG graphic format for the generation of images in your HTML report, you should use a browser with an integrated SVG viewer.

You can install an SVG viewer if your browser does not have it already, see http://www.w3.org/Graphics/SVG/SVG-Implementations.htm8 for more information about SVG viewers for Internet Explorer and Netscape.

You can also use a browser with an embedded SVG viewer like Opera or Firefox, in this case make sure the browser is running the correct SVG viewer version.

An SVG viewer provides the following features:

Default & Save as Default buttons

The Default button allows you to return to the previously saved format in the registry.

The Save As Default button allows you to save the current format in the registry. This format becomes the new default HTML format.

Steps To manage HTML format:

  1. Select Report→Report Properties from the Report Editor window, and click the HTML Format tab.
  2. Select an HTML presentation template in the Model list.

    or

    Select an HTML presentation template from the Template list in the Presentation Options page of the Report Creation Wizard.

    The options that follow are not available from the Report Creation Wizard.
  3. <optional> Browse for a .CSS file or type a URL in the Style Sheet box.
  4. <optional> Browse for a local or shared HTML file, or type a URL in the Header box.
  5. <optional> Browse for a local or shared HTML file, or type a URL in the Footer box.
  6. <optional> Browse for a local or shared HTML file, or type a URL in the Home page box.
  7. <optional> Type a number in the Level box and a percentage in the Width box of the Table of contents groupbox.
  8. <optional> Select image format and type a number for list format.
  9. Select the check box to Add page breaks for top level lists and cards.
  10. Click OK.

    When you generate the HTML report, it reflects the properties you have defined for the report.

Note   Previous, Next, Home navigation buttons
You can translate the navigation buttons (Previous, Next, Home) generated by default in your HTML report using HtmlNext, HtmlPrevious and HtmlHome items in the Report Titles\Common Objects category of the Report Language Editor. For more information, see the "Using the Report Language Editor" chapter.

Note   Default buttons
You can set as default the current property values for your HTML report by clicking the Set As Default button.
You can also return to the previously saved values, by clicking the Default button.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.