0% found this document useful (0 votes)
13 views

Geobank-Advanced-Reports-Training

The document is a product reference guide for Micromine Geobank's Advanced Reports Training version 24.0, detailing the functionalities and features of the report generation software. It covers report creation basics, designer elements, data binding, and various report controls, along with exercises for practical application. The guide serves as a comprehensive resource for users to effectively design and generate customized reports using the software.

Uploaded by

Eliezer Gouvêa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Geobank-Advanced-Reports-Training

The document is a product reference guide for Micromine Geobank's Advanced Reports Training version 24.0, detailing the functionalities and features of the report generation software. It covers report creation basics, designer elements, data binding, and various report controls, along with exercises for practical application. The guide serves as a comprehensive resource for users to effectively design and generate customized reports using the software.

Uploaded by

Eliezer Gouvêa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 95

Advanced Reports Training 24.

0
Product Reference Document
Micromine Geobank Version: 2024 (24.0)
Revision Date: 24 January 2024
Copyright 2024 Micromine Australia Pty Ltd. All rights reserved.
Information in this document is subject to change without notice. The software described in this doc-
ument is furnished under a license agreement or nondisclosure agreement. The software may be
used or copied only in accordance with the terms of those agreements. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or any means electronic
or mechanical, including photocopying and recording for any purpose other than the purchaser's
personal use without the written permission of Micromine Australia Pty Ltd.
Micromine Australia Pty Ltd
Level 6, 251 St Georges Terrace
Perth WA 6000
Phone +61 8 9423 9000
Contents
Introduction to Advanced Reports 1
Report Creation Basics 2
Designer Elements 8
Report Controls 9
Data Binding for Controls 11
Smart Tags 12
Saving Report Layouts 15
Exercise - Positioning Labels 17
Page Setup 17
Alignment and Layout of Controls 19
Exercise - Alignment 19
Exercise - Layout 21
Positioning Controls 22
Bookmarks and Document Map 25
Exercise - Using Styles 31
Appearance Properties 31
Visual Styles 33
Formatting Data 36
Passing Parameters to a Report 39
How to Create a Report with Parameters 40
Exercise - Create a Report with Parameters 40

CONTENTS │ Advanced Reports Training


Group and Sort Panel 45
Simple Grouping 45
Exercise - Grouping Data and Summary Statistics 45
Summary Statistics 48
Charts 51
General Features 52
Available 2D Chart Types 53
Available 3D Charts 55
Exercise - Charts 55
Simple XY Chart 56
Bar Chart 61
Table 69
Exercise - Table Reports 70
Create a Master-Detail Report 79
Exercise - Master Detail Reports 79
Sub Reports 85
Exercise - Sub Reports 85

4
CONTENTS │ Advanced Reports Training
6
Advanced Reports is both a report generator and a data browser. While the Advanced Reports is
primarily used to design and print graphic drillhole logs, it can also be used to generate other types
of scaled diagram, for example, locality maps. Advanced Reports interprets the instructions in a
design sheet and renders text and images accordingly, making it possible to create customised
reports in a wide variety of formats.
As a data browser, the true power of Advanced Reports is revealed. Simple navigation tools are
provided which allow the user to browse through data. For example, with drillhole data in a scaled
graphic format, the user could move from one hole to the next, and page up and down the length of
the hole.
As a report generator, the user has access to a highly configurable environment, ranging from
simple text summaries to highly complex composite graphical reports, and even the ability to
embed other reports.

From Layout to Document


The basic building blocks of an Advanced Report are Datasets and Templates. Datasets provide
the data for the report; Templates control the formatting and visual presentation of the data.
A report layout is comprised of bands and the controls they contain. Through the process of pub-
lishing, a report layout proceeds to a paginated report document ready for printing or exporting.
Report documents can be produced either from a specified dataset or datasets, or in an unbound
mode. To create a data-aware report, it is first necessary to specify the datasets. Then, various data
shaping operations and associate data-aware controls with data members.
A report layout (Template) is stored separately from the data.

Advanced Reports: Introduction 1


Report Creation Basics
Setting up a Report

1. Navigate to User Interface | Reporting. Right click Advanced Reporting | New |


Advanced Report.

2. Enter the report Name and Description. This uniquely identifies the Report by Name.

3. Set up the master Dataset, which contains the fields to be used in the report.

a. Firstly, click on Datasets, then click the plus icon to add a new dataset.

2 Advanced Reports: Introduction


a. Fill in the form to add the Name and Description of the table that will become the
dataset for the fields in the report. Also, fill in the SQL statement that will return the
desired fields from the dataset to be used in your report.

a. Click OK to complete the creation of the dataset.

4. Click on Layout, then click on the Launch Designer icon and wait until the Report
Designer is launched.

Advanced Reports: Introduction 3


The Report Designer is displayed. You are now ready to start designing your Advanced Report.
"Report Bands"

Report Bands
Every report in Advanced Reports is a banded report. This means that a typical report consists of a
number of bands, each of a different type. Every band may contain report controls.

What is a Band?
A Band represents a specific area in a report. Controls added to a Band can be given attributes that
relate to that Band.

Band Types
When a new blank report is created it looks similar to the image shown below. The report's area is
initially divided into four basic bands (Report Header, Page Header, Detail and Page Footer
bands).

A particular band type specifies how the controls located on this band are rendered, their rendering
order and how many times they are rendered (in the case of a data-bound report). In the Report
Designer, some of the band strips may display tips with information on how bands will be rendered.
For instance, for the Page Header and Page Footer bands, the "one band per page" tip is dis-
played.
When you are creating a particular report, you can add or remove any bands.
The table below lists the available band types:

4 Advanced Reports: Introduction


