- 1 First Steps
- 2 The Main Interface
The first thing to do with the designer open is to connect to a database or a report. Click on either Connect or Open Report in the toolbar.
Connecting to a Database Server
By default all server-type databases are disabled. To enable a server-type database change the associated constant in
PAF_DatabaseKit.Settings to True. You cannot select a database or open a report that uses one if the type is not enabled in this settings module. This is intentional to prevent issues for users without a license to use Xojo Database plugins.
Select a database server option. Fields to input connection details appear. Fill in connection details. To make the connection a favorite press the plus icon next to the favorites popup menu after filling in the connection details. Click "Connect" to connect to the database server. Note: Server password is never saved in favorites or template files.
Connecting to a SQLite Database
When SQLite is selected the connection fields disappear. Press the "Select" button to select the SQLite database file. To make the connection a favorite tick the "Add to favorites" prior to selecting the database file.
Establishing Logical Data Connections
After the connection to the database is established the Report Designer will parse tables, views, foreign keys, and any logical connections between tables. These are used later on to determine grouping assumptions. Database relationships can be edited in the Relationships Editor.
The Main Interface
The main interface of the Report Designer has three main areas: The Object List, the Designer, and the Property List. Each one is described below.
The Object List
The object list has four sections with items for reporting.
The first section is the static objects list. These objects can be dragged into the designer (or double click to insert into the body band). Items added to the report from the static objects list do not change with data being run; use them for headers, labels, and other information that should remain static. Use decorative objects like lines and rectangles to visually group report data.
These are placeholders for text that will be substituted at runtime using a simple Key/Value pair. Use the Designer Constants editor to add constants and their runtime values. The point of constants is to give the developer the ability substitute in data that is not part of the datasource at runtime. An example of this might be who is running the report or which computer generated the report.
The Report Designer has some placeholders for enhancing headers and footers on your reports. The timesamp will be formatted as selected in the Report Designer preferences.
This section contains all of the Tables found in the database connection sorted by name. Each table can be expanded with the disclosure triangle to shows all of the fields that are in table. To add a field to the designer either drag it from the list to the desired position, or double click to insert at the top of the body band. The newly added item is automatically selected and any properties are shown in the Properties List.
The DesignerCC.TableViewAddCheck event is a way to restrict which tables are shown in this section. Return True to hide the table from the list.
A views section will appear if the data source has any views. It works the same as the Tables section.
This section contains the objects that are on the report organized by band. Items in the Report Objects List show their UID and type. This section aids in selecting items on the report, which is especially helpful for small or lost items.
The Properties List
The Properties List should feel familiar to most RealStudio developers. It reflects the properties of the currently selected object. This allows the user to change those properties whether they be text, numbers, boolean values, and dropdown values. Property changes are undoable.
The Designer is where all of the action takes place. All reports have a minimum of five bands: Report Header, Page Header, Body, Page Footer, and Report Footer. Bands with no objects will be automatically hidden when the report is run, and will not take up space. Additional bands can be added by using the Band Editor to add break bands. Break bands are ways to group data from the data source.
Bands are logical entities that represent sections of the report. Report objects are added to bands. Bands have properties that can be accessed by selecting the band in the Object List or clicking in space not occupied by a report object. Use Band properties to hide an entire band, add band scripts, or stylize the band. To resize a band click and drag on the tan band edge. The band edge does not count as height in the report, it is simply a visual aid to "grab" the band in the designer.
Objects are used on bands to make up the report. Click an object to see it's properties in the Property List. Objects can be resized using the handles or by tweaking the properties in the Property List. This should all seem similar to how the Xojo IDE works.
To select multiple objects click and drag to create a selection rectangle, each item inside the selection rectangle will become selected. Alternatively, holding shift and clicking on multiple items will create a multiple item selection. Multiple item selections can be dragged and repositioned, but at this time properties they have in common can not be edited in a batch.