Report Wizard

OpenOffice.org 2.0

Document - ID	Specification Owner	Last Change	Status
	Berend Cornelius	25.05.05	final
Conforms to	Concept for Wizards
Applies to	Base
Task ID(s)	i34266
Category	feature

Abstract

The Report Wizard for OOo 2.0 is used to create reports in the new Base module. The overall behavior and functionality is not changed compared to OOo 1.x.

i-Team Members (The specification owner is part of the i-Team)

	Name	E-mail Address
User Experience	Matthias Müller-Prove /MMP	mprove@sun.com,
Development	Berend Cornelius /BC	bc@openoffice.org,
Quality Assurance	Marc Neumann	Msc@openoffice.org
Documentation	Uwe Fischer	ufi@sun.com
		mail to iTeam

Approved for Implementation

	Approved by	Date
User Experience	Matthias Müller-Prove	29.12.04
Development		
Quality Assurance		
Documentation		
String Review	Elizabeth Matthis	29.12.04

Document Change History

Rev. Level	Change	Initials	Date
	initial version screenshots of Report Wizard as in SO680m67 String tables just filled out to specify the changes against m67	MMP	29.12.04
1.1	Content of old specification „Reportwizard-spec.html“ merged. (This old specification will be removed from cvs)	BC	10.03.05

Contents

Glossary	4

1	Motivation	4

2	User Scenarios	4

3	Goals	4

4	Requirements and Dependencies	4

4.1	Requirements	4

4.2	Technical Dependencies	4

5	Competitive Analysis	5

6	Detailed Specification	8

6.1	Step 1 Field selection	9

6.2	Step 2 Labeling fields	11

6.3	Step 3 Grouping	12

6.4	Step 4 Sort options	13

6.5	Step 5 Choose layout	14

6.6	Step 6 Create report	15

7	Future Tasks	16

8	Notes	16

9	References	16

Glossary

Term	Description
OpenOffice.org API	The OpenOffice.org API is the comprehensive specification that describes the programmable features of OpenOffice.org.
SQL	Structured Query Language (SQL) is a language used for database queries. In OpenOffice.org you can formulate queries either in SQL or interactively with the mouse.
SQL Statement	An expression that defines an SQL command, such as SELECT, UPDATE, or DELETE, and includes clauses such as WHERE, ORDER BY, GROUP BY and HAVING.SQL strings/statements are typically used in queries and in aggregate functions. This query wizard produces a “SELECT” statement.

Motivation

As in the OpenOffice.org version 2.0 there will be an own database document format for the Base application the question is raised how the previously existing Report Wizard is to be embedded within this document.

User Scenarios

A typical user scenario of a report is the need of the user for a userfriendly solution to create reports that enable him to view the data of his database. The solution for this is the wizard that keeps the user free from time consuming trouble.

Goals

This wizard should cover all major aspects to consider when creating related reports. It should be modernized by applying style templates.

Requirements and Dependencies

Requirements

The wizard is started from a database document and only requires the existence of database tables and/or queries in the database.

Technical Dependencies

There are no specific requirements that can't be met by the OpenOffice.org API.

Competitive Analysis

MS Acceess 2002 does not offer the option to immediately review committed layout changes in the document. The report is created after finishing the wizard and the user is assisted by some graphics that convey a vague idea of how the final document will look like. The delivered styles haven't changed in the recent years.

In opposition to the major competitor OpenOffice.org does not offer a possibility to create reports by means of a report engine

The major competitor does not provide any navigation control like the roadmap.

The following screenshots provide an overview of the Report Wizard of MS Access 2002:

Detailed Specification

String list

Item	English	German	Comments
window title	Report Wizard	Berichts-Assistent	

Basically the report wizard follows the guidelines in http://specs.openoffice.org/installation/wizards/Wizards_NewConcept.sxw

which standardizes the implementation of OpenOffice.org wizards.

Step 1 Field selection

Illustration 1 screenshot of the Report Wizard taken from StarOffice 8 680m67

Item	English	German	Comments
Label	~Fields in report	~Felder im Bericht	
Dialog Title	Report Wizard	Berichts-Assistent	
Label	Tables or queries	~Tabellen und Abfragen	
Label	Available fields	~Verfügbare Felder	
Label	Binary fields cannot be displayed in the report.	Binärfelder können nicht im Bericht angezeigt werden.	
Right pane Title	Which fields do you want to have in your report?	Welche Felder sollen in Ihrem Bericht erscheinen?	
Roadmap Item 1	Field selection	Felderauswahl	
Roadmap Item 2	Labeling fields	Felder beschriften	
Roadmap Item 3	Grouping	Gruppierungen	
Roadmap Item 4	Sort options	Sortieroptionen	
Roadmap Item 5	Choose layout	Auswahl des Layouts	
Roadmap Item 7	Aliases	Bericht erstellen	
Roadmap Item 8	Create report	Übersicht	

The first wizard page is about the extraction of all the fields of the database tables that are to be included in the query. The handling of this page is specified in the “FieldSelection” Specification.

The listbox “Tables or queries” contains all tables and queries of the database and is filled on start up with the first listbox entry being preselected by default.