is located on the top of every page, above the Page Header Band or
Top Margin
Report Header Band.
is located at the beginning of a report. This band is intended to display
Report Header
some introductory information, e.g. a cover page for a report.
is located at the top of every page, below the Top Margin Band or
Page Header Report Header Band. This band is intended to display page numbers or
a table header, continued from the previous page.
is located at the beginning of every group or at the top of the page in
Group Header case it is split across pages. This band specifies grouping criteria and is
used to display information at the beginning of a group of records.
is located on a page between all other bands. This band displays a
Detail single record (from the bound dataset) at a time, or simply holds
unbound controls if there is no dataset assigned.
is located at the end of every group or at the bottom of the page if its
Group Footer group is split across pages. This band is primarily intended to show
summary information for a group.
is located at the end of a report. This band is intended to display some
Report Footer final information, e.g. report totals. Note: report totals can also be
shown in the Report Header.
is located at the bottom of every page, below the Report Footer Band
and above the Bottom Margin Band. This band is intended to display
Page Footer
page numbers or a table footer, which is continued on the following
page.
is located at the bottom margin of every page, below the Page Footer
Bottom Margin
Band.

The following image illustrates the relative positions of different band types, and how many times
they are rendered in a report.

Advanced Reports: Introduction 5


The Page Header, Page Footer, Top Margin and Bottom Margin bands are rendered in the
report on every page.
The Report Header and Report Footer bands are rendered in the report only once.
The Group Header and Group Footer bands are rendered for every group of records in a report.
The number of times the Detail band is rendered in a report depends upon the number of records
returned from the bound dataset - one band per record.

Editing Bands Method 1


Select a report, right-click in a margin of the report outside of the grids and select Properties. This
will take you to the Property Grid pane. Select the Miscellaneous tab (shown by a spanner) and
click the ellipsis button (...) for the Bands property.

This will invoke the Report Editor dialogue, which displays a hierarchical tree of report bands and
is intended for adding or removing bands, as well as editing their public properties.

6 Advanced Reports: Introduction


Editing Bands Method 2
Another way to invoke the Report Editor dialogue is to choose the Edit and Reorder Bands...
option. This is available in a few places: the report's main Smart Tag, the Smart Tag of any Band or
by right-clicking anywhere on the report (all shown in the image below).

Editing Bands Method 3


Right-click to add a new band of a particular type, using the report's context menu.

"Report Controls"

Advanced Reports: Introduction 7


Designer Elements
The Report Designer is used for creating and editing reports.

The following table lists the main interface elements of the Report Designer. Starting locations
have been given for each element but all except Design Panel and Status Bar can be moved
around, pinned, unpinned, floated or closed. If you lose a window, in the Ribbon under View, the
Windows button gives you a list of the controllable windows.

Element Description
Top Represents the main toolbar in the Designer that unites
Ribbon Control the Main, Formatting, Layout and Zoom toolbars, as well as
the Scripts tab button.
Centre This is the Designer's main element, as it represents a
surface where a report is being edited and previewed. The
Design Panel
Designer provides a multi-document interface and can have
as many Design Panels as required, each associated with a

8 Advanced Reports: Introduction


single report instance.
Left Allows you to add controls to a report by dragging onto a
Button Bar / Toolbox
report area.
Right upper Represents the visual tree of a report. It shows a
Report Explorer Panel report's structure in a tree form and makes navigation through
the report easy.
Shared with Report Explorer Shows the structure of a report's
Field List Panel
Datasets and is used to bind report controls to data.
Right lower Used to access and modify properties of a report
Property Grid Panel
and all its elements (bands and controls).
Bottom Allows you to quickly perform grouping and sorting
Group and Sort Panel operations throughout a report and visually represents the
report's grouping structure.
Shared with Group and Sort When errors are found in a
report's scripts (after clicking Validate in the Scripts tab), lists
Scripts Error Panel
these errors. Clicking an error opens the corresponding script
section in the Scripts tab.
Extreme bottom Provides tips and specific information about
Status Bar the Designer element being hovered by a cursor, or an action
being currently performed by an end-user.

Report Controls
A Report Control represents a specific report element (e.g. static or bound text, line, picture etc.)
that can be inserted into an Advanced Report. Report controls can reside either inside report bands
or inside other report controls that may serve as control containers (e.g. a panel). The appearance
and behaviour of a report control is defined by its type. These controls can be found in the Button
Bar on the left or the Tool Box panel.

Control Types
Below is a list of the basic report controls available in Advanced Reports:

Control Description

A Label control allows you to embed plain text, which can be populated using a
dataset, into your report.

A Check Box control displays Checked / Unchecked / Indeterminate state in a report.

A Rich Text control is used to display, enter and manipulate formatted text. You can
enter and format its text at design time, load it from an external file, or bind this control
to a data field.

Advanced Reports: Introduction 9


Control Description

A Picture Box controls the display of an image in a report. Use this control to insert
images of different types into your reports.

The Panel control is used to insert a Panel into a report that can be used to embed
other control objects for grouping purposes.

A "The Table control is used to display tabular information in a report."Table control


inserts a table. This control is invaluable if you need to show your data in a tabular
form.

A Character Comb control allows the insertion of boxed equal-spaced characters into
a report. These can be multi-line.

A Line control draws vertical, horizontal or diagonal lines in a report.

A Shape control embeds simple graphics into a report.

A Bar Code control allows you to insert many different barcode types into a report.

A Chart control lets you represent your data graphically, choosing from a large number
of 2D and 3D-looking chart types.
A Cross Tab control places a cross tabulation table (also called a pivot table)
which represents data from an underlying dataset in a cross-tabulated form to
create cross-tab reports.

A Gauge control represents data in Circular or Linear styles.

A Sparkline control allows you to insert different types of graph. Types include Line,
Area, Bar and Win-Loss.

A Sub Report control displays other reports in a report, such as company logo and title
block or a section of a report.

A PDF Content control enables the embedding of a PDF file in the report.

A PDF Signature control enables the embedding of a digital signature in the


report.

A Table of Contents control shows the Table of Contents with level options.

