Sybase PowerDesigner Report Guide
Sybase PowerDesigner Report Guide
Copyright 1991-2004 Sybase, Inc. All rights reserved. Information in this manual may change without notice and does not represent a commitment on the part of Sybase, Inc. and its subsidiaries. Sybase, Inc. provides the software described in this manual under a Sybase License Agreement. The software may be used only in accordance with the terms of the agreement. No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of Sybase, Inc. Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.2277013 for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies. Sybase, SYBASE (logo), ADA Workbench, Adaptable Windowing Environment, Adaptive Component Architecture, Adaptive Server, Adaptive Server Anywhere, Adaptive Server Enterprise, Adaptive Server Enterprise Monitor, Adaptive Server Enterprise Replication, Adaptive Server Everywhere, Afaria, AppModeler, APT Workbench, APTBuild, APT-Edit, APT-Execute, APT-Translator, APTLibrary, ASEP, AvantGo, AvantGo Application Alerts, AvantGo Mobile Document Viewer, AvantGo Mobile Delivery, AvantGo Mobile Inspection, AvantGo Mobile Marketing Channel, AvantGo Mobile Pharma, AvantGo Mobile Sales, AvantGo Pylon, AvantGo Pylon Application Server, AvantGo Pylon Conduit, AvantGo Pylon PIM Server, AvantGo Pylon Pro, Backup Server, BayCam, BitWise, BizTracker, Certified PowerBuilder Developer, Certified SYBASE Professional, Certified SYBASE Professional Logo, ClearConnect, Client-Library, Client Services, CodeBank, Column Design, ComponentPack, Connection Manager, Convoy/DM, Copernicus, CSP, Data Pipeline, Data Workbench, DataArchitect, Database Analyzer, DataExpress, DataServer, DataWindow, DBLibrary, dbQueue, Developers Workbench, Direct Connect Anywhere, DirectConnect, Distribution Director, Dynamic Mobility Model, e-ADK, E-Anywhere, e-Biz Integrator, E-Whatever, EC Gateway, ECMAP, ECRTP, eFulfillment Accelerator, Electronic Case Management, Embedded SQL, EMS, Enterprise Application Studio, Enterprise Client/Server, Enterprise Connect, Enterprise Data Studio, Enterprise Manager, Enterprise Portal (logo), Enterprise SQL Server Manager, Enterprise Work Architecture, Enterprise Work Designer, Enterprise Work Modeler, eProcurement Accelerator, eremote, Everything Works Better When Everything Works Together, EWA, Financial Fusion, Financial Fusion (and design), Financial Fusion Server, Formula One, Fusion Powered e-Finance, Fusion Powered Financial Destinations, Fusion Powered STP, Gateway Manager, GeoPoint, GlobalFIX, iAnywhere, iAnywhere Solutions, ImpactNow, Industry Warehouse Studio, InfoMaker, Information Anywhere, Information Everywhere, InformationConnect, InstaHelp, Intelligent Self-Care, InternetBuilder, iremote, iScript, Jaguar CTS, jConnect for JDBC, KnowledgeBase, Logical Memory Manager, M-Business Channel, MBusiness Network, M-Business Server, Mail Anywhere Studio, MainframeConnect, Maintenance Express, Manage Anywhere Studio, MAP, MDI Access Server, MDI Database Gateway, media.splash, Message Anywhere Server, MetaWorks, MethodSet, ML Query, MobiCATS, My AvantGo, My AvantGo Media Channel, My AvantGo Mobile Marketing, MySupport, NetGateway, Net-Library, New Era of Networks, Next Generation Learning, Next Generation Learning Studio, O DEVICE, OASiS, OASiS logo, ObjectConnect, ObjectCycle, OmniConnect, OmniSQL Access Module, OmniSQL Toolkit, Open Biz, Open Business Interchange, Open Client, Open ClientConnect, Open Client/Server, Open Client/Server Interfaces, Open Gateway, Open Server, Open ServerConnect, Open Solutions, Optima++, Orchestration Studio, Partnerships that Work, PB-Gen, PC APT Execute, PC DB-Net, PC Net Library, PhysicalArchitect, Pocket PowerBuilder, PocketBuilder, Power++, Power Through Knowledge, power.stop, PowerAMC, PowerBuilder, PowerBuilder Foundation Class Library, PowerDesigner, PowerDimensions, PowerDynamo, Powering the New Economy, PowerScript, PowerSite, PowerSocket, Powersoft, PowerStage, PowerStudio, PowerTips, Powersoft Portfolio, Powersoft Professional, PowerWare Desktop, PowerWare Enterprise, ProcessAnalyst, QAnywhere, Rapport, Relational Beans, RemoteWare, RepConnector, Report Workbench, Report-Execute, Replication Agent, Replication Driver, Replication Server, Replication Server Manager, Replication Toolkit, Resource Manager, RW-DisplayLib, RW-Library, SAFE, SAFE/PRO, SDF, Secure SQL Server, Secure SQL Toolset, Security Guardian, SKILS, smart.partners, smart.parts, smart.script, SQL Advantage, SQL Anywhere, SQL Anywhere Studio, SQL Code Checker, SQL Debug, SQL Edit, SQL Edit/TPU, SQL Everywhere, SQL Modeler, SQL Remote, SQL Server, SQL Server Manager, SQL SMART, SQL Toolset, SQL Server/CFT, SQL Server/DBM, SQL Server SNMP SubAgent, SQL Station, SQLJ, Stage III Engineering, Startup.Com, STEP, SupportNow, S.W.I.F.T. Message Format Libraries, Sybase Central, Sybase Client/Server Interfaces, Sybase Development Framework, Sybase Financial Server, Sybase Gateways, Sybase IQ, Sybase Learning Connection, Sybase MPP, Sybase SQL Desktop, Sybase SQL Lifecycle, Sybase SQL Workgroup, Sybase Synergy Program, Sybase Virtual Server Architecture, Sybase User Workbench, SybaseWare, Syber Financial, SyberAssist, SybFlex, SybMD, SyBooks, System 10, System 11, System XI (logo), SystemTools, Tabular Data Stream, The Enterprise Client/Server Company, The Extensible Software Platform, The Future Is Wide Open, The Learning Connection, The Model For Client/Server Solutions, The Online Information Center, The Power of One, TotalFix, TradeForce, Transact-SQL, Translation Toolkit, Turning Imagination Into Reality, UltraLite, UltraLite.NET, UNIBOM, Unilib, Uninull, Unisep, Unistring, URK Runtime Kit for UniCode, Viewer, VisualWriter, VQL, WarehouseArchitect, Warehouse Control Center, Warehouse Studio, Warehouse WORKS, Watcom, Watcom SQL, Watcom SQL Server, Web Deployment Kit, Web.PB, Web.SQL, WebSights, WebViewer, WorkGroup SQL Server, XA-Library, XA-Server, XcelleNet, and XP Server are trademarks of Sybase, Inc. or its subsidiaries. All other trademarks are property of their respective owners.
Contents
iii
iv
PowerDesigner
Selecting tab spacing format .......................................... 104 Editing text...................................................................... 106 Formatting a graph ......................................................... 106 Formatting a list item ...................................................... 108 Selecting information to display in a card....................... 110 Setting up report pages......................................................... 112 Modifying a report header or footer ................................ 112 Including a title page....................................................... 116 Removing the title of an item.......................................... 117 Modifying report properties............................................. 119 Customizing an HTML report ......................................... 120 Using print preview ............................................................... 127 Opening print preview..................................................... 127 Navigating in print preview ............................................. 128 Finding an object in print preview................................... 128 Zooming in print preview ................................................ 130 Printing a report from print preview ................................ 130 Generating an RTF or HTML file from print preview ...... 130 Closing print preview ...................................................... 130
Index
.........................................................................................131
vi
PowerDesigner
Subject
This book describes the creation and generation of reports in PowerDesigner. It shows you how to do the following: Build and generate model reports in various languages Build and generate multi-model reports in various languages
This book is for anyone who will be building reports with PowerDesigner. The PowerDesigner modeling environment supports several types of models: Conceptual Data Model (CDM) to model the overall logical structure of a database, independent from any software or data storage structure considerations Physical Data Model (PDM) to model the overall physical structure of a database, taking into account DBMS software or data storage structure considerations Object Oriented Model (OOM) to model a software system using an object-oriented approach for Java or other object languages Business Process Model (BPM) to model the means by which one or more processes are accomplished in operating business practices XML Model (XSM) to model the structure of an XML file using a DTD or an XML schema Requirements Model (RQM) to list and document the customer needs that must be satisfied during a development process Information Liquidity Model (ILM) to model the replication of information from a source database to one or several remote databases using replication engines Free Model (FEM) to create any kind of chart diagram, in a contextfree environment
vii
About This Book This book only explains the creation and generation of reports in PowerDesigner. For information on models or other aspects of PowerDesigner, consult the following books:
General Features Guide To get familiar with the PowerDesigner interface before learning how to use any of the models. Conceptual Data Model Getting Started To learn the basics of the CDM. Conceptual Data Model Users Guide Physical Data Model Getting Started Physical Data Model Users Guide
Object Oriented Model Getting Started To learn the basics of the OOM. Object Oriented Model User's Guide
Business Process Model Getting Started To learn the basics of the BPM. Business Process Model User's Guide XML Model User's Guide
To work with an XSM. To work with the RQM. To work with the ILM.
Information Liquidity Model Users Guide Repository Getting Started Repository Users Guide central repository.
Typographic conventions
PowerDesigner documentation uses specific typefaces to help you readily identify specific items: monospace text (normal and bold) Used for: Code samples, commands, compiled functions and files, references to variables. Example: declare user_defined, the BeforeInsertTrigger template. UPPER CASE Object codes, reversed objects, file names + extension.
PowerDesigner
viii
About This Book Example: The AUTHOR table appears in the Browser. Open the file OOMAFTER.OOM. bold text Any new term. Example: A shortcut has a target object.
SMALL CAPS
ix
PowerDesigner
C H A P T E R
This chapter describes what is a report and the use of the Report Template Editor to create and edit templates, the use of the Report Editor and the Multi-Model Report Editor to create and edit reports for one or several models. It also describes how to use the Report Language Editor to create and edit report language resource files.
Topic What is a report? Introducing the Report Editors Using the Report Template Editor Using the Report Editor Organizing the Report Editor Using the Report Language Editor Page 2 3 4 13 22 34
Contents
What is a report?
What is a report?
A report allows you to publish valuable information about one model (model report) or several models (multi-model report) using different outputs. You can print a report in order to have it on a paper support, or you can generate it in RTF or HTML format for better reusability. PowerDesigner manages a structured representation of the report using a tree view format. You define a report by selecting items in the Available Items pane (left pane) and insert them in the Report Items pane (right pane). Each item you add in your report can be formatted individually. The items you use to create your report structure are part of a stored list of items. You generate the created structure from the design objects of your model. You use the Report Editor to define a model report structure. You use the Multi-Model Report Editor to define a multi-model report structure. You can also use a predefined structure called template to help you quickly generate a report or save your current report structure as a template to add it to the list of available templates. You can preview your report before its final output and also select the objects to generate. The report is an easy to consult document that shows parts or the global content of a model under a textual format.
PowerDesigner
Chapter 1
Select ToolsResourcesReport Templates. The List of Report Templates appears. It displays the alphabetical list of all the templates saved on your hard disk.
PowerDesigner
Chapter 1
The list of available templates corresponding to the selected type appears. If no template is available, you can open the Report Template Editor by clicking the New tool to create a new template.
3 4
Select a template. Click the Properties tool. The Report Template Editor window appears. The Available Items pane lists all the standard items available for all report types and the items corresponding to the type of template you have selected.
Using the Report Template Editor The Template Items pane lists all the items of the selected template.
You can open the List of Report Templates from the List of Reports by selecting ModelReports from the model diagram window. In the List of Reports, click the Manage Report Templates tool.
PowerDesigner
Chapter 1
Standard report templates are installed in the Resource Files sub-directory of your PowerDesigner directory. There are three types of standard templates for each type of model.
Template type Full Standard File naming convention* modelFULlanguage.RTP modelSTDlanguage.RTP Contents of resulting report Table of contents All main model items Table of contents Model graphs Package graphs Most list items Title item All list items
List
modelLISlanguage.RTP
* language in a filename is a two letter code for the language of the report template. For example, a PDM list report in English uses the template file PDMLISUS.RTP.
To create a template:
Using the Report Template Editor The List of Report Templates appears.
Click the New tool. The Report Template Type dialog box appears.
3 4
Type a template name in the Name box. Select a language from the Language dropdown listbox. It displays the available languages. English is the default language in which the report is printed.
Click OK.
PowerDesigner
Add items to the Template Items pane. They display in the language you selected.
When you use a template created in a language different from the one you select to create your report, only user-defined items such as Title or Text paragraph will keep the language of the template. Other items will be displayed in the report language.
Modifying a template
You can modify an existing template and save it in an RTP file. You can, for example, keep the global structure of a template but display only object lists. You can reuse a modified template to create other reports.
To modify a template:
10
PowerDesigner
Chapter 1
3 4
Select a template. Click the Properties tool. The template appears in the Template Items pane.
5 6
11
Renaming a template
You can rename a template in the Template Items pane by rightclicking the Template node at the root of the tree and select Rename from the contextual menu.
You can also access a report template from the Browser by rightclicking the Workspace node and in the contextual menu select Add. From the standard Open dialog box that appears, select an RTP file and click Open. The template file appears in the Browser. You can then open it.
Select FileClose. If you did not save the changes, a confirmation box prompts you to save your template.
Click OK.
12
PowerDesigner
Chapter 1
Select ModelReports.
13
Using the Report Editor The List of Reports appears. It displays the alphabetical list of all the reports saved in the model. If there are no existing reports, all the tools in the List of Reports dialog box are grayed, except for the New Report tool and the Manage Report Templates tool.
Select a report. If no report is available, you can open the Report Editor by clicking the New tool to create a new report.
You can open the Report Editor from the Browser by double-clicking a report node in the Browser. 14
PowerDesigner
Chapter 1
Double-click a multi-model report in the Browser. The structure of the selected multi-model report appears in the MultiModel Report Editor window.
If there is no multi-model report visible in the Browser, right-click the Workspace node and in the contextual menu select Add. From the standard Open dialog box that appears, select a multi-model report (MMR) and click Open. The report appears in the Browser. You can then open it.
15
Using the Report Editor 2 Select the Report checkbox to display the Report toolbar. The Report toolbar appears simultaneously.
Click Close.
16
PowerDesigner
Chapter 1
Creating a report
You use the Report Editor to create model reports and the Multi-Model Editor to create multi-model reports. Whatever the Editor you use to create a report, you must have at least one model opened in the workspace and a section is automatically created by default.
When you create a multi-model report, a Multi-Model Report node appears under the Workspace node in the Browser tree view and the Multi-Model Report Editor window opens.
17
You can: Print a report Generate a report as an RTF file Generate a report as an HTML file
If you use a template, you do not have to define the contents of the report. However, you can create sections and select objects from the model diagram or from a list.
Select FilePrint Preview. or Click the Print Preview tool. The Print Preview window displays the first page of the report.
18
PowerDesigner
Chapter 1
You can also preview a report from the List of Reports by selecting ModelReports. From the List of Reports, select the report you want to preview and click the Print Preview tool.
You can also print a report from the List of Reports by selecting ModelReports. From the List of Reports, select the report you want to print and click the Print Report tool.
19
HTML reports respect the package tree view defined in your model.
To generate an RTF file from the Report Editor:
You can also generate an HTML or RTF file from the List of Reports by selecting ModelReports. From the List of Reports, select the report you want to generate and click the Generate RTF or Generate HTML tool.
Select FileClose.
Saving reports
When you save the model, you also save the reports it contains. To lower the size of your model, you can create a multi-model report even for a single report as a multi-model report is saved in a file external to the model. To do so, you have to create a template from the section of your report, then create a multi-model report using the template that corresponds to the section of your report for a model. For more information on how to create a template from a section, see section Creating a template from a report section. For more information on how to create a multi-model report using a template, see chapter Managing a Multi-Model Report.
20
PowerDesigner
Chapter 1
Select FileClose.
21
When you create a new section, the Template column is set to <None> by default and the Apply Template check box is automatically selected.
22
PowerDesigner
Chapter 1
Select ReportSections from the Report Editor. The List of Report Sections appears. It contains a section by default.
(Optional) Type a section name. If you do not type a section name, the section tab appears with a default name in the Report Items pane that you can modify afterwards.
(Optional for the multi-model report only) Click the Model column and select a model from the dropdown listbox. The section is of the same type as the selected model.
Model selection
For a model report, the Model column displays by default the current model. For a multi-model report, the Model column displays the alphabetical list of all the models referenced in the workspace.
23
Organizing the Report Editor 4 Click the Template column and select None from the dropdown listbox. The Apply Template check box is automatically selected.
Click OK. The Report Editor window appears. The new report section appears as a tab at the bottom of the Report Items pane, which is empty.
1 24
Click a blank line. or Click the Add a Row tool. or Select a section in the list and click the Insert a Row tool to insert the new section before the selected line. An arrow appears at the beginning of the line.
(Optional) Type a section name. If you do not type a section name, the section tab appears with a default name in the Report Items pane that you can modify afterwards.
(Optional for the multi-model report only) Click the Model column and select a model from the dropdown listbox. The section is of the same type as the selected model.
Model selection
For a model report, the Model column displays by default the current model. For a multi-model report, the Model column displays the alphabetical list of all the models referenced in the workspace.
25
Organizing the Report Editor 5 Click the Template column and select a template from the dropdown listbox. The templates corresponding to the type of the model you selected are listed. The Apply Template check box is automatically selected.
Click OK. The Report Editor window appears. The section you created appears as a tab at the bottom of the Report Items pane.
Click the section tab. The Report Items pane is filled with the template you have selected.
Chapter 1
To create a template from a report section:
Click the tab corresponding to the section you want to save as a template. The corresponding report appears in the Report Items pane.
Select ReportCreate Template From Section. The Report Template Editor appears. The items which were listed in the Report Items pane of the Report Editor appears now in the Template Items pane
4 5
Type a template name. Click Save. The next time you create a report, you will be able to use this new template that appears in the List of Report Templates.
27
Click the section tab that you want to modify at the bottom of the Report Items pane. The corresponding report appears in the Report Items pane.
28
PowerDesigner
Chapter 1
The List of Report Sections appears. The Apply Template check box corresponding to the section on which your are working has been cleared because you have changed the default parameters.
Select the Apply template check box to reapply the template default values to the section.
Click OK.
29
Organizing the Report Editor You return to the Report Editor. The section appears with the template default parameters and the object selection is preserved.
Select ReportSections from the Report Editor. The List of Report Sections appears.
Click the Name column of the section you want to rename. An arrow appears at the beginning of the line.
30
PowerDesigner
Click OK. The Report Editor window appears. The section is renamed in the Report Items pane.
You can rename a section directly in the Report Items pane by rightclicking the section node at the root of the tree and select Rename from the contextual menu.
31
Select ReportSections from the Report Editor. The List of Report Sections appears.
Select the section you want to delete. An arrow appears at the beginning of the line.
3 4
32
PowerDesigner
Chapter 1
The Report Editor window appears. The section you deleted is no longer displayed in the Report Items pane.
Section deletion
You cannot delete all the sections contained in a report because a report must always contain at least one section.
33
When you open a report from version 7 or higher, strings linked to objects are displayed in English.
Report Titles
Values Mapping
34
PowerDesigner
Chapter 1
For more information on object lists, see section Formatting a list item
in chapter Building Reports.
35
The Values Mapping category contains two sub-categories that both contains a Standard entry:
Category Forms Lists Used for translation of Keywords in object property values in cards and checks Keywords in object property values in lists
The Standard entry appears by default and contains a mapping table that applies to all modules. It displays existing keyword names whatever the model in the Name column and their replacing value in the Value column that is used when the report is generated or previewed. You can customize the default mapping tables. They are always used for all modules unless you define a mapping table for a particular module. A Standard mapping table looks as follows:
You can only define mappings for boolean values (Yes, No or True, False for example) and predefined values (None or Undefined for example).
36
PowerDesigner
Chapter 1
Select ToolsResourcesReport Languages. The List of Report Languages appears. It displays the alphabetical list of all the report language resource files saved on your hard disk.
2 3
Select a report language. Click the Properties tool. The Report Language Editor window appears.
Opening the Report Language Editor from the Report Editor
You can also open the Report Language Editor from the Report Editor by selecting ReportEdit Current Language.
For more information on the management tasks you can perform from
the List of Report Languages, see chapter The Resource Editor in the General Features Guide.
37
Module Unique
All
All modules
1 2
Open the Report Language Editor. Select the Objects Attributes category if you want to translate an object property name. or Select the Report Titles category if you want to translate a report title. Drill down to the entry you want to translate.
PowerDesigner
3 38
Chapter 1
The name, comment and value for the entry appear to the right of the tree view. 4 5 Type a translation in the Value box and click Apply to commit the changes. Click OK to close the Report Language Editor. A confirmation box appears asking you if you want to save the modified resource file. The next time you open any report that uses the customized report language resource file, the generated report will take these modifications into account.
Performing translation directly from the Report Editor
You can also right-click an item in the Report items pane and select the Edit command. In the Editor dialog box that appears, type a translation and click OK. Note that the User-Defined check box is automatically selected in the Editor dialog box, as you are no longer using the default values used in the report language resource file you have selected. To revert to the default value, deselect the UserDefined check box. Example of a translation in an object card You translate the following entry in the Report Language Editor:
39
Using the Report Language Editor How it appears in the generated report:
40
PowerDesigner
Chapter 1
The translations you perform in the report language resource file are visible in the generated report.
41
Using the Report Language Editor The Values Mapping category allows you to define translations for keywords in object property values for: Standard mapping table customization All modules using the default Standard mapping tables in Forms and Lists categories. You can customize these tables Each module individually by creating a mapping table and assign it to a particular module
You can customize the predefined Standard mapping table, which contains keywords that apply to all modules. Click the Standard entry in the Forms or Lists category to display its corresponding mapping table in the right pane of the report language property sheet. Click the line that corresponds to the keyword value you want to translate in the Value column. Type a translation and click Apply.
42
PowerDesigner
Chapter 1
In addition of using the Standard mapping table, you can create your own mapping table that you can associate to a particular module afterwards. To do so, you have to do the following: Create a new mapping table from the root of the Forms or Lists category using the NewMap Item command from their respective contextual menu Type keyword names and their corresponding values in the mapping table
The following example shows a new mapping table DisplayMap created from the Lists category. You cannot use it until you assign it to a particular module:
Once you have created a new mapping table, you can assign it to a particular module. To do so, you have to recreate the Object Attributes tree view in the Forms or in the Lists category. For example if you want to assign a mapping table for columns in a PDM, you have to do the following: Create a new category from the Forms or Lists category contextual menu using the AddNew category command and name it Physical Data Model 43
Using the Report Language Editor Create a new entry from the Physical Data Model category contextual menu using the AddMap Item command and name it Column Assign an existing mapping table to each property of the Column object for which you want to translate keywords
The following example shows a mapping table in which each column object property uses a different mapping table:
1 2 3 4 5
Open the Report Language Editor. Click the Values Mapping category in the Language tree view to display its tree view. Click the Lists or the Forms category to display its tree view. Click a module category to display its tree view Drill down to the object for which you want to display the mapping table to translate. The corresponding mapping table appears to the right of the tree view.
6 7
Click a blank line in the Name column. Type a keyword value to translate.
44
PowerDesigner
Chapter 1 8
Click the corresponding line in the Value column and type the mapping table name you want to use for the translation of the keyword value that will display in the generated report. Click OK. Each time a mapping applies, the exact content of the keyword in the Name column is evaluated (disregarding the case) and replaced with its corresponding translation, which is defined in the mapping table that appears in the Value column.
You define the MandMap mapping table in the Report Language Editor that will be used by another mapping table that you define afterwards:
45
Using the Report Language Editor You define the Column mapping table that uses the MandMap mapping table you have previously defined:
Chapter 1
Select ModelReports from the model diagram window. The List of Reports appears. It displays the alphabetical list of all reports saved in the model. If there are no existing reports, all the tools in the List of Reports dialog box are grayed, except for the New Report tool and the Manage Report Templates tool.
Select the New Report tool. The New Report dialog box appears. It displays a default report name.
3 4
Type a report name in the Report Name box if you want to modify the default name. Select a language from the Language dropdown listbox. It displays the available report languages. English is the default language in which the report is printed. Click OK.
Changing the language of a report
You can change at any time the language of a report from the Report Editor by selecting ReportReport Properties.
Reports User's Guide
47
Using the Report Language Editor The Report Editor window appears. If you add to the Report Items pane an item which is translated in the language resource file, the item automatically appears translated in that pane.
Opening the report language property sheet
You can at any time edit a report language from the Report Editor by selecting ReportEdit Current Language.
48
PowerDesigner
C H A P T E R
49
50
PowerDesigner
Chapter 2
Full: contains the table of contents and all main model Standard: contains the table of contents, model and List: contains Title item and all list items
package graphs and most list items items
Select ModelReports from the model diagram window. The List of Reports appears. It displays the alphabetical list of all reports saved in the model. If there are no existing reports, all the tools in the List of Reports dialog box are grayed, except for the New Report tool and the Manage Report Templates tool.
51
Creating a model report 2 Select the New Report tool. The New Report dialog box appears. It displays a default report name.
3 4
Type a report name in the Report Name box if you want to modify the default name. Select a language from the Language dropdown listbox. It displays the available languages. English is the default language in which the report is printed.
When you use a template created in a language different from the one you select to create your report, only user-defined items such as Title or Text paragraph will keep the language of the template. Other items will be displayed in the report language. 6 Click OK.
52
PowerDesigner
Chapter 2
The Report Editor window appears. A section is created by default at the bottom of the Report Items pane, which is filled with the template you have selected. If you did not select a template, the Report Items pane is empty. Simultaneously a report node appears under the Reports category in the Browser.
For more information on the Report Editor, see section Using the
Report Editor in chapter Using the Report Editors. 7 Build the report structure in the Report items pane.
53
Double-click a report node in the Browser tree view. The structure of the selected report appears in the Report Editor window.
Select FilePrint. or Select FileGenerateRTF. or Select FileGenerateHTML. A standard Print dialog box appears if you have selected Print and a standard Save As dialog box appears if you have selected RTF or HTML.
54
PowerDesigner
Chapter 2 3
Click OK in the Print dialog box. or Type a file name in the Save as dialog box for RTF or HTML. A confirmation box indicates that the report has been successfully generated and asks you if you want to open it with your default browser for an HTML report or your default RTF editor for an RTF report.
If you want to quickly generate a report from the Browser, right-click a report node and from the contextual menu that appears, select Print or GenerateRTF or GenerateHTML.
55
Select ModelReports from the model diagram window. The List of Reports appears. It displays the alphabetical list of all available reports saved in the model.
Select the report you want to modify and click the Edit Report tool. The structure of the selected report appears in the Report Editor window.
56
PowerDesigner
Chapter 2 3 4 Do all the necessary changes. Select FilePrint. or Select FileGenerateRTF. or Select FileGenerateHTML.
A standard Print dialog box appears if you have selected Print and a standard Save As dialog box appears if you have selected RTF or HTML. 5 Click OK in the Print dialog box. or Type a file name in the Save as dialog box for RTF or HTML. A confirmation box indicates that the report has been successfully generated and asks you if you want to open it with your default browser for an HTML report or your default RTF editor for an RTF report. 6 Click Yes to open the report.
Quick model report generation from the List of Reports
If you want to quickly generate a report from an existing one without modifying it, select a report in the List of Reports then click the Print Report tool, or the Generate HTML or Generate RTF tool.
57
58
PowerDesigner
C H A P T E R
59
60
PowerDesigner
Chapter 3
Full: contains the table of contents and all main model Standard: contains the table of contents, model and List: contains Title item and all list items
package graphs and most list items items
1 2
61
Creating a multi-model report The New dialog box appears. 3 Select Multi-Model Report from the Model Type group box.
The New dialog box displays a default report name. 4 5 Type a report name in the Report Name box if you want to modify the default name Select a language from the Language dropdown listbox. It displays the available languages. English is the default language in which the report is printed.
When you use a template created in a language different from the one you select to create your report, only user-defined items such as Title or Text paragraph will keep the language of the template. Other items will be displayed in the report language. 8 Click OK.
62
PowerDesigner
Chapter 3
The Multi-Model Report Editor window appears. A section is created by default at the bottom of the Report Items pane, which is filled with the template you have selected. If you did not select a template, the Report Items pane is empty. Simultaneously a multi-model report node appears under the Workspace node in the Browser.
You can also create a multi-model report from the Browser by rightclicking the Workspace node and from the contextual menu select NewMulti-Model Report.
63
Double-click a multi-model report node in the Browser tree view. The structure of the selected report appears in the Multi-Model Report Editor window.
Select FilePrint. or Select FileReportGenerateRTF. or Select FileReportGenerateHTML. A standard Print dialog box appears if you have selected Print and a standard Save As dialog box appears if you have select RTF or HTML.
64
PowerDesigner
Chapter 3 3
Click OK in the Print dialog box. or Type a file name in the Save as dialog box for RTF or HTML. A confirmation box indicates that the report has been successfully generated and asks you if you want to open it with your default browser for an HTML report or your default RTF editor for an RTF report.
If there is no multi-model report visible in the Browser, right-click the Workspace node and in the contextual menu select Add. From the standard Open dialog box that appears, select a multi-model report file (MMR) and click Open. The report appears in the Browser.
65
You can open a multi-model report, even though the models for which you have created the report are closed in the workspace.
To modify a multi-model report:
Double-click a multi-model report node in the Browser tree view. The structure of the selected report appears in the Multi-Model Report Editor window.
2 3
Do all the necessary changes. Select FilePrint. or Select FileGenerateRTF. or Select FileGenerateHTML. A standard Print dialog box appears if you have selected Print and a standard Save As dialog box appears if you have selected RTF or HTML.
66
PowerDesigner
Chapter 3 4
Click OK in the Print dialog box. or Type a file name in the Save as dialog box for RTF or HTML. A confirmation box indicates that the report has been successfully generated and asks you if you want to open it with your default browser for an HTML report or your default RTF editor for an RTF report.
If you want to quickly generate a multi-model report from an existing one without modifying it, right-click a multi-model report node in the Browser and from the contextual menu that appears select Print or GenerateRTF or GenerateHTML.
67
Select FileSave in the Multi-Model Report Editor. A standard Save As dialog box appears.
2 3
You can also save a multi-model report from the Browser by rightclicking a multi-model report node and from the contextual menu that appears select Save.
68
PowerDesigner
C H A P T E R
Building Reports
69
You can drag and drop an item in the Report Items pane only when it already contains at least one item. When you drag an item in the Report Items pane, you must choose a drop position. A box or a line appears indicating where the drop will occur.
While you drag an item over a node If a line appears, drop positions the item at the line and if a box around the node appears, drop positions the item last in the node. While you drag an item over another item If a line appears, drop positions the item at the line and if a box around the item appears, drop positions the item immediately after the item surrounded by the box.
70
PowerDesigner
Chapter 4
Building Reports
You can also drag and drop items between reports of the same type. If you simply drag and drop an item from one report to another without pressing any key, you move the item from one report to another. You can copy an item by pressing the CTRL key while dragging and dropping the item to another report. The report in which you want to drop the item must already contain at least one item. Double-click When you double-click an item in the Available Items pane, the item in the Report Items pane is placed at the pointer position in that pane. If the pointer is on the root node or on the last item in the Report Items pane, the item you have double-clicked on is placed at the last position in the Report Items pane. When you add an item to the Report Items pane, the item remains in the Available Items pane. You can insert the same item several times in the same report contents. The following report structure contains three instances of the Page break item and two instances of the Text paragraph item.
Drag an item from the Available Items pane into the Report Items pane. or Double-click an item in the Available Items pane. or Select an item in the Available Items pane, right-click and select Add in the contextual menu. The item appears in the Report Items pane.
Double-clicking an item
If you want to add an item at the same level as a node, press the ALT key while you double click the item.
71
Select items in the Available Items pane, right-click and select Add in the contextual menu. or Select items in the Available Items pane and click the Add Item tool. The items appear in the Report Items pane.
Multi-selection
Press CTRL while selecting items with the Pointer tool, or use the SHIFT key to select a continuous list of items.
With the drag-and-drop method, the pointer becomes a barred circle when the mouse position is not an available drop target. You can only drop the item when the barred circle becomes a pointer again.
Drag a node item from the Available Items pane to the Report Items pane. The node and its dependent items appear in the Report Items pane.
Package hierarchy
When you add a package node to a report, you can click the Hierarchical Display command in the package node contextual menu to display the package hierarchy in the generated report.
72
PowerDesigner
Chapter 4
Building Reports
As a result, the generated report displays for each operation, the diagrams showing the messages used by this operation.
To modify the collection of a node:
1 2
Drag and drop the appropriate node in the selected node. Right-click the node and select Collection in the contextual menu. The Book Collection page appears.
73
Managing report items 3 4 Select a collection in the Collection dropdown listbox. Click OK.
Drag a table of contents item from the Available Items pane to the Report Items pane. The table of contents appears in the Report Items pane.
Page break
When you insert a table of contents in a report, you do not need to have it followed by a page break because PowerDesigner automatically provides one after each inserted table of contents.
Drag a text paragraph item from the Available Items pane to the Report Items pane. The paragraph item appears in the Report items pane.
Double-click the text paragraph. or Select the item in the Report items pane and select ReportEdit.
74
PowerDesigner
Building Reports
3 4
Drag a text file item or a graphical file item from the Available Items pane to the Report Items pane. A standard Open dialog box appears.
2 3
Select a text file or a graphical file. Click OK. The text file or the graphical file appears in the Report Items pane.
75
Inserting graphs
You can add diagram graphics to a report by inserting the Graphics item in the Report Items pane. When you insert this item under a package node, the report will print the package graphs. In the following structure, you will print the graph of a diagram:
In the following structure, you will print the graphs of each package of the diagram:
To insert a graph:
Drag a graph item from the Available Items pane to the Report Items pane. The graph appears in the Report Items pane.
Repositioning an item
You can change the order of items in the report using the drag and drop method within the Report Items pane. The only item you cannot reposition or remove in the Report Items pane is the root node that appears in each section of your report. When you drag a node, you also drag its dependent items.
For more information on the drag and drop method, see section Adding
items to a report.
76
PowerDesigner
Chapter 4
To reposition an item:
Building Reports
Drag an item to a new location within the Report Items pane. or Select an item in the Report Items pane and select ReportUp or ReportDown. The item is repositioned in the Report Items pane.
Contextual menus
You can right-click any item to access its contextual menu and display the commands that apply to it.
1 2
Select an item in the Report Items pane. Select ReportRaise Level. The item is positioned at the same level as the node. or Select ReportLower Level. The item is positioned within the node.
Contextual menus
You can right-click any item to access its contextual menu and display the commands that apply to it.
77
Press CTRL while you drag an item to a second location within the Report Items pane. The item is copied at the desired location in the Report Items pane.
1 2
Select an item in the Report Items pane. Press SUPPR. or Right-click the item and select Delete from the contextual menu. The item is deleted from the Report Items pane.
78
PowerDesigner
Chapter 4
Building Reports
You can use the following tools in the Report Object Selection dialog box:
Tool Name Include Sub-Objects Action Displays sub-objects (like sub-process or subactivity) and objects contained in the subpackages Displays sub-objects (like sub-process or subactivity) and objects contained in the subpackages that use the same namespace (with the Use Parent Namespace check box selected) Selects all objects in the object type page Deselects all objects in the object type page Adds graphically selected objects in the model diagram window Moves the selection to the top of the object list Moves the selection to the bottom of the object list Opens a Filter dialog box to define a filter on the list Enables the filter on the list Displays objects shortcuts contained in the model or package. If both the Include Shortcuts and Include Sub-Objects tools are enabled in the selection list, all the objects shortcuts of the current package and those of the sub-packages appear
Select All Deselect All Use Graphical Selection Move Selected Items to Top Move Selected Items to Bottom Customize Columns and Filter Enable/Disable Filter Include Shortcuts
The way you use the Include Sub-Objects tool allows you to display either: All objects in the current model or package including sub-objects and objects contained in packages or sub-packages All objects in the current model or package, except sub-objects and objects contained in packages or sub-packages
79
You can include in a report shortcuts contained in a model or package using the Include Shortcuts tool. Shortcuts are displayed in each object type page in the Report Object Selection dialog box. For example table shortcuts display on the Tables page when you click the Include Shortcuts tool. By default shortcuts are not selected. To include shortcuts in a report, you have to select a model or package and click the Include shortcuts tool, then select the check boxes corresponding to the shortcuts you want to include in your report. When you include in your report shortcuts whose target model is closed, some information such as comment or description for example are unavailable.
However, if you deselect these tools before you commit your selection, the objects you selected are no more visible in the current list. That is why when you want to commit your selection, a confirmation box asks you if you want to include non visible selected objects in the current selection. If you answer:
Yes Objects selection is composed of the objects selected in the current list together with non visible selected objects. No Objects selection is only composed of the objects selected in the current list. Other non visible selected objects are ignored and deselected. Selection tips
If you want to use a selection tool for all object type pages, press CTRL and click the desired tool.
To make a global object selection for the report:
80
PowerDesigner
Chapter 4
Building Reports
The Report Object Selection dialog box appears. All the objects are selected by default, except shortcuts if any.
2 3 4 5 6
Select a section from the Section dropdown listbox. Select a package from the package dropdown listbox. Select the objects to include in the report from the object list in each object type page. <optional> Click the Use Graphical Selection tool to automatically select the check boxes of objects selected in the diagram. Click OK.
81
You can use object selections and filter criteria to sort rows and columns in a CRUD matrix table using the Row Selection and Column Selection commands in the CRUD matrix contextual menu in the Report Items pane.
Right-click a book or a model-dependent list item in the Report Items pane and select Selection from the contextual menu. or (Matrix items only) Right-click a matrix item in the Report Items pane and select Row Selection or Column Selection from the contextual menu. The Define Sort and Filter dialog box appears.
82
PowerDesigner
Chapter 4 2
Building Reports
Click the Switch to Criterion button in the lower left corner of the dialog box to display the Select Objects dialog box.
The list displays objects selected in the Report Object Selection dialog box. 3 4 5 Select or deselect the check box beside objects you want to display or remove from the report. Use the arrows in the lower left corner to define a display order for the objects. Click OK.
Hierarchical Display command
If you define a selection of ordered objects on a package for which you also select the Hierarchical Display command, objects in the selection are taken into account when you generate the report but the order in the selection is ignored. For more information on the Hierarchical Display command, see section Adding nodes to a report.
83
The expression syntax uses standard wildcards as in the Customize Columns and Filter dialog box.
The Switch to Selection button is not available if the list you are sorting belongs to a book.
To define a filter criterion:
Right-click a book or a list item in the Report Items pane and select Selection from the contextual menu. or (Matrix items only) Right-click a matrix item in the Report Items pane and select Row Selection or Column Selection from the contextual menu.
84
PowerDesigner
Building Reports
2 3 4 5
Type an expression in the Expression column to restrict the selection in the column to a defined expression. Select the U column to apply the filter expression to the corresponding column. Select the S column to take the attribute into account for the sort. Click OK.
Cancel filter expression
If you want to keep the expression in memory but disable this filter for a while, you can clear the corresponding check box in the U column. The expression parameter will no longer be taken into account.
85
Using nodes
Using nodes
A node is an item that contains dependent items. Nodes appear as books in the Report Editor. For example the Business rule node contains items that describe a business rule.
Printing nodes
The Report Generator interprets nodes as print loops. For each object node, the report prints all the dependent items. For example, when a model contains two business rules ROYALTIES and AUTHOR_SALES the report prints in the following order: Business rule 1 Card of the business rule ROYALTIES Description of business rule ROYALTIES Annotation of business rule ROYALTIES Client check expression of business rule ROYALTIES Server check expression of business rule ROYALTIES Business rule 2 Card of the business rule AUTHOR_SALES Description of business rule AUTHOR_SALES Annotation of business rule AUTHOR_SALES Client check expression of business rule AUTHOR_SALES Server check expression of business rule AUTHOR_SALES
86
PowerDesigner
Chapter 4
Building Reports
Node dependency
Nodes can belong to other nodes. The following table lists all possible node dependencies.
Node type Root node Title Can belong to Root node Package node Object node Can contain All nodes and items in the report contents Title nodes Package nodes Object nodes Independent items Object-dependent items Title nodes Object nodes Independent items Title nodes Object-dependent nodes Independent items Object-dependent items Title nodes Independent items Object-dependent items
Package
Root node Title node Root node Title node Package node Object node
Object
Object-dependent
87
Using nodes
1 2
88
PowerDesigner
Chapter 4
Building Reports
The Editor dialog box opens and displays the current title text.
Type changes to the title text. The User-Defined check box is automatically selected, as you are no longer using the default values of the report language resource file you selected for you report.
(optional) Deselect the Show Title check box if you do not want to show the title of the node in the previewed or generated report.
For more information on the Show Title check box, see section
Removing the title of an item. 5 6 7 8 Place the cursor in the text where you want to insert variable information for object name or package name. Click the Insert button Select a field in the dropdown listbox. (Optional) Click the Format button.
89
Using nodes The format dialog box opens to the Font page.
10 Click OK in each of the dialog boxes. The first line of the title appears next to the node in the Report Items pane.
When you type changes in the edit box, the User-Defined check box is automatically selected as you are no longer using the default values used in the report language resource file you selected for your report. To revert to the default value, deselect the User-Defined check box. For more information on report language resource files, see chapter Using the Report Editors.
90
PowerDesigner
Chapter 4
Building Reports
Using items
In a report, items can be of the following types: Model-dependent items contain information about a model or a package Object-dependent items contain information about a specific type of object Independent items do not contain information about specific models or objects
Model-dependent items
Model-dependent items provide information about a model or a package. If you insert a model-dependent item under a package node, the item contains information related to the package. You cannot insert model-dependent items into object nodes. The following are model-dependent items:
Dependent item Card Description Annotation Begin script (PDM only) End script (PDM only) Object list Print format List of properties Text paragraph Text paragraph Text paragraph Text paragraph Table Content Properties of the model or package Description of the model or package Annotation of the model or package Text to add at the beginning of a script generated from the model Text to add at the end of a script generated from the model Table that lists all objects of a given type in the model
Object-dependent items
Object items provide information about objects in the model. These items have a restricted set of dependent items called object-dependent items. You can delete and change the order of object-dependent items in the Report Items pane. You cannot insert object-dependent items into object nodes of a different type.
Reports User's Guide
91
Using items For example, in the following report structure, the node Class precedes its object dependent items.
The report generator prints object-dependent items once for each node. If an item does not have information for a particular object, it does not appear in the resulting report. For example if a domain does not have any associated rules or check parameters, the domain description prints directly after the domain card. All object nodes have the following object-dependent items:
Dependent item Card Description Annotation Print format List of properties Text paragraph Text paragraph Content Properties of an object Description of an object Annotation of an object
In addition to the items mentioned above, each object node has dependent items related to the object type. For example, a business rule node has a dependent item for server expression.
92
PowerDesigner
Chapter 4
Building Reports
Independent items
Independent items do not contain information about specific models or objects. You insert an independent item in a report by dragging and dropping the item icon from the Available pane to the Report Items pane. You can insert the following independent items anywhere in the report:
Icon Independent item Table of contents Text paragraph Text file Page break Graphics Graphical file Generated result Complete report table of contents Paragraph of free text that you type Contents of a text file Prints next item on the following page Graph of model (or package if under a Package node) Contents of a graphical file
Page break
For a report generated as an RTF file, a page break is inserted at the position you place the page break icon. However, when you use the icon to insert a page break in an HTML file, you need to right-click the icon and select Generate in HTML.
93
Formatting items
Formatting items
In a report, the available format options depend on the print format: Text format Graph format Table format
Contextual menus
You can right-click any item to access its contextual menu and display the commands that apply to it.
1 2
Select an item in the Available Items pane. Select ReportFormat. A Format dialog box that corresponds to the type of the item appears. For example, if you select a graph, the Graph Format dialog box appears.
3 4
Type format changes. Click OK. Every time you add that item to the Report Items pane, it retains the global format.
Multi-selection
You can also change format options for several items at once by pressing CTRL while selecting items of the same type or not with the Pointer tool or using the SHIFT key to select a continuous list of items.
94
PowerDesigner
Chapter 4
Building Reports
1 2
Select an item in the Report Items pane. Select ReportFormat. A Format dialog box that corresponds to the type of the item appears.
3 4
Type format changes. Click OK. The format is applied to the selected item only. If you want to apply the defined format to all items of that type, you must define global format options for that item in the Available items pane.
95
2 3
96
PowerDesigner
Chapter 4
Building Reports
The following text selections are available for CRUD Matrix items, which print in table format.
Text selection Matrix title Matrix row and column Matrix text Description Title of the item Resource and process name CRUD value Example CRUD Matrix Check item (process name in rows) Stock (resource name in columns) RU
The following text selections are available for model- and object-dependent items in text format.
Text selection Title Text Description Title of the item Text of the description, annotation, or script Example Table Description This table describes different employee characteristics
List items
The following text selections are available for list items, which print in table format.
Text selection Title Column Header Text Description Title of the item Heading of column Value in the column Example List of Indexes Code PK_EMPLOYEE
Title page
The following text selections are available for the title page, which print in text format.
For more information on the title page, see section Including a title
page.
Text selection Title Optional Fields Description Title of the report Text of the author, date, version or summary Example OOM Report VB, 09.15.99, draft, report with lists only
97
Formatting items
Table of contents
The following text selections are available for the table of contents, which prints in text format.
Text selection TOC title Level 1 Level 2 Level 3 Level 4 etc. Description Title of the table of contents Text of the different hierarchy levels in the table of contents Example Table of contents 2 Association information 2.1 Model information 2.1.1 Card of the model OOM etc.
You can select the levels to display from the Show levels to dropdown listbox in the Format dialog box. For an HTML report, you must define the depth level of the table of contents in the HTML Format page of the Report properties dialog box.
98
PowerDesigner
Chapter 4
Building Reports
Simultaneous selection
Besides, you can simultaneously select items with different print formats and apply to them the format options corresponding to the type of the item. For example, if you select a card item and a list item, the text selections that you can format for both items appear in the Available Items pane of the Format dialog box:
Selecting a font
You can select a font for any item, except for the graph and page break. If you call the Format dialog box from the Available Items pane, the font formatting becomes the default format, as explained in section Defining global format for an item. If you call the Format dialog box from the Report Items pane, the font formatting applies to the selected report item, as explained in section Formatting individual items. The following font formatting is available from the Format dialog box: Font Font style Size Underline Strikeout
99
Formatting items
To select a font:
1 2
Select an item. Select ReportFormat. The Format dialog box opens to the Font page.
Select an item in the Available Items pane of the Format dialog box. The item is highlighted.
4 5
100
PowerDesigner
Chapter 4
Building Reports
Formatting a paragraph
You can select a paragraph format for any item, except for graphs and page breaks. If you call the Format dialog box from the Available Items pane, the paragraph formatting becomes the default format, as explained in section Defining global format for an item. If you call the Format dialog box from the Report Items pane, the paragraph formatting applies to the selected report item, as explained in section Formatting individual items. The following paragraph formatting is available from the Format dialog box: Indentation (left, right, first line) Spacing (before, after, internal line spacing) Justification (alignment)
To format a paragraph:
1 2
Select an item. Select ReportFormat. The Format dialog box opens to the Font page.
Click the Paragraph tab to select Indentation, spacing and justification formats.
4
Reports User's Guide
Select an item in the Available Items pane of the Format dialog box. 101
Formatting items The item is highlighted. 5 6 Define paragraph format. Click OK.
Right
Top
Bottom
102
PowerDesigner
Chapter 4
Frame option Box Result in the generated report Inserts a unique rectangle around all the occurrences of the highlighted text selection in the Available Items pane (only available for card and list items)
Building Reports
Result
Indicates the width of the border frame Indicates the width of the box frame Sets the amount of space from text to top, bottom, left, and right border
Box option
Box option is only available for: Text Label in card items Column header and Text in list items
If you select the Box option in the Format dialog box of a card item
You insert a unique rectangle that groups all the occurrences of Text Label (property names) including Text (corresponding property values) by default.
If you select the Box option in the Format dialog box of a list item You insert a unique rectangle that groups all the occurrences of Column Header (heading of column, example Code), as well as a unique rectangle that groups all the occurrences of Text (value in the column), if you have previously highlighted each of these text selections in the Available Items pane. To select frame format:
1 2
Select an item. Select ReportFormat. The Format dialog box opens to the Font page.
103
Select an item in the Available Items pane of the Format dialog box. The item is highlighted.
5 6
104
PowerDesigner
Chapter 4
Tab formatting Alignment Description
Building Reports
Allows you to select the way you want text to be aligned at the tab stop. To change the alignment for an existing tab stop, click it in the Tab Stop Position box, and then click the new alignment option
This paragraph formatting is particularly useful for the layout of headers and footers.
1 2
Select an item. Select ReportFormat. The Format dialog box opens to the Font page.
Select an item in the Available Items pane of the Format dialog box. The item is highlighted.
5 6 7 8
Reports User's Guide
Type a value in the Tab stop position box. Select an Alignment type in the Alignment groupbox. Click Set to set your tabs definition. Click OK. 105
Formatting items
Editing text
You can modify the text of a text paragraph or a text file in a text editor. The default editor is NOTEPAD.EXE.
To edit text:
Double-click a text paragraph or a text file in the report items pane. The Editor dialog box appears.
2 3
Formatting a graph
You can apply zoom options and frame options to graphs.
106
PowerDesigner
Building Reports
Centers the graph on a page and, if necessary, reduces the graph to fit on one page Prints the graph on the next line in the report and, if necessary, reduces the graph to fit on one page Prints the graph on the number of pages required at a percentage print scale Respects the diagram layout and adapts the zoom to generate one page of the diagram per report page
As Paragraph
Zoom
You can also frame a graph using the Left, Right, Top and Bottom frame options in the Graph Format dialog box.
Double-click a graph item in the report items pane. The Graph Format dialog box appears.
2 3
107
Formatting items
Click a list item in the Report Items pane and select ReportLayout. The List Layout dialog box corresponding to the selected item appears. It displays the names of columns available for the table. A check in the Enabled column indicates a column to include in the table.
Select the Enabled check box to include the column in the table. or Clear the Enabled check box to remove the column from the table. Click OK.
108
PowerDesigner
Chapter 4
Building Reports
Click a list item in the Report Items pane and select ReportLayout. The List Layout dialog box appears. The column width appears in the Width column.
Click a column in the list. An arrow appears at the beginning of the line.
Type a width followed by inch for inches, mm for millimeters, or % for a percentage of the remaining space left by the columns defined by inches or mm. Repeat the previous step until all columns have the width that you want. Click OK.
4 5
109
Formatting items
Click a card item in the Report Items pane and select ReportLayout. The Card Layout dialog box corresponding to the selected item appears. It displays the names of rows available for the table. A check in the Enabled column indicates a row to include in the table.
Select the Enabled check box to include the row in the table. or Clear the Enabled check box to remove the row from the table. Click OK.
Shortcuts cards
Select the Enabled check box for the Class Name row to distinguish shortcuts cards from the other object types cards in the generated report.
110
PowerDesigner
Chapter 4
Building Reports
When you generate an HTML report that contains a diagram graphic and the object cards of the symbols, hyperlinks are created between the diagram symbols and the corresponding object cards. You can click a symbol in the diagram to access the object card that corresponds to it in the HTML page.
111
When you define a page setup, it only applies to the current section.
Paragraph numbering
If you do not want the paragraphs of your report to be numbered when printed, select the check box No paragraph numbering in the report property sheet.
112
PowerDesigner
Chapter 4
Building Reports
Header
1 2
Click the root node in the Report Items pane. Select ReportHeader/Footer. The Header and Footer dialog box opens to the Header page.
Type changes to header text. The User-Defined Header check box is automatically selected as you are no longer using the default values of the report language resource file you selected for your report.
Tabs in a header
Use the key combination CTRL+TAB to insert tabulations in a header or open the Tabs page in the Format dialog box to set tab stop values. 4 5 6 Position the cursor in the header text where you want to add variable information. Click the Insert button and select a field from the dropdown listbox. Click the Format button.
113
Setting up report pages The format dialog box opens to the Font page.
7 8 Footer
1 2 3
Click the root node in the Report Items pane. Select ReportHeader/Footer. Click the Footer tab.
Type changes to footer text. The User-Defined Footer check box is automatically selected as you are no longer using the default values of the report language resource file you selected for your report.
114
PowerDesigner
Chapter 4
Building Reports
Tabs in a footer
Use the key combination CTRL+TAB to insert tabulations in a footer or open the Tabs page in the Format dialog box to set tab stop values. 5 6 7 Position the cursor in the footer text where you want to add variable information. Click the Insert button and select a field from the dropdown listbox. Click the Format button. The format dialog box opens to the Font page.
8 9
When you type changes in the Header and Footer box, the UserDefined check box is automatically selected as you are no longer using the default values used in the report language resource file you selected for your report. To revert to the default value, deselect the User-Defined check box. For more information on report language resource files, see chapter Using the Report Editors.
115
Select ReportTitle Page The Title Page dialog box appears. By default, the Include title page radio button and all the optional fields are selected.
116
PowerDesigner
Chapter 4 2
Building Reports
Select the check boxes corresponding to information to include in the title page and type the appropriate text in each corresponding text box. or Clear the check boxes corresponding to information to remove from the title page. Click the Format button to customize the title or the optional fields. The Format dialog box opens to the Font page.
4 5
The title page is always generated for a report generated as an HTML file, even if the Include Title Page option is not selected.
117
Setting up report pages The following illustration shows a portion of a report preview, with the Show Title command selected:
The following illustration shows a portion of a report preview, with the Show Title command deselected:
The table of contents also reflects your choice to show or not the title of an item, depending also on the depth level you have specified in the Format dialog box of the table of contents.
Right-click an item and deselect the Show Title command in the contextual menu. or Double-click an item to open the Editor dialog box and deselect the Show Title check box, then click OK. The title of the item is not displayed in the previewed or generated report.
118
PowerDesigner
Chapter 4
Building Reports
A report definition also includes the following properties: HTML Format Version Info
For more information on the Version Info tab, see section Displaying
Version information in chapter Using the PowerDesigner interface in the General Features Guide.
To modify report properties:
Select ReportReport Properties from the Report Editor window. or Right-click the report node in the Browser, and select Properties from the contextual menu.
119
2 3
You can also define the depth level of the table of contents in an HTML report. PowerDesigner ships with a set of predefined style sheets and header and footer files that you can use to generate your HTML reports. They are stored in the Resource Files\HTML Report Style Sheets folder.
120
PowerDesigner
Chapter 4
Building Reports
The following table describes the use of classes name in the creation of report style sheets:
Class names BODY Description Defines the background styles for all report pages, except the home page frame and the browser frame page Defines the background styles for the browser page Defines the background styles for the home page Defines the default font styles for text blocks, like description, annotation, etc Defines the default font styles for the title of the home page Defines the default styles for tables Defines the default styles for table cells Defines the styles for object list tables Defines the styles for the header cells of object list tables Defines the styles for the cells of object list tables of even rows Defines the styles for the cells of object list tables of odd rows Defines the styles for object card tables Defines the styles for the cell name of object card tables Defines the styles for the cell value of object card tables Defines the styles for the tables around the text blocks Defines the styles for the cells of tables around the text blocks Defines the styles for the tables around the home page title Defines the styles for the cells of tables around the home page title Defines the styles for the tables around graphics
.BROWSERBODY .HOMEBODY .TEXT .TITLE TABLE TD Table.GRID TABLE.GRID TD.HEADER TABLE.GRID TD TABLE.GRID TD TD2 Table.FORM TABLE.FORM TD.HEADER TABLE.FORM TD Table.TEXT TABLE.TEXT TD Table.TITLE TABLE.TITLE TD Table.GRAPHICS Reports User's Guide
121
In a style sheet, you can define font, color, background, size, margin, and alignment for each class name. When you apply a style sheet to a report, all the options you have defined before (ex: font) are no longer taken into account. The styles defined in the CSS file will be applied. 122
PowerDesigner
Chapter 4
Building Reports
The HTML Format page includes the following properties. Each property is optional:
Property Style sheet Description 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 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 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 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 Format for graphic items associated with diagrams. 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 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
Header Location Height Footer Location Height TOC Level Width Image Format PNG JPEG List format Number of rows per page Links to additional results
You can also right-click a node title or an object node in the Report Items pane and deselect Show in HTML TOC to only display the title of the node without its content in the table of contents.
123
Setting up report pages 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 and header and footer files are used the following way:
Location Local path or UNC path URL Use The HTML or CSS file is copied into the report generation folder 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 11\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.
Select ReportReport Properties from the Report Editor window. or Right-click the report node in the Browser, and select Properties from the contextual menu. The report property sheet appears.
124
PowerDesigner
Chapter 4 2 3 4 5 6
Building Reports
Click the HTML Format tab to display the corresponding page. <optional> Browse for a .CSS file or type a URL in the Style Sheet box. <optional> Browse for a local or shared .HTM file, or type a URL in the Location box of the Header groupbox. <optional> Browse for a local or shared .HTM file, or type a URL in the Location box of the Footer groupbox. <optional> Type a number in the Level box.
Click OK. When you will generate the HTML report, it will reflect the properties you have defined for the report.
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 section Using the Report Language Editor in chapter Using the Report Editors.
125
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.
126
PowerDesigner
Chapter 4
Building Reports
Select FilePrint Preview. or Click the Print Preview tool in the Report toolbar. The Print Preview window displays the two first pages of the report if any.
127
You can rapidly see what a report item will look like if printed. To do so, right-click the report item in the Report Items pane and select Quick View from the contextual menu that appears. The Print Preview window displays the report item.
1 128
Building Reports
(Optional) Select the model you want to search in if you work on a multimodel report. Select an object type from the Object Type dropdown listbox. Select an object name from the Available Objects list.
6 7 8 9
Click the Find button. The Report Topic box displays a list of topics that mention the object. Select a topic in the list. Click the Display button. The topic you selected appears in the print preview window.
129
Select FileClose. or Click the Close tool. You return to the Report Editor.
130
PowerDesigner
Index
D A
add node to report 72 default font in report 95 value for template 28 Default for HTML report properties delete item from report 78 section 32 dependent item annotation 91 begin script 91 card 91 description 91 end script 91 object list 91 report 72 display preview 130 toolbar 15 double-click add items to report 70 drag & drop add items to report 70 between report editors 70 120
B
border format 102 width 102
C
calculated collection 73 card display information 110 hyperlinks in HTML report 110 shortcut 111 category Object Attributes 34 Report Titles 34 Values Mapping 34 charset HTML report 124 valid codepage 124 close Multi-Model Report Editor 21 preview 130 Report Editor from a model 20 Report Template Editor 12 column default 108, 109 table 108 width 109 copy item in report 78 criterion 84 CSS structure 120 style sheet 120
E
edit text 106 editor Notepad 74 text 74 empty section 23 expression filter 84
F
file graphical 75, 93 text 75 filter 84 criterion 84
131
filter (continued) define 84 filter 84 font report 99 size 99 strikeout 99 style 99 underline 99 footer associated files 123 frame in HTML report 120 modify in RTF report 112 format border 102 graph 106 list item 108 paragraph 101 report 94 report item 94, 95, 96, 99, 101 table 108 tabs 104 text 96, 99, 101 title 96 frame graph option 106 paragraph 101 free text 93
H
header associated files 123 frame in HTML report 120 modify in RTF report 112 Hierarchical Display 72, 82 home 120 HTML file 54, 64 generate file 19 insert page break 93 report 19, 130 HTML report charset 124 CSS file 120 customize 120 Default 120 footer 120 header 120 package tree view 19 report generation folder 19 Set As Default 120 style sheet 120 table of contents 120
I
inch 109 indented paragraph 101 independent item graph 93 page break 93 table of contents 93 text 93 item add to report 70 multiple selection 94, 96 remove title 117 show title 117
G
generate as HTML from print preview 130 as RTF from print preview 130 from existing report 56, 66 multi-model report 64 quick report 57, 67 report 54, 59, 130 report as HTML 19 report as RTF 19 graph format 106 frame options 106 independent item 93 package 76 report 76, 106 zoom options 106 graphical file 75, 93
J
JPEG graphic format 120 justified paragraph 101
132
PowerDesigner
L
language attach to a report 46 change in a report 46 in a report template 7 list customize columns and filter 78 enable/disable filter 78 include shortcuts 78 include sub-objects 78 include sub-objects using same namespace item 108
O
object define ordered selection 82 report 78 report node 87, 88 save selection 21 object-dependent item modify 91 print 92 report node 87, 88 open Multi-Model Report Editor 15 preview 127 Report Editor from a model 13 Report Language Editor 37 Report Template Editor 4
78
M
millimeter 109 MMR file 21 model report 51, 54, 56, 58 select 7 modify report template 10 section 28 multi-model report 60, 61, 66 create 61 generate 64 modify 66 print 64 save 68 template 3 Multi-Model Report Editor 3 close 21 open 15
P
package graph 76 HTML report 19 report node 87, 88 package hierarchy 72 page break HTML 93 independent item 93 page setup 112 paragraph frame 101 indent 101 justify 101 numbered 112, 119 tab space 101 percentage 109 PNG graphic format 120 position item in report 76, 77 preview close 130 display 130 navigate 128 open 127 print 127, 130 quick access 127 report 18, 127, 128, 130 report item 127 search 128 previous 120
N
navigate in preview 128 navigation option home 120 next 120 previous 120 next 120 node title 88 Notepad 74
133
print multi-model report 64 preview 127, 130 report 19, 54, 130 report node 86 property code 119 comment 119 language 119 name 119 no paragraph numbering 119 report 119 property sheet of a report 119
R
remove item title 117 report add item 70 add node 72 calculated collection 73 copy item 78 create 17, 51 define default font 95 definition 2 delete item 78 dependent item 72 depth level 77 display preview 130 filter criteria 84 font 99 format 101 generate 54, 130 generate as HTML 19 generate as RTF 19 generator 59 global format 94 global object selection 78 graph 76, 106 hierarchy 77 include shortcuts 78 mapping table 34, 38, 41 model 51, 54, 56, 58 modify 56 modify property 119 multi-model 61, 66 multi-select items 70 object selection in report items
81, 82
report (continued) outline 77 page break 93 page setup 112 paragraph 101 position item 76, 77 preview 18, 127, 128, 130 print 19, 54, 130 property 119 property sheet 119 quick generation 57, 67 refine object selection 78 save 20, 58 select object 78 sort criteria 81 summary 116 template 3 text 74, 75 title page 116 toolbar 15 translate object property value translate property names 38 translate report titles 38 Report Editor 3, 13, 18, 19 close from a model 20 multi-model 3 open 13 open from a model 13 organize 22 report item 91 dependent 72, 86 format 94, 95, 96 independent 70, 93 model-dependent 70, 91 node 70 object list 70 object-dependent 70 quick preview 127 type 70 report language define 34 resource file 38, 46 translate 38 translation examples 38 Report Language Editor 3 define 34 open 37 translate resource file 38 report node 72, 86 dependent item 86, 87
41
134
PowerDesigner
report node (continued) modify title 88 object 87, 88 object-dependent 87, 88, 91 package 87, 88 print 86 template 87 title 87, 88 report template 3, 50, 60 create 7 language 7 modify 10 node 87 standard 6 Report Template Editor 3, 4 close 12 open 4 resource file for report language 34, 38, 46 RTF file 54, 64 generate file 19 report 19, 130 RTP file 7, 10 save 7, 10
show title 117 standard report template 6 style sheet associated files 123 CSS file 120 customize 120 HTML report 120 structure 121 summary report 116 title page 116
T
tab alignment 104 format 104 position 104 tab space in paragraph 101 table column 108, 109 default 108, 109 format 108 table of contents HTML report 120 independent item 93 insert 74 limit depth level 98, 123 page break 74 template apply default values 28 create from a report section 26 modify 10 multi-model report 3 re-apply default values 28 report 3, 50 standard 6 text edit 106 editor 74 file 75 font 99 format 96, 99, 101 independent item 93 paragraph 74 title 88, 96 title page 116 text paragraph 93
S
save multi-model report 68 object selection 21 report 20, 58 Save As Default in HTML report 120 search in preview 128 section 22 create 22 create from a template 24 delete 32 empty 23 modify 28 numbered 112, 119 rename 30 select model 7 shortcut card 111 include in a report 78 Show content in HTML TOC 123 Show levels to 98 Reports User's Guide
135
title format 96 free text 88 removed from report 117 report node 87, 88 text 88, 96 title page author 116 date 116 description 116 report 116 summary 116 title 116 version 116 tool customize columns and filter 78 deselect all 78 enable/disable filter 78 include shortcuts 78 include sub-objects 78 include sub-objects using the same namespace 78 move selection to bottom 78 move selection to top 78 select all 78 use graphical selection 78 toolbar display 15 report 15 translate report language 38 TXT file 75, 93 typographic conventions viii
X
XHTML generate file report 19 19
Z
zoom for graph 106
136
PowerDesigner