As soon as a database table has been selected immediately the “Available fields” listbox is populated with all available fields of this table. The user then has the option to specify exactly which fields to be included in his query by activating the buttons between the listboxes to populate the “Fields in report” listbox.

As soon as the “Fields in Report” listbox contains items the “Next” button and the “Finish” button get enabled. Contrarily the “Next” button gets disabled when the “Fields in my Query” listbox is empty.

Clicking “Finish” will create and execute an SQL Statement resulting from the data that have been assigned within this wizard.

Roadmap Handling

The Roadmap as an active one according to http://specs.openoffice.org/installation/wizards/Wizards_NewConcept.sxw, meaning the lables in the roadmap behave like hyperlinks pointing to specific steps of the wizard. Clicking on such a label will let the dialog switch to that targeted step. The order of the roadmap labels – the roadmap path- is determined on the start up of the wizard. If the report is based on a query as determined in “Step 1 Field selection” the “Sort options” must be disabled because sort options might conflict with sort options determined within the query. As soon as at least one field on dialog page one has been inserted into the “Fields in report” listbox the rest of the dialog steps are enabled.

General Structure of the Report Document

The following requirements have to be considered.

Basically the report document should contain all information that is necessary to merge the records into the correct arrangement and layout.

The document should be as tolerant as possible towards subsequent modification by the user. A wizard does usually not deliver a perfect solution for a sophisticated user but it should at least offer a useful skeleton to make the result perfect. Subsequent removal of a table column from the report document must be „tolerated“ by the wizard.

The report document should be as intuitive as possible to make it easier for the user to adapt it to his wishes.

Report Header

This Section shows up only at the first page and typically contains the title of the report and probably a company logo, company address and a printdate.

It can be filled with content during runtime by importing page styles when the user selects a certain layout in the Report dialog.

Page Header

The page header shows up at the top of each page and describes column labels.

In some arrangement templates the pageheader might remain empty.

Group Header

The structure of the displayed records can be improved by grouping them according to a certain field.

The groupheader shows up at the beginning of each group of data records and it contains the name of the group which means the record entry of a field that the records are grouped into. Most probably also the content of the db field has to be merged in.

Record Section

The Recordsection contains all the data of a table or a query that is to be displayed divided into sequential rows that represent the records of the DB content. It can either be placed below a groupheader or a pageheader.

Page Footer

In a pagefooter information like pagenumbers, current dates and author can be displayed.

Formats of displayed Data

All Tablecells containing Data should be formatted in the same way as in the datasource configuration. If no format is set the particular standard format of the document is to be used. Only the boolean format is created in a special way with the following formatstring: ”[=1]"☑";[=0]"" “.To display such values correctly the font of the cell has to be set to StarSymbol therefor. Unfortunatly the numberformatter cannot recognize the differencs between a null value and a zero value.

Hard Format Settings

Unfortunately settings like “Numberformats” and Table Column widths cannot be set at a paragraph style so they have to be set hardformatted. Subsequential changes after Data Insertion by the user will have to be made in each cell of its own.

Empty database tables or queries

In case there are no data records in the database table or query only table headers and one row or column with an empty value cell per each database field is shown.

Step 2 Labeling fields

Illustration 2 screenshot of the Report Wizard taken from StarOffice 8 680m67

Item	English	German	Comments
Label	How do you want to label the fields?	Wie möchten Sie die Felder beschriften?	
Label	Field	Feld	
Label	Label	Beschriftung	

The assignment of the report labels takes place on the second page. Its functionality is described in DialogComponent_AssignAlias.sxw. Basically it is about the assignment of aliasnames to fieldnames in order to provide a more intuitive “User Interface” name or to avoid confusion among fieldnames with the same name in different tables (Assign Aliases).

The column names and their labels are represented by userfields. The userfields' names represent the column names and their contents represent the label that has been assigned on the second dialog page

Changes commited to the labels within this dialog page are immediately reflected in the userfields of the underlying document – if existing.

Step 3 Grouping

Illustration 3 screenshot of the Report Wizard taken from StarOffice 8 680m67

Item	English	German	Comments
window title	Grouping	Gruppierungen	
label	Do you want to add grouping levels?	Möchten Sie Gruppierungen hinzufügen?	
Label	Groupings	Gruppierungen	
Label	Fields	Felder	
Label	Note: The dummy text will be replaced by data from the database when the report is created.	Hinweis: Blindtext wird bei der Fertigstellung des Berichtes durch Datenbankinhalte ersetzt.	
	The remaining resources are determined in http://dba.openoffice.org/specifications/DialogComponent_Sorting.sxw

On the third page the grouping fields are assigned by determining the group levels. Two Command Buttons in the middle of the two listboxes merge the selected fields to the next grouplevel to or from the underlying document (see also chapter “5. General Concept of the Report Document”)

The selected groupfields are then prepended as sorting criteria to the Query statement.

A hint is displayed to warn the user that the content for the Table columns will be exemplarily filled up with blind text. For strings this is blindtext for other numberformats of the columns it is exemplary content that should be easily recognized as such.

Step 4 Sort options