A Page Info control displays auxiliary information in a report. Use this control to display
page numbers, the current date or user information in your reports.

A Page Break control serves to mark the place where a report should start a new
page. The Page Break property can be used to break a page just before or after a par-
ticular band.

10 Advanced Reports: Introduction


Control Description

A Cross-Band Line draws a line that can cross through the bands of a report from the
Start Point in the Start Band to the End Point in the End Band.

A Cross-Band Box draws a rectangle that can cross through the bands of a report from
the Start Point in the Start Band to the End Point in the End Band.

"Positioning Controls"

Data Binding for Controls


This topic describes how report controls can be bound to data fields and explains how controls are
rendered on different report bands.
A control can be bound to data by setting the control's bindable properties to the fields available in
the report's Data Set. Also, a control can be bound to a calculated field.
The set of bindable properties differs, depending on the control's type. All bindable properties are
also shown in the (DataBindings) group in the Properties window. For example, the bindable prop-
erties of a Label control are shown in the following image:

Use the control's smart tag, and, in its actions list, locate the Data Bindings section, and invoke its
drop-down menu. Then, select the field in the table to which you want to bind.

You can bind an existing report control or add a new bound control by simply dragging the required
item from the Field List onto a report band or existing control.

Advanced Reports: Introduction 11


Smart Tags
The smart tag feature enables report controls and bands to display context-sensitive information
and commands. You can choose to display a smart tag item in both the smart tag panel or in the
shortcut menu associated with a report control or a band.
To invoke a smart tag, you need to select a report element and then click the smart tag icon ( -
which looks like a small right arrow) of the currently selected report element. Then, the smart tag
panel is invoked on the right-hand side of the smart tag icon, allowing you to adjust the selected
report element and immediately see the results.
The smart tag feature is available for the following report elements:

Advanced Report
You will find the smart tag for the report, which covers properties that are applied to the report as a
whole, in the top left of the report's workspace area.

The properties available are shown in the image below:

12 Advanced Reports: Introduction


Report Bands
A band's smart tag icon is located on the band strip right next to the caption. For instance, the smart
tag for the Report Header band is shown in the image below.

The following is the smart tag for the Group Header band.

The following is the smart tag for the Detail band.

Advanced Reports: Introduction 13


Smart Tag for Report Controls
A control's smart tag icon is located at the top right corner of the control. For instance, the smart tag
for the Label band is shown in the image below.

The following is the smart tag for the picture box.

The following is the smart tag for the check box.

14 Advanced Reports: Introduction


Saving Report Layouts
Once you have finished the design of your report and verified the results in Print Preview, you will
want to save your report.
This is done as follows:

1. Click on the cross on the top right-hand corner of the Report Designer to close this win-
dow.

Alternatively, you can click on the Exit button in the top left-hand corner.

You will be returned to the Layout screen of the Property Editor.

2. Click OK on the Property Editor to save the changes you have made to the Report.

If you click Cancel instead, you will be prompted to either:

l Save the changes and close the dialogue,

l Don't Save the changes and close the dialog, or

l Cancel to cancel the dialog.

Advanced Reports: Introduction 15


16
Page Setup

Page size
Select the desired page size from the drop-down menu.

Orientation
Select either Portrait or Landscape from the drop-down menu.

Margins
Click on Margins, and either select from the available margin options or choose Custom Margins
to enter your own settings.

Advanced Reports: Positioning Labels 17


Select Custom Margins to bring up the Page Setup form where you can enter all of the above
page setup options.

Page Setup Form


The Page Setup form can be accessed either through the Custom Margins option or by clicking
on the arrow on the bottom right-hand corner (see highlighted in red) of the Page Setup menu.

Fill in the fields to define all of your page setup options.

18 Advanced Reports: Positioning Labels


Alignment and Layout of Controls

Align Controls with Other Controls


Use the alignment tools on the ribbon to align multiple controls to each other.

The tools available for alignment of objects are:


l Align to Grid

l Align Lefts

l Align Centres

l Align Rights

l Align Tops

l Align Middles

l Align Bottoms

Exercise - Alignment
1. Create several labels on the same band.

2. Select the controls that you wish to align by either dragging a box around the relevant con-
trols. Multiple controls can also be selected by holding down the CRTL key and selecting
the controls one by one. Individual controls may be selected by simply clicking on them.

3. Choose the type of alignment.

The example below shows three labels aligned using the Align Left tool. Note that the small rect-
angles around the labels denote that the label is currently selected.

Advanced Reports: Positioning Labels 19


You can also align controls by dragging the control close to the desired position and using the pink
lines which appear to drop the label in alignment with an existing control.

Layout of Controls on a Page


Use the Layout tools to set the positioning of controls relative to the page.

The tools available for the layout of controls on the page are:
l Size to Grid

l Make Same Width

l Make Same Height

l Make Same Size

l Make Horizontal Spacing Equal

l Decrease Horizontal Spacing

l Remove Horizontal Spacing

l Make Vertical Spacing Equal

l Increase Vertical Spacing

l Decrease Vertical Spacing

l Remove Vertical Spacing

l Centre Horizontally

l Centre Vertically

20 Advanced Reports: Positioning Labels


l Bring to Front

l Send to Back

Exercise - Layout
1. Create several labels on the same band.

2. Select the labels to alter their layout by either dragging a box around the relevant labels or
by selecting individual labels by holding down the CTRL key while clicking on the labels.

3. Choose the type of layout function.

The example below shows three labels before and after having the layout set using the Make Hori-
zontal Spacing Equal tool. Note that the tool moves the labels such that the spacing between the
labels is the same. It does not affect the spacing between the labels and the page boundaries.

Advanced Reports: Positioning Labels 21


Positioning Controls
This topic describes how to construct professional looking reports by precisely aligning their ele-
ments to each other. For this, two Snapping functions are introduced: Snap to grid and Snap lines.

Snap to Grid
The report snap grid can be switched on or off in the Report Properties under the Miscellaneous
tab with the Draw the Grid property. This is where you can also set the Snap Grid Size, Snap
Grid Step Count and Snapping Mode.

This shows the report with Draw the Grid switched off.

The Paper Kind, Margins and Printer settings can be configured on the Page Settings tab.

22 Advanced Reports: Positioning Labels


With Draw the Grid switched back on and Snapping Mode set to Snap to Grid or Snap Lines
and Snap to Grid, you can precisely alignment elements. The grid size can also be changed by
adjusting the Snap Grid Size.
The Picture Box is 25mm by 25mm. This grid is size 25 with 4 squares by 4 squares making a
large square.

The Picture Box is still 25mm by 25mm. This grid is size 25 with 10 squares by 10 squares making
a large square.

The Picture Box is still 25mm by 25mm. This grid is size 50 with 5 squares by 5 squares making a
large square.

Snap Lines
When the Snapping Mode is set to a Snap Lines option, report elements are aligned using snap
lines. In the image below, the lowest element is being lowered but kept aligned to the other ele-
ments, as seen by the pink line. The pink line will disappear when the element is moved too far off
the virtual line.

Advanced Reports: Positioning Labels 23


Next

24 Advanced Reports: Positioning Labels


Bookmarks and Document Map
This topic describes how to create an interactive table of contents (i.e. a Document Map) for your
report. It presents the hierarchy of a report's bookmarks in a tree-like form, which helps to navigate
through the report in Print Preview.
You can specify a bookmark for any report control. When the report document is created, its Print
Preview displays a Document Map (or a table of contents) that reflects the hierarchy of all report
bookmarks.
After clicking a bookmark in the Document Map, the Print Preview navigates to the corresponding
element in the report document, which makes navigation through reports easier. The Document
Map is preserved when exporting a report to PDF.

Exercise - Adding Bookmarks to a Report

1. Create a report with grouping.

2. The report should be set up with a Group Header, three controls and a sort as shown in
the following images.

3. Select the label which is placed in the Group Header band (PROJECT), expand the
(DataBindings) property in the Property Grid panel and bind the label's Bookmark prop-

Advanced Reports: Positioning Labels 25


erty to the PROJECT data field.

4. Select the label in the Detail band and bind its Bookmark property to the SITE_ID data
field.

5. Specify the same label's Bookmark Parent property to make the report's bookmarks hier-
archical.

26 Advanced Reports: Positioning Labels


6. Select the report itself and assign text to its Bookmark property. This will determine the
caption of the root node in the Document Map.

Advanced Reports: Positioning Labels 27


7. Switch to the Print Preview tab and view the result as follows.

8. Click on the A017 bookmark and notice that you are taken to the corresponding entry in
the reports output.

In summary, a control's bookmark is defined by the following properties.


l The Bookmark property that specifies the text of a bookmark. To generate dynamic book-
marks for a control, you can bind this property to a required field from a report's Data Set.

l The Bookmark Parent property that allows you to create a hierarchical (tree-like) struc-
ture of bookmarks. By assigning a report control's name to this property, the specified con-
trol is shown as a parent node that can be collapsed or expanded in the Document Map's
tree.

l The Bookmark property that defines the title of the root bookmark in the Document Map's
tree. This bookmark is linked to the beginning of a report's first page. By default a report's
Name is used as the root bookmark's title.

Best practice is to rename labels which are used as bookmarks with meaningful names so that it is
easy to map the parent bookmarks.
The following is a complete list of controls for which the Bookmark property is available:
l Chart

l Check Box

l Bar Code

28 Advanced Reports: Positioning Labels


l Label

l Page Info

l Panel

l Picture Box

l Pivot Grid

l Rich Text

l Shape

l Table

l Table Cell

l Zip Code

Advanced Reports: Positioning Labels 29


30
Appearance Properties
Appearance properties are a special set of properties that allow you to customise the appear-
ance of a report and any of its elements. Every report element (i.e. control or band) and the
report itself, has a set of properties that specify its appearance.

1. Drag and drop a label onto detailBand1.

2. Click on the label and change the text to My Label.

3. Click on the label and examine the Appearance properties in the Property Grid. Try
changing the values in the appearance settings to see the effects on the output.

If a report element has a style assigned to it, the priority of the properties defined by
this style is determined by the Style Priority property. Enabling an option in Style Pri-
ority settings of the Property Grid means that the local Appearance settings are
used to determine how the output is displayed rather than any of the stored style

Advanced Reports: Using Styles 31


sheets.

32 Advanced Reports: Using Styles


Visual Styles
This topic describes the main concepts of using styles in Advanced Reports.

Styles and Style Overriding


In addition to the ability to specify Appearance property values for every control or band, it is
also possible to create a global style in a report.
To assign a particular style sheet to a control, set its Style property to one of the styles stored in
the report's style sheet collection.

A style that is assigned to a band applies to all of the controls that the band contains.
A style defines the same appearance properties that are defined by a control's (or band's)
Appearance properties. So, if a certain property is set both in the styles and in the control's own
appearance property, a priority is required to decide which of the properties to use. This is what
the Style Priority property is intended for.
By default, all the Style Priority's options (Use Background Colour, Use Border Colour,
etc.), which follow the structure of the style's and appearance properties, are set to Yes. This
means that if any style is assigned to a control via its Styles property, all its properties will have
a higher priority than the properties stored in the control or in its parent. If you want some of the
properties to be determined by a control (not by its style), set the corresponding property to No.

Exercise - Style Priority

1. Drag and drop a label onto detailBand1.

2. Click on the label and change the text to My Label.

3. In the Property Grid for the label, set the BackGround Colour to GreenYellow.

Advanced Reports: Using Styles 33


4. Under the Styles | Style property, select the value for the Background Colour to
OrangeRed.