Illustration 4 screenshot of the Report Wizard taken from StarOffice 8 680m67

String list

Item	English	German	Comments
window title	Sort options		
label	According to which fields do you want to sort the data?	Nach welchen Feldern wollen Sie die Daten sortieren?	
	The remaining resources are determined in http://dba.openoffice.org/specifications/DialogComponent_Sorting.sxw

On the fourth page (Sorting options) the user has to set the sorting options according to the specification in http://dba.openoffice.org/specifications/DialogComponent_Sorting.sxw.

Searching for duplicately assigned conditions will take place on clicking the “Next” button and have to be handled by the user in the same way as described in Sorting Component Specification.

When the report is based on a query as determined on Step 1 this page is disabled. Otherwise it is always initialized with the previously selected Grouping fields set as the first sorting orders and their listboxes bein set to readonly. The mode (“Ascending” or “Descending” can be set at the groupfields anyway.

Step 5 Choose layout

Illustration 5 screenshot of the Report Wizard taken from StarOffice 8 680m67

Item	English	German	Comments
Label	How do you want your report to look?	Wie soll Ihr Bericht aussehen?	
Label	Layout of data	Layout der Daten	
Label	Layout of headers and footers	Layout der Kopf- und Fußzeilen	
Label	Orientation	~Ausrichtung	
Radio button	Portrait	H~ochformat	
Radio button	Landscape	~Querformat	
Label	Note: The dummy text will be replaced by data from the database when the report is created.	Hinweis: Blindtext wird bei der Fertigstellung des Berichtes durch Datenbankinhalte ersetzt.	

In Illustration 5 you can configure your underlying document. The underlying template styles are imported from documents in the template subdirectory “/report” of the office installation. The user is free to add his own templates and add them to the directory. It is essential that all layout information is separated from the source code. This makes it easier to maintain the source code and gives the user the opportunity to incorporate own layout templates.

All layout changes made in the dialog are immediately committed to the underlying document.

Layout settings of headers and footers basically header and footer layout and eventually background settings. This information is retrieved from the page styles of the selected templates.

Layout Settings of data pertain all the settings dealing with the inserted Text Sections and texttables. In our delivered templates we store these settings in respective paragraph templates that are imported. The layout settings of the data are specified by sections inserted by the report wizard. These writer sections represent the DataGroups like “GroupHeader” specified in the beginning of this chapter. The general structure of the report document is based on grouping sections and record sections. The sections receive their format from the templates they are linked with. In the live mode with Data inserted in the document the sections are set hidden. So we have the following relationship between text sections and texttables: text sections import the layout information from the selected template by linking themselves with those templates. Texttables are the container for the data of the database command.

To assign the appropriate fieldwidths to the query fields we make use of texttables that are contained within the sections. However the fieldwidths will not be calculated but set by the “OptimalWidth” function that can be applied to one or several columns and is also accessible via slot or OpenOffice API.

Setting page orientations: When switching the orientation the whole layout structure would have to be redrawn as all changes are immediately committed to the underlying report document.

The title is also layout specific as users may want the title to appear in the header of their report. A default title is set that points to the tablename (or queryname of the datasource).

The column names and their labels are represented by userfields. The userfields' names represent the column names and their contents represent the label that has been assigned on the second dialog page

Step 6 Create report

Illustration 6 screenshot of the Report Wizard taken from StarOffice 8 680m67

String list

Item	English	German	Comments
Roadmap	Create report	Bericht erstellen	
	Decide how you want to proceed	Bitte entscheiden Sie, wie Sie fortfahren möchten	
	~Title of report	Name des Berichts	
	What kind of report do you want to create?	Welche Art von Bericht möchten Sie erstellen?	
	~Dynamic report	Dynamischer Bericht	
	~Static report	Statischer Bericht	
	How do you want to proceed?	Wie möchten Sie fortfahren?	
	~Modify report layout	Layout des Berichts bearbeiten	
	~Create report now	Jetzt Bericht erstellen	

Basically the Report Document can be stored as a dynamic or static report. Dynamic reports are “filled up” with data every time they are opened. It is offered the options that a report is immediately created from the template and filled with data or that the report is opened for editing (“Modify report”), so that the user can adapt the layout to his very own needs. The necessary data to automatically reconnect to the database is stored in hidden controls of a formular.

Static reports merely represent a “snapshot” of the data of the Database and are filled with database data only directly after completing the report wizard.

The default reportname is derived from the name of the database command as selected from the first dialog page.If necessary it is made unique by appending a number.

Future Tasks

Notes

<Questions will arise during the writing of the specification. State these in here.>

References

Concept for Wizards	http://specs.openoffice.org/installation/wizards/Wizards_NewConcept.sxw

Sorting Dialog Specification: http://dba.openoffice.org/specifications/DialogComponent_Sorting.sxw

Alias NameDialog Specification:
http://dba.openoffice.org/specifications/DialogComponent_AssignAlias.sxw

16	Report Wizard

Report Wizard	16

http://dba.openoffice.org/specifications/Wizard_Report.sxw

Matthias Müller-Prove

2004-12-29T16:30:40

Berend Cornelius