5. Set the value of the Style Priority to Use Background Colour. This means that the local
style set in the Appearance properties has the higher priority and so the label will appear
with a OrangeRed background (see image on the following page).

6. Set the value of the Style Priority for BackGround Colour to No. This means that the
local style set in the Appearance properties has the lower priority and so the label will
appear with a GreenYellow background (see image on the following page).

The following image shows the results from altering the Style Priority property.

34 Advanced Reports: Using Styles


If some of a control's appearance properties values are changed, the corresponding property of
the Style Priority object is set to No for this control.
When a conditional formatting is involved, the appearance defined by it has a higher priority
than the properties described above.

Advanced Reports: Using Styles 35


Formatting Data
Formatting determines the presentation of a control's data. Mostly it is required to format date-time,
currency, percent and numerical data. It is possible to apply formatting only to values bound to a
control's properties and not to the controls' static content.
For example, it is common to format a Label's Text property. This is accomplished via the (Data
Bindings) Format String property. Click the ellipsis button (...) for this property to invoke the
Format String Editor, containing numerous built-in formatting presets, grouped by categories.

In this dialog, choose the required preset or specify a custom format, and then click OK.
In a similar way, for the Label control you can apply formatting to the Navigation URL (for
example, to add the https:// prefix to the link's contents), Tag and Bookmark properties. The set of
bindable properties varies with the control type.
Two types of formatting allow you to tailor your date formats:
l Special allows you to add a prefix and/or suffix to an item of data. This is useful for
labelling and adding units.

l Custom allows you to define any format using the standard format specifications syntax.

Formatting Summaries
Note that the Summary object has its own Format String property, as seen in the following image:

36 Advanced Reports: Using Styles


Mail-Merge Formatting
When creating a mail-merge report, you can define the format string for the embedded data
field, by separating it from the data field name with the ! symbol.

The output is as shown below:

Advanced Reports: Using Styles 37


38
A Parameterised report contains parameters, either user-defined or passed directly from a report's
dataset.
Report parameter values can be either hard-coded into a report or requested from users in Print
Preview.
Report parameters can be employed in numerous tasks. They may be used in a report's filter string
and a calculated field's or formatting rule's expression.

Advanced Reports: Report Parameters 39


How to Create a Report with Parameters
To simplify this example, you will pass a single integer parameter, and request it each time the
report is previewed. You can specify as many parameters as required in your report and they may
be of any type (e.g. date-time, boolean, string, double, and so on).

Exercise - Create a Report with Parameters


1. Create a new blank report or open an existing report.

2. Fill in the Name and Description for your report.

3. Click on Substitution Parameters and click the plus sign to add a substitution para-

meter. Fill in the tabs on the form as shown below:

40 Advanced Reports: Report Parameters


This form sets up the substitution parameter to read in a value from a drop-down list.

1. Click on Data Sets and click the plus sign to add the dataset for the report.

2. Fill in the form as shown below:

Advanced Reports: Report Parameters 41


This form returns the data from the gb_site table to the report where the input substitution
parameter is checked against the possible values for the project field.

The user may choose from a drop-down list of potential projects.

3. Create labels and perform the data binding for the Project and SITE_ID fields in the
report's Detail band.

4. Add a group header entry and the page numbers as shown below.

5. Save your work, close all open windows and return to the Advanced Reporting node.

View the Result

6. Execute the report. Enter the value for the Project (Exploration) in the Substitution
Parameters form and click OK.

7. Switch to the Preview tab to see the report output.

The report output consists of data which has a value for the PROJECT field which is
equal to the parameter value (Exploration in this case) inserted.

42 Advanced Reports: Report Parameters


Advanced Reports: Report Parameters 43
44
The Group and Sort panel makes it easier to apply grouping and sorting to your report. With this
panel you don't need to manually add Group Header and Footer bands, invoke their Group Fields
editor, create grouping fields and define their properties. The Group and Sort panel does this auto-
matically when you add a new grouping or sorting level.
The Group and Sort panel can be moved, resized or docked in the same manner as other win-
dows and usually has the following look:

After you've bound your report to data, you can use the Add a Group and Add a Sort buttons, to
choose new grouping and sorting criteria. You can adjust the precedence of these criteria, using the
Move Up and Move Down buttons.
You can also specify the sorting order for each level (ascending or descending) and choose
whether the corresponding Group Header and Footer bands should be displayed.

Simple Grouping
Grouping allows you to split data into groups based on data with identical values in one or more
fields.
The easiest way to group data is to use the Group and Sort panel. The following procedure shows
how to create groups of SITE_ID's based on records having the same value for the PROJECT field.
The PROJECT fields are then sorted in Descending alphabetic order.

Exercise - Grouping Data and Summary Stat-


istics

Advanced Reports: Grouping & Sorting 45


1. Open a new Advanced Report, set the Data Set, Select Layout and click on the Launch
Designer icon to open the Report Designer.

2. Drag a label onto the GroupHeader1 band and change its contents to "Project".

3. Drag the PROJECT field from the Field List and place it next to the Project Label.

4. Drag a label onto the detailBand1 band and change its contents to "Hole Number"

5. Drag the SITE_ID field from the Field List and place it next to the Hole Number Label.

The report layout should look like the following:

6. Click on the Report's smart tag and add Sites to the Data Member field.

7. In the Group and Sort panel, click Add a Group and select the PROJECT field from the
pop-up list.

46 Advanced Reports: Grouping & Sorting


8. Set the Sort Order to Descending using the drop-down list.

The first page of the report shows the data grouped by PROJECT and will look as follows:

Advanced Reports: Grouping & Sorting 47


Summary Statistics

Now you will add Hole Depths and calculate some summary statistics for each PROJECT.

1. Drag a label into the detailBand1 band and change its contents to "Depth".

2. Drag the END_DEPTH field from the Field List and place it next to the label on
detailBand1.

3. On the GroupFooter1 band, drag a label and change its contents to SUM.

4. Drag the END_DEPTH field from the Field List and select the field.

5. In the Label Property Grid, select Data | Summary and clip on the ellipsis (...) to open
the Summary Editor.

48 Advanced Reports: Grouping & Sorting


6. In the Summary Editor, select Sum from the Summary function drop-down list and
select an integer format from the Format string. Select Group from the Summary run-
ning radio buttons. Click OK.

7. On the GroupFooter1 band, drag a label and change its contents to AVERAGE.

8. Drag the END_DEPTH field from the Field List and select the field.

9. In the Label Property Grid, select Data | Summary and click on the ellipsis (...) to open
the Summary Editor.

10. In the Summary Editor, select Average from the Summary function drop-down list and
select an integer format from the Format string. Select Group from the Summary
Running radio buttons. Click OK.

The final report layout looks as follows:

Advanced Reports: Grouping & Sorting 49


11. Click on the Print Preview tab.

The first part of the report's output looks as follows:

50 Advanced Reports: Grouping & Sorting


The Chart Control:
l allows you to present complex data visually, as easy-to-understand graphs and diagrams

l includes a wide variety of chart types and analysis tools to meet all of your charting needs

l allows you to visualise almost any type of data, regardless of the data source type

l lets you easily visualise large amounts of data.

Advanced Reports: Charts 51


General Features
With smart, high-level automation features, the Chart Control makes both 2D and 3D charting easy:
l Support for dozens of 2D and 3D chart types, ranging from simple charts such as Bar,
Column and Pie to advanced charts such as Bubble and Gantt.

l Smart features and automation: smart series point labels, auto-adjustments to familiar
data sources (such as the Pivot Grid), automatic scale breaks, automatic axis scale and
scrolling range adjustments, as well as automatic date-time modes for the axis of argu-
ments.

l Display of multiple series of diverse types: compatibility of series of different types in the
same diagram, and support for an unlimited number of panes and secondary axes, and
scale breaks and logarithmic axis scales.

l Extended explanatory capabilities: support for a flexible legend, an unlimited number of


chart titles, text and image annotations, and multiple options for optimal layout adjust-
ment.

Below is an example using the Bar Chart.

52 Advanced Reports: Charts


Available 2D Chart Types
The following 2D chart types are available.

A-F L-R S-W

Area Line Scatter Line

Side By Side Bar


Area Stacked Line Stacked
Stacked

Side By Side Bar


Area Stacked 100% Line Stacked 100%
Stacked 100%

Area Step Stacked Nested Doughnut Side By Side Gantt

Area Step Stacked 100% Pie Side By Side Range Bar

Bar Point Spline

Bar Stacked Polar Area Spline Area

Bar Stacked 100% Polar Line Spline Area Stacked

Spline Area Stacked


Box Plot Polar Point
100%

Advanced Reports: Charts 53


A-F L-R S-W

Bubble Polar Range Area Step Area

Candle Stick Radar Area Step Line

Doughnut Radar Line Stock

Funnel Radar Point Swift Plot

Gantt Radar Range Area Swift Point

Range Area Waterfall

54 Advanced Reports: Charts


Available 3D Charts
The following 3D chart types are available.

A-D F-R S

Side By Side Bar 3D


Area 3D Funnel 3D
Stacked

Side By Side Bar 3D


Area 3D Stacked Line 3D
Stacked 100%

Area 3D Stacked 100% Line 3D Stacked Spline 3D

Bar 3D Line 3D Stacked 100% Spline Area 3D

Bar 3D Stacked Pie 3D Spline Area 3D Stacked

Spline Area 3D Stacked


Bar 3D Stacked 100% Range Area 3D
100%

Doughnut 3D Step Area 3D

Step Line 3D

Exercise - Charts

Advanced Reports: Charts 55


Simple XY Chart

Create a Simple XY Scattergram Chart


1. Create a new blank report or load an existing report.

If you are editing an existing chart, you can manually start the chart wizard by clicking the
smart tag and selecting Run Designer...

2. Select Advanced Report and fill in the Name and Description details for the chart.

3. Select Data Sets and view the SQL Script Properties that determines what data is avail-
able for the chart.

56 Advanced Reports: Charts


4. Select Layout and click on the Launch Designer icon to bring up the Report Designer.

5. In the Report Designer, drag and drop the Chart control from the Standard Controls
Toolbox tab onto the Detail band.

Advanced Reports: Charts 57


The Chart Designer appears.

Chart Designer
1. Select Point from the available chart types.

2. From the Options tab at the right, choose from the available Appearance options and
Palettes to determine the colour settings for the graph.

3. Create a data series by clicking the + sign at the right of the Series label.

58 Advanced Reports: Charts


4. Enter Routine vs. Lab Repeat in the Name field for the series at the right.

In the Data tab, from the Simple XY Chart datasource,

5. Drag the STORE_RESULT data member to the Argument cell.

6. Drag the QC_RESULT data member to the Value cell.

7. Click OK to place the chart in the Report Designer.

Advanced Reports: Charts 59


60 Advanced Reports: Charts
Bar Chart

Report Design
The first consideration when creating a report is visualising the output. This helps to determine the
elements that will be required. For example, in the case of displaying the depths of drillholes, the
objective is to create a chart for the drillholes in a particular Project.
l From a data point of view, this would require the Project, Site ID and End Depth inform-
ation.

l From a layout point of view, the chart wants to show the data for all drill holes combined,
not a graph for each drill hole. This can be achieved by placing the chart in a Group
Header.

Visually, a simple Bar Chart would suffice. Being the depths of drill holes though, it would look
slightly different from normal bar charts; starting the Y axis at the top of the window. This option can
be configured, as shown in "Insert a Simple Bar Chart".

Insert a Simple Bar Chart


1. Create a new blank report or load an existing report.

If you are editing an existing chart, you can manually start the Chart Designer by clicking
the smart tag to open Chart Tasks and select Run Designer.

2. Select Advanced Report and fill in the Name and Description details for the chart.

Advanced Reports: Charts 61


3. Select Data Sets and enter the SQL Script Properties that determines what is available
for the chart.

4. Select Layout and click on the Launch Designer icon to bring up the Report Designer
screen.

62 Advanced Reports: Charts


5. To insert Layout and click on the Launch Designer icon to bring up the Report
Designer screen.

6. In the Report Designer, drag and drop the Chart control from the Button Bar tab onto the
Detail band.

7. The Chart Designer appears.

Advanced Reports: Charts 63


Set up the Chart.

1. Select Bar from the available chart types.

2. The Chart Designer will display a bar chart. It is advisable to name your objects, so
change the Name to Depths. Also check Show in Legend as shown.

3. Click on the Data tab. Select your datasource if that has not auto-populated. Under
GBSite, drag SITE_ID onto the Argument box below and then drag END_DEPTH onto

64 Advanced Reports: Charts


the Value box.

Customise the Chart's Presentation


The Chart Designer provides many options to customise layout. Clicking on an item in the left-
hand panel, will have two effects: a red box will appear around the selected item in the middle panel
and the right-hand panel will show parameter settings relevant to the item.

1. For instance, to show the chart with the horizontal bars, rather than vertical, click on the
XY-Diagram item in the left-hand panel. In the right-hand panel, select the Rotated
check box. The chart is rotated by 90 degrees to make the bars horizontal. This does not
fit with the design plan, so uncheck it again to return to vertical.

Advanced Reports: Charts 65


2. Click on Title on the right, then set General - Text to an appropriate title for the chart.
Also check Alignment is Center and Visibility is Yes.

3. To change the chart colours, click on Chart at the top in the left-hand panel. On the right
under Options, explore Appearance and Palette. In the example, they have been left on
Default.

66 Advanced Reports: Charts


4. There are a large number of variables that can be changed to Visible with the check box
checked.

5. Add labels for the X and Y axis. To do this, first click on the Axes object, then click on the
X axis. Click on the Elements tab and fill in the properties as shown below:

6. Change the Primary axis using the drop-down list. Fill in the properties as shown below:

7. Close the Report Designer, then click OK on the Property Editor: Advanced Report to
save your changes.

NOTE: This is how to save Advanced Reports.

Advanced Reports: Charts 67


It is possible to easily customise many other properties to improve the readability and usefulness of
the chart. Try it and see!

Get the Result


The final result, with the chart embedded in the Detail Band, is shown below:

68 Advanced Reports: Charts


The Table control is used to display tabular information in a report.
To add a table control to a report, drag the Table object from the Standard Controls Tool Box tab
and drop it onto the report's area.
You can create two tables simultaneously, for example, one for showing column titles in the Page
Header, and the other for showing regular information in the Detail band.
To do this, select the Table item in the Toolbox. Then, in the Page Header area, click and hold
down the left mouse button while dragging the mouse cursor across the Detail band.

Table Structure
A Table contains one or more Table Row objects (accessed via the Rows property), and each row
contains one or more Table Cell objects (accessed via the Cells property). The structure of a table
is reflected in the Report Explorer.

You can manage a table's rows and their cells either using Report Explorer or using the context
menu that is shown by a right-click over the Table control.
l Example: To add a new row/column/cell, right-click a cell and, in the invoked context
menu, choose the appropriate option in the Insert sub-menu.

Advanced Reports: Table Reports 69


In most aspects, Table Cell is similar to the Label control; that is, it provides the same
options for data binding, text formatting, alignment and appearance.

The most important properties of a cell are available in its smart tag.

"Report Controls"

Exercise - Table Reports

Create a Table Report


1. Create a new Advanced Report or open an existing one.

70 Advanced Reports: Table Reports


2. Fill in the Name and Description.

3. Click the Data Sets option.

4. Click the plus icon to add a new Data Set.

5. Fill in the SQL Script Properties form as shown below, then click OK.

6. Select Layout and click on the Launch Designer icon to bring up the Report Designer
screen.

Advanced Reports: Table Reports 71


7. Add two Table controls to the PageHeader and Detail bands of the report.

To do this, open the Toolbox Standard Controls tab and click the Table item. Then, in
the GroupHeader band, click and hold down the left mouse button while dragging the
cursor across the detailBand1 band. You could achieve the same result by individually
setting up two tables, one in the Group Header1 band and another in detailBand1.

The result will look like the following:

Bind Table Columns to Fields in the Database


8. Drag and drop the PROJECT, SITE_ID and END_DEPTH fields from the Field List win-

72 Advanced Reports: Table Reports


dow into the table cells as shown below:

9. Double-click in tableCell1 and enter the appropriate column label, Project in this case.
Repeat for the remaining table's cells with the labels Hole Number and Hole Depth.

If you want to add a column to the table, right-click in the right-hand side table cell, select
Insert and then select Column to Right in the drop-down menu

Rearrange Table Cells using Report Explorer


The Report Explorer gives you a graphical view of the structure of the report, including the relative
positions of Report Bands and the Controls contained within them.

Advanced Reports: Table Reports 73


1. Use drag and drop to move tableCell3 above tableCell1 in tableRow1.

The result is shown below:

In the report, the table heading cells have also been automatically shifted as shown
below:

2. Move the cells back to their original position.

3. Change the cell size by clicking on a table boundary and dragging the cell to the desired
size. Using this method you can alter both the width and height properties of a cell. Resize

74 Advanced Reports: Table Reports


to the original.

To improve the appearance of the report, you can customise certain table parameters.

1. Select the cells for the tables data cells.

The properties box is located to the right of the Report Designer and will show the prop-
erties for the selected cell.

2. Define values for the Borders properties of both tables (set Borders All ).

3. Customise text appearance for each table header cell, using the formatting toolbar. Set
the font size to 14, select Bold text and change the colour of the text to blue

Now, the report layout has the following look.

Advanced Reports: Table Reports 75


4. View the final report by clicking on the Print Preview tab. It will look like the image below:

Repeat Every Page Property


This property specifies whether the group band should be shown only on the first page that the
group appears on or on every page that the group is printed on. Set this property to Yes if the group
band should be shown on every page; otherwise, it is set to the default value of No.

1. To set the property to Yes, click on the smart tag for GroupHeader1, select Edit and
reorder bands...

76 Advanced Reports: Table Reports


2. In the Report Editor, set the value of the Repeat Every Page property to Yes.

The following report output demonstrates the use of the Repeat Every Page property. Notice that
the header band, which is seen in the Blue text, is repeated on every page.

If the Repeat Every Page property is set to No, the following output is seen. Notice that the header
is only displayed on the first page.

Advanced Reports: Table Reports 77


78 Advanced Reports: Table Reports
A report is usually called Master-Detail if it is used to display data from a hierarchical data source.
There are two main approaches for creating a master-detail reports. The first approach is based
upon using the Detail Report band and is useful when a data source contains an ADO.NET relation
between master and detail instances within it. The second approach is to create two different report
classes and incorporate the detail report into the master report as a sub-report.
These reports are useful when you want to display more than one set of detail records and you can-
not achieve this using grouping.

Exercise - Master Detail Reports


1. Fill in the Name and Description fields for the Advanced Report properties.

2. Double-click on the Data Sets link in the Property Editor form.

3. Click the plus icon to add a new Data Set called Sites from the GB_SITE table.

4. Fill in the SQL Script Properties form as shown below, then click OK.

5. Click the plus icon to add a new Data Set called Projects from the Projects table.

Advanced Reports: Master-Detail Report 79


6. Fill in the SQL Script Properties form as shown below, then click OK.

7. Click the plus icon to add a new Data Set called Master from the Projects table.

8. Fill in the SQL Script Properties form as shown below, then click OK.

The Data Sets tab will look like the following:

9. Select Layout and click on the Launch Designer icon to bring up the Report Designer
screen.

80 Advanced Reports: Master-Detail Report


Note that the Field List shows the Master-Detail relationship where the Site table has
been put into the Projects table as an embedded detail table in Projects_Sites.

Advanced Reports: Master-Detail Report 81


For the following setup of the report layout, if the desired bands do not exist in your report,
add them by right clicking on an existing band and then choosing the desired type of band
from the drop-down menu. Only bands that do not already exist in the Report Designer
can be added to the report.

10. Add a ReportHeader band to the report.

11. Drag the Title field from the Master dataset in the Field List into the
ReportHeaderBand1 band and adjust the size of the box to allow space for the report
title.

12. Drag the PROJECT and DESCRIPTION fields from the Project dataset (Master) into
detailBand1. Add a Line object from the Standard Controls to improve the clarity of the
output.

13. Drag a label into GroupHeader1 and change the contents to "Depth of All Drillholes in
this Project". This becomes the Title for each individual detail report for each Project.

14. Right-click in detailBand1 and then select Insert Detail Report | "Projects_Sites".

82 Advanced Reports: Master-Detail Report


15. Drag the fields SITE_ID and Projects_Sites.END_DEPTH in to the Detail band.

16. Since the field length for the fields above is very small, set the properties for the Detail
band to repeat the data in three columns across the reports output page.

The final report layout is as follows:

17. Click on the Print Preview tab to see the output for this report.

The first page of the report looks like the following:

Advanced Reports: Master-Detail Report 83


84 Advanced Reports: Master-Detail Report
The Sub Report tool allows you to:
l Design elements that are common to all reports, such as headers and footers, and edit
them in one place.

l Display related data in a report without having to add extra datasets.

In the Designer, double-clicking on a subreport opens its associated report in a new Design Panel
tab.

Exercise - Sub Reports


1. Create a new Advanced Report or open an existing one.

2. Fill in the Name and Description fields for the Advanced Report properties.

3. Double-click on the Data Sets link in the Property Editor form.

4. Click the plus icon to add a new Data Set.

5. Fill in the SQL Script Properties form as shown below, then click OK.

Advanced Reports: Sub Reports 85


6. Select Layout and click on the Launch Designer icon to bring up the Report Designer
screen.

7. Add two Table controls to the GroupHeader and Detail bands of the report.

8. To do this, open the Toolbox Standard Controls tab and click the Table item. Then, in
the GroupHeader band, click and hold down the left mouse button while dragging the
cursor across detailBand1 . You could achieve the same result by individually setting up
two tables, one in Group Header1 band and another in detailBand1.

The result will look like the following:

9. Drag and drop the PROJECT, SITE_ID and END_DEPTH fields from the Field List win-
dow into the table cells as shown below:

86 Advanced Reports: Sub Reports


10. Double-click in tableCell1 and enter the appropriate column label, Project in this case.
Repeat for the remaining table's cells with the labels Hole Number and Hole Depth.
Format the labels as desired (e.g. 14 pt, bold, blue).

11. Right-click in GroupHeader1 and add a pageHeaderBand to the top of the report.

12. Drag a Sub Report control into pageHeader1, select the sub report control and set the
properties for the subreport you wish to insert into the report header. For the Report
Source URL, click the drop-down list and select 361: Header Subreport from the list of
available reports. Note that the numbers will differ in your drop-down list.

Advanced Reports: Sub Reports 87


13. Right-click in detailBand1 and add a pageFooterBand to the bottom of the report.

14. Similarly, drag a Sub Report control into pageFooter1, select the sub report control and
set the properties for the subreport you wish to insert into the report header. For the
Report Source URL, click the drop-down list and select the Footer Subreport from the
list of available reports.

The final report layout is as follows:

15. Click on the Print Preview tab to view the results. The first page is shown below. Note the
header and footers from the subreports you have created.

88 Advanced Reports: Sub Reports


Advanced Reports: Sub Reports 89

You might also like