Sie sind auf Seite 1von 207

Report Designer

Introduction


Report Designer

Advanced Course



April 2003
Report Designer Advance



Page
2
Contents Page
1 COURSE INTRODUCTION/OVERVIEW....................................................................................... 7
1.1 COURSE INTRODUCTION/OVERVIEW.............................................................................................. 7
1.2 COURSE SCENARIO ......................................................................................................................... 8
2 DATA SOURCE DESIGNER.............................................................................................................. 9
2.1 OBJECTIVES .................................................................................................................................... 9
2.2 INTRODUCTION ............................................................................................................................. 10
2.3 NAVIGATING AROUND DATA SOURCE DESIGNER ........................................................................ 11
2.4 EXERCISE 1 BUILDING A BALANCE SHEET LIBRARY................................................................. 18
2.5 EXERCISE 2 BUILDING A SALES INVOICE LISTING LIBRARY..................................................... 19
2.6 EXERCISE 3 BUILDING AN ORDER STATUS BY ITEM LIBRARY ................................................. 20
2.7 EXERCISE 4 - BUILDING AN ORDER STATUS BY CUSTOMER LIBRARY........................................ 21
3 REPORT DESIGNER......................................................................................................................... 22
3.1 OBJECTIVES .................................................................................................................................. 22
3.2 OVERVIEW OF THE REPORT DESIGN PROCESS.............................................................................. 23
3.3 UNDERSTANDING THE DESIGN ENVIRONMENT............................................................................ 25
3.4 CUSTOMIZING THE DESIGN ENVIRONMENT.................................................................................. 27
3.5 REPORT TEMPLATES..................................................................................................................... 30
3.6 THE DESIGN EDITOR..................................................................................................................... 32
3.7 REPORT DESIGNER LIBRARIES...................................................................................................... 36
3.8 HOW TO INCLUDE A LIBRARY FILE IN A REPORT DESIGN ............................................................ 37
3.9 ADDING DATA TO THE REPORT..................................................................................................... 38
3.10 THE EXPRESSION BUILDER........................................................................................................... 39
3.11 EXERCISE 5 CORRECTING THE ACCOUNT LISTING REPORT ...................................................... 45
3.12 THE LAYOUT PANE....................................................................................................................... 46
3.13 REPORT DESIGNER COMPONENT PROPERTIES.............................................................................. 47
3.14 EXERCISE 6 ADDING CONTENT TO A REPORT............................................................................ 50
4 WORKING WITH SECTIONS......................................................................................................... 51
4.1 OBJECTIVES .................................................................................................................................. 51
4.2 WHAT ARE SECTIONS? .................................................................................................................. 52
4.3 REPORT SECTIONS ........................................................................................................................ 52
4.4 GROUP SECTIONS.......................................................................................................................... 52
4.5 DYNAMIC GROUP BY.................................................................................................................... 55
4.6 CONDITIONAL SECTIONS .............................................................................................................. 57
4.7 OTHER COMPONENTS ................................................................................................................... 59
4.8 EXERCISE 7 CREATING A REPORT FROM SCRATCH PART 1. ..................................................... 62
4.9 EXERCISE 8 CREATING A REPORT FROM SCRATCH PART 2 ...................................................... 63
5 COMPILING REPORT DESIGNS................................................................................................... 64
5.1 OBJECTIVES .................................................................................................................................. 64
5.2 WHAT IS COMPILING? ................................................................................................................... 65
5.3 EXERCISE 9 COMPILING A REPORT DESIGN. ............................................................................. 66
6 TEST PRINTING................................................................................................................................ 67
6.1 OVERVIEW.................................................................................................................................... 67
6.2 HOW TO TEST PRINT..................................................................................................................... 67
7 REPORT DESIGNER QUERY EDITOR........................................................................................ 68
7.1 OBJECTIVES .................................................................................................................................. 68
7.2 INTRODUCTION TO QUERY EDITOR .............................................................................................. 69
7.3 NAVIGATING AROUND QUERY EDITOR ........................................................................................ 69
7.4 SELECTING TABLES TO RETRIEVE FROM...................................................................................... 69
7.5 SELECTING COLUMNS TO RETREIVE ............................................................................................ 70
7.6 APPLYING CONDITIONS TO THE SELECTION................................................................................. 70
7.7 SPECIFYING THE SORT ORDER...................................................................................................... 71
Report Designer Advance



Page
3
7.8 VIEWING THE QUERY.................................................................................................................... 71
7.9 CREATING JOINS ........................................................................................................................... 72
7.10 EXERCISE 10 - CREATE AN ACCOUNT LISTING USING QUERY EDITOR........................................ 74
7.11 EXERCISE 11 CONVERTING A QUERY EDITOR REPORT TO CDR.............................................. 97
8 ADDING PARAMETERS TO A REPORT..................................................................................... 98
8.1 OBJECTIVES .................................................................................................................................. 98
8.2 PARAMETERS: NAMES AND ALIASES........................................................................................... 99
8.3 DISPLAY OF PARAMETERS ..........................................................................................................103
8.4 EXERCISE 12 ADDING/CHANGING PARAMETERS ON A REPORT...............................................104
9 CONDITIONAL PROPERTIES .....................................................................................................106
9.1 OBJECTIVES ................................................................................................................................106
9.2 OVERVIEW..................................................................................................................................107
9.3 CONDITIONAL PROPERTIES.........................................................................................................107
9.4 CONDITIONAL PROPERTIES SUMMARY.......................................................................................108
9.5 USES OF CONDITIONAL CONTROLS ............................................................................................111
10 CARRY FORWARD AND BROUGHT FORWARD CONTROLS...........................................113
10.1 OBJECTIVES ................................................................................................................................113
10.2 OVERVIEW..................................................................................................................................114
10.3 SETTING UP TARGET CONTROL ..................................................................................................115
10.4 SETTING UP CARRY FORWARD CONTROL ..................................................................................116
10.5 SETTING UP THE BROUGHT FORWARD CONTROL......................................................................117
10.6 EXERCISE 15 - ADDING CARRIED/BOUGHT FORWARD CONTROLS............................................118
10.7 EXERCISE 16 CREATING A PAYMENT LISTING ........................................................................120
11 INTRODUCTION TO DOCUMENTS......................................................................................122
11.1 AMEND AN EXISTING DOCUMENT WHICH HAS BEEN CREATED USING A DSD LIBRARY11.1
INTRODUCTION..........................................................................................................................................122
11.1 11.1 INTRODUCTION..................................................................................................................123
11.2 FINANCIAL DOCUMENT LAYOUT ................................................................................................124
11.3 SAPDP3 REMITTANCE & CHEQUE .........................................................................................124
11.4 AMENDING A CHEQUE ...............................................................................................................130
11.5 EXERCISE 17 CREATING THE REMITTANCE AND CHEQUE DOCUMENT ..................................133
11.6 SAPDP1 REMITTANCE ONLY..................................................................................................136
11.7 EXERCISE 18 CREATING THE REMITTANCE DOCUMENT.........................................................142
11.8............................................................................................................................................................142
11.9 SALES INVOICE LAYOUT.............................................................................................................143
11.10 EXERCISE 19 CHANGING VALUE LABEL ON A INVOICE.....................................................152
11.11 EXERCISE 20 - CREATING THE SALES INVOICE FOR PKP WORLD WIDE..............................153
11.12 PURCHASE ORDER LAYOUT...................................................................................................156
11.13 EXERCISE 21 CREATING THE PURCHASE ORDER FOR PKP WORLD WIDE.........................164
11.14 DEBTOR STATEMENT LAYOUT ..............................................................................................166
11.15 EXECISE 22 CREATING A DEBTOR STATEMENT FOR PKP WORLD WIDE..........................170
11.16 DUNNING LETTER LAYOUT ...................................................................................................173
11.17 EXERCISE 23 CREATING A DUNNING LETTER FOR PKP WORLD WIDE.............................174
12 COMPONENT FUNCTIONALITY...........................................................................................176
12.1 OBJECTIVES ................................................................................................................................176
12.2 CALCULATING PERCENTAGES ....................................................................................................177
12.3 DISPLAYING NUMBERS AS WORDS.............................................................................................179
12.4 DISPLAY AMOUNT IN SENTENCES ..............................................................................................179
12.5 EXERCISE AMOUNT TO SENTENCE ..........................................................................................180
12.6 FORMATTING NUMBERS DECIMAL PLACES .............................................................................181
12.7 PAGE NUMBERING......................................................................................................................182
12.8 ANALYSIS COMPONENTS ............................................................................................................183
Report Designer Advance



Page
4
13 SUMMARIES BASED ON ANOTHER COLUMN
(OSS1CALCBREAKOUTTOTALCONTROL)......................................................................................189
13.1 OVERVIEW..................................................................................................................................189
13.2 SETTING UP THE CONTROLS .......................................................................................................190
13.3 HORIZONTAL REPEAT DIRECTION..............................................................................................191
13.4 VERTICAL REPEAT DIRECTION...................................................................................................191
14 CREATING A BALANCE SHEET TYPE REPORT..............................................................193
14.1 OVERVIEW..................................................................................................................................193
14.2 EXERCISE CREATING A BALANCE SHEET................................................................................194
15 HINTS & TIPS..............................................................................................................................197
15.1 PURPOSE .....................................................................................................................................197
15.2 PRINTING IN SUNSYSTEMS 5.......................................................................................................198
15.3 ACCOUNT LISTING THE NITTY GRITTY ....................................................................................199
15.4 LAST DAY OF THE MONTH..........................................................................................................205
15.5 PRINTING SELECTED NUMERIC DIGITS.......................................................................................206
15.6 ADDRESSES EXCLUDING BLANK LINES......................................................................................207


Report Designer Advance



Page
5

Course Objectives


Describe the scope of the SunSystems 5 Reporting module.

How to create and amend libraries using Data Source Designer

How to use the Query Editor with Report Designer

Create new reports using Report Designer

Amend example reports using Report Designer

Understand how to use the .XML file

Amend example documents using Report Designer

Understand Component functionality

How to create a simple text output file

How to use summary components

What you learn


It is highly recommended that you have attended the Report Designer Introduction Course as this course
has been designed at a higher level.

In this course you will learn how to use Report Designer by redesigning certain example reports and
documents that are issued with SunSystems.

We will look at some of the basic reports and documents that would be used in any simple implementation.
This may mean that you will either create the report from scratch, work from pre-defined templates that
have been designed specifically for this course or amend existing example reports and documents.

You will learn how to use the .XML file to help redesign documents and reports.




















Report Designer Advance



Page
6
Agenda

This is a 4-day course and the following is an indicative timetable.


Course agenda - Day 1

Course Introduction
Data Source Designer
Report Designer
Working with Sections


Course agenda Day 2

Compiling Reports
Test printing
Report Designer Query Editor
Adding Parameters



Course agenda Day 3

Carry Forward and Bought Forward Balances
Introduction to Documents


Course Agenda Day 4

Introduction to documents (continued)
Component functionality

Creating a Balance Sheet.
Tips and Hints

Report Designer Advance



Page
7

1 Course Introduction/Overview

Report Designer is an application that complements e.Report Designer Professional and is used by
business users to design and distribute a variety of reports. These reports require no programming. This
application supports both modifying complex reports and using sophisticated components from libraries.

A feature of the product is an Example folder that contains numerous report examples.

1.1 Course Introduction/Overview

This course has been designed for delegates that have attended the Introduction to Report Designer course.

New Terminology

Throughout this course you will be introduced to a number of new file types, these are a result of
integrating Actuates e.Reporting suite to SunSystems 5.

It is important that you have an understanding of each file type and what its specific use within the
reporting module is.

The following is a list of all the new file types which will be created somewhere along the report design
cycle.

*.ROD Report Object Design file contains information about the design and layout of a report.

*.ROL Report Object Library file contains generic information that can be incorporated into report
designs. These can be system or function specific library files.

*.ROV Report Object Parameter Value file contains information about the parameters to be used in the
execution of the report at runtime. One of these is created each time a report is run.

*.ROX Report Object Executable file contains information required for the execution of the report and is
used in conjunction with the *.rov file.

*.ROI Report Object Instance file. This is the report and is a snap shot in time of the data. This file acts
similarly to the *.PRN file in 4.2

*.SRD Data Source Design file. This is the design file that produces the report specific library
files.

Report Designer Advance



Page
8
1.2 Course Scenario

This course is based on a simple implementation at a small company called PKP Worldwide Ltd.

The company has just bought 10 licences for SunSystems Version 5 and will use the following modules.

Financials including Assets Register
Order Fulfilment including Purchasing and Sales.

They are not using Inventory control.

They have requested that the following Reports and Documents be created as part of the implementation:

Financial Reports Financial Documents
Account Listing
Journal Listing
Asset Register
Asset Record
Payment Listing
Bank Details Listing
Cheque
Remittance
Remittance & Cheque
Debtor Statement
Dunning Letter
Order Fulfilment Reports Order Fulfilment Documents
Sales Invoice listing
Purchase Order listing
Supplier Listing
Sales Order Status
Purchase Order Status

Sales Invoice
Purchase Order



As part of the course we will look at all these reports and make some form of change to them. This could
mean adding a simple company logo to designing the report from scratch.


























Report Designer Advance



Page
9
2 Data Source Designer

2.1 Objectives

By the end of this session, delegates will be able to:

Navigate around Data Source Designer

Select a relevant table/view and columns to build a library

Define the runtime parameters

Define a sort order

Select additional text labels to include in the report design

Create a Library from scratch

Save the library and the Data Source

Report Designer Advance



Page
10

2.2 Introduction

Data Source Designer is used to select the data that the report/document will be based on, define any
selection criteria for the data returned to conform to, and define the data sort order if required. It also
enables users to select additional items of standard text for the report/document.

The SunSystems database is a data repository in which data is held in a large and complex structure. No
single user is expected to know exactly what data is in each table, or the make-up of the various joins. To
assist with building reports, a number of data domains, based on business area, have been created. This
provides the ability to design reports with no database specific knowledge. The domains are known as the
reporting hierarchy.

From the reporting hierarchy you will need to select a domain. It is then possible to select columns from
the view that are used by, or are required on the report. Once the columns have been chosen any aggregate
controls required are defined.

The criteria (commonly known as the where clauses) are then set and the sort order specified.
This information is then saved as a data source (.srd) from which a report object library (.rol) is generated.
The library is used later when formatting the report. The data source is editable.

A report object library is then included into Report Designer in order to format the report.

The 4 elements of a report object library are;

1) DataStream component(s)

2) Data controls for each field returned in the query. These will include links to the Data Dictionary
where necessary, and will help with sizing of the data fields

3) Label controls for each field returned from the query. These will include links to the Data
Dictionary where necessary, and will help with translation

4) Label controls for any additional standard text selected for the report.

Report Designer Advance



Page
11
2.3 Navigating around Data Source Designer

Using the Main Menu options or the main Toolbar buttons you can navigate around Data Source Designer.

Menu Bar - The main menu contains most of the common Windows options. One of the new entries to
remember is Create Report Library. This invokes a standard Save As dialog for saving the datasource as
a library file with the .ROL extension. The File -> Save As option also invokes a standard Save As dialog,
but this defaults to the setting required to save a datasource (SRD) file.

Main Tool Bar Buttons

On the main Toolbar you have some of the standard buttons i.e. save, open, cut, paste etc. Buttons that
you will not have seen before are detailed below.

Create Report Library - Invokes the Save As dialog with the file extension set to .rol for the
saving of a report object library.

Up and Down - moves the selected row up or down in the hierarchy this function can only be
used on the Sort Order Tab


Hide Used Data Items - Use this button to hide the items on the data item list which have already
been added to the form. Alternatively, from the View menu select Data Items >> Hide Used Data
Items.

Show Selected Columns - Shows the selected columns in the Data Item List.

Show Current Node - Use this button to populate the data item list with items from only
the current node of the data item hierarchy. Alternatively, from the View menu select
Data Items >> Show Items in Current Node.
Show Current Sub-Tree - Use this button to populate the data item list with items from
the current node and all sub-nodes of the data item hierarchy. Alternatively, from the
View menu select Data Items >> Show Items in Current Sub-Tree.

Search Data Item List use this to search the data items list for specific data. When using this
button you will be presented with the Search Data Item List dialog box.






















Click on the Search
Items radio button.
Enter the text in the
Search Text box as the
search criteria.
Use the Find Data Items radio buttons
to choose how you want to locate data
items:
Select the Match Case check box if
you want only data items that match
the case of the specified Search Text.
Report Designer Advance



Page
12
You can also see the descriptions and labels of all data items currently listed in the Data Items Description
bar by clicking the Show All Items radio button. This allows you to see each data item in more detail and
you can manually scroll through the list to find the data items(s) you require.

Tip: Within the data item search results list, you can click on the column heading to re-order how the
results are displayed.

Adding Columns to the Data Source

To add a column to the data source, drag it from the Data Items list onto the Selected Columns tab. The
selected list of columns are compiled in alphabetical order.
























When you select a column an appropriate label for it is created automatically. The label is displayed on the
Labels tab. A double blue bar icon shows that the data item has been added more than once. If you
delete the automatically created label a single black bar against a data item shows that it has been
added to the Selected Columns tab only. You cannot add a data item to the Selected Columns tab more
than once.

Selection Criteria tab

This tab is used to set the selection criteria for inclusion in the Data Source. Once a domain has been
selected, and the columns chosen from that domain, the criteria can be set up.


Selected
Columns
Data Item
Hierarchy
Data Item
List
Properties
Bar
Selected
Data Items
Report Designer Advance



Page
13


For example: Select all accounts where the account code is between 10000 and 20000.
























To set the criteria:

Select the Selection Criteria tab to make it active.

Select the column, upon which to set criteria, from the Columns list and drag it to the Selection criteria tab.

This invokes the Condition Editor.
















Click here to
select the
required
Operator
The Value field(s) appears in
different ways depending on the
type of criteria to be set
If this check box is
ticked, this parameter is
requested at runtime.


Report Designer Advance



Page
14
Operator - From the drop down list select an operator to be used to restrict the data in the report. The
available operators depend on the type of criteria being set. Typical methods include:

Equals
Not Equal To
Greater Than
Less Than
Not Greater Than
Not Less Than
Range.
Value - The Value field(s) (unlabeled) appears in different ways depending on the type of criteria to be set.
For example, for date fields it appears as a drop down calendar.

Note: You can manually enter dates as well as selecting them from the drop-down calendar. The following
formats are acceptable: 030402, 3/4/02 or 3.4.02. When the focus is moved from the date field, the date
separator is automatically reformatted to that defined in the Business Unit.

Enter a value (or pair of values) upon which the operator is to act.

If an operator of 'includes' is used the value field can contain wildcards to allow for pattern matching.

Acceptable wildcards are dependant on the database being used.

Microsoft SQL Server accepts the following wildcards:
Wildcard Searches for Examples
'%' percentage Any string of zero or more
characters.
'Mc%' searches for all names that
begin with the letters 'Mc'
(McAlister, McAlpine).
'%ley' searches for all names that
end with 'ley' (Riley, Tisley).
'%od%' searches for all names that
include the letters 'od' (Hodges,
Bellwood).
Note: In SQL Server trailing
blanks are ignored.
'_' underscore

Any single character. '__ward' searches for all six letter
names ending with 'ward' (Haward,
Seward).
'[ ]' square brackets Any single character within the
specified range, for example '[a-f]',
or the specified set, for example
'[abcdef]'.
'[CK]ars[eo]n' searches for all
names that begin with C or K,
followed by ars, then e or o and
end with n (Carsen, Carson,
Karsen, Carson).
'[^]' square brackets and caret Any single character not within
the specified range, for example
'[^a-f]', or the specified set, for
example '[^abcdef]'.
''M[^a-n]%' searches for all names
that begin with the letter M and do
not have the letters a to n as a
second letter (Mortali, Murphy).
Report Designer Advance



Page
15

Oracle 8 accepts the following wildcards:
Wildcard Searches for Examples
'%' percentage Any string of zero or more
characters or spaces.
'Mc%' searches for all names that
begin with the letters 'Mc'
(McAlister, McAlpine).
'%ley' searches for all names that
end with 'ley' (Riley, Tisley).
'%od%' searches for all names that
include the letters 'od' (Hodges,
Bellwood).
Note: In Oracle trailing blanks are
not ignored.
'_' underscore

Any single character or space. '__ward' searches for all six letter
names ending with 'ward' (Haward,
Seward).

All
If any operator other than Equals or Not Equal To is selected and Runtime Entry is selected you may select
All. This signifies that you want to search for all possible values of that data item.

Blanks
This check box is enabled when the operator is Equals or Not Equal To. Blanks is a term which covers any
convention which indicates the absence of data.

Runtime Entry
This check box is only available when Edit Condition is invoked from Data Source Designer.
Select the Runtime Entry check box to create a run time parameter. If this check box is checked, this
parameter is requested at run time.

Note: If this check box is checked the Runtime Operator Override check box appears. Select this check box
to enable the run time operator to be overridden when the form is run.
When requested, the default is set to whatever value you entered in the value text box. If the All check box
was checked, this is the default setting at run time. However, these defaults can be changed at run time.

Set the conditions required and click OK to return to the main Data Source Designer window.

Repeat the above as many times as required until all conditions are set.

When building criteria, the default operator used to join each of the clauses is AND, with subsequent
clauses beneath being OR. This can be changed to OR by right clicking on the criteria line to invoke a
pop-up menu and clicking OR.

If setting criteria to be input at runtime, such conditions are stored as parameters. These are stored in the
data source and are requested each time the report is run. It is possible to create a parameter file to store
pre-determined parameter values and automatically populate a report with the stored values.

Edit Ad Hoc Condition

The Adhoc operator on the Edit Condition dialog is an advanced feature available for certain fields only. It
allows you to create and group together any number of conditions querying a single column of data.
Conditions are separated by a ';' semicolon in the Operator field of the Edit Condition dialog, which
signifies an OR operator.

The Edit Ad Hoc Condition dialog appears when you select Adhoc as the operator, and click on the Query
button on the Value field on the Edit Condition dialog.
All the operators excluding the Adhoc and Inlist can be selected in the Edit Ad Hoc Condition dialog.
Report Designer Advance



Page
16

When you have selected an operator, click the Query button on the Value field to display the Query
Selection dialog detailing all available selections. Select the field you require from those listed on the
Query Selection dialog. Alternatively you can type in a value.
Click OK to return to the Edit Condition dialog, where the query created in the Edit Ad Hoc Condition
dialog is displayed with the cursor positioned at the end of it.
If you require more than one query, click on the Query button on the Edit Condition dialog to redisplay the
Edit Ad Hoc Condition dialog. Select the operator and value you require and click OK.

Edit Nested Condition Dialog

Conditions embedded or nested within nodes on the Selection Criteria Tab can be edited using the Edit
Nested Condition dialog. To display this dialog right click on a criteria node and choose Edit from the
context menu.

The Edit Nested Condition dialog allows you to edit the name of the selected node and change the
conditions within it to be AND or OR. Click OK or Cancel when you have finished.

Note: Conditions of AND or OR cannot both be in a single set of nested conditions and the two must
alternate from one set of nested conditions to the next one down.

Sort Order Tab

This tab is used to display the sort order of the records on the report.
























To add a column to those being sorted on, simply drag it from the Columns list onto the Sort Order tab.

Select a column name on the Sort Order tab and click the up or down arrows to change the order.



Selected
columns
Click here to change
the sort method i.e.
ascending or
descending
Report Designer Advance



Page
17

Labels Tab

This tab is used to display the labels selected for inclusion in the data source. Appropriate labels are
automatically created when data items are added to the Selected Columns tab.
























Note: When an aggregate control is selected on the properties bar, for example a Total field for a list of
amounts, no label is created for the control. It is possible to create a label in Report Designer when you are
adding your aggregate control to the report, but it is far more useful to select a Data Dictionary label from
the Labels tab.

The reason for selecting a Data Dictionary label is that all of the labels on this tab have already been
translated into many languages. Therefore, you can run your report in all the languages your system is
serialized for without having to manually input the translation of a particular label.



Report Designer Advance



Page
18
2.4 Exercise 1 Building a Balance sheet library

In this exercise you will create a library that will allow you to build a balance sheet report. This library
will also be used to build a set of reports that will be linked using the Hyperlink property.

Building the Balance Sheet Library

1. Use the Account Listing CDR View, which is located in.

Reporting
Transactions
Financials
Actual
Account Listing CDR

2. Use the following Data items


View (L1) View (L2) Column

Header Account Type
Line Account Code
Accounting Period
Allocation Marker
Debit/Credit
Journal Line Number
Journal Number
Transaction Date
Transaction Ref
Transaction Amount

3. Once you have created the source file you will need to create two .SRD files and two Libraries (.ROL)
files

4. On the first .SRD file set a selection criteria on the period column for a range of periods to be entered
at runtime. You will also need to set a sort order on the Account Type column. Save it as Balance
Sheet.SRD in My Reports and then create the .ROL file with the same name.

5. On the second .SRD file set a selection criteria on the Period and Account Code columns to be entered
as ranges at runtime. Save it as Account Details.SRD My Reports and then create the .ROL file with
the same name.

Report Designer Advance



Page
19
2.5 Exercise 2 Building a Sales Invoice Listing Library

In this exercise you will create a library that will allow you to build a Sale Invoice Listing report.

Building the Sales Invoice Library

1. Use the Sales Invoice Summary domain which is located in:
Reporting
Transactions
Order Fulfillment
Sales
Invoice
Sales Invoice Summary

2. Use the following data items:

View (L1) View (L2) View (L3) Column
Sales Invoice Header

Customer Code
Entry Date
Item Description
Item Code
Unit of Sale
Sales Invoice Line Sales Invoice Transaction Ref
Line Number
Sales Invoice Line Value
Gross Unit Label Code Gross Value (Trans)
Invoice Address Address Line 1
Address Line 2
Address Line 3
Address Line 4
Postal Code
Telephone Number
Customer Name

3. On the selection criteria set the condition for Customer Code to be entered at runtime

4. Once the library has been created make sure that you save both the .SRD and .ROL in My
Reports folder.

Report Designer Advance



Page
20
2.6 Exercise 3 Building an Order Status by Item Library

Using what you have leant from the previous exercise to build a data source that will allow you to build an
Order Status by Item report.

5. Use the Sales Order Summary View which is located in:
Reporting
Transactions
Order Fulfillment
Sales
ALES ORDER SUMMARY

Use the following data items:

View (L1) (L2) Column
Sales Order
Header

Customer Code
Customer Name
Sales Order
Transaction Ref
Sales Order Line Demand Quantity
Invoice Status
Item Code
Line Number
Picking Status
Sales Order Line
Number
Status
Warehouse Code
Pick Line Pick Confirm
Quantity
Pick Quantity
Item Description
Item Code
Dispatch Stage Quantity Stage Quantity
Issue Issue Quantity

6. On the Selection Criteria tab make sure you have the following columns selected and that they are
all set as runtime Entries:

a. Picking Status
b. Customer Code
c. Item Code

7. You will also need to apply a sort order for the following columns:

a. Item Code
b. Sales Order Transaction Ref

1. Once the library has been created make sure that you save both the .SRD and .ROL in the default
folder, which should be My Reports, as you will be using this library in the Report Designer
session.

Report Designer Advance



Page
21
2.7 Exercise 4 - Building an Order Status by Customer Library

Using what you have leant from the previous exercise to build a data source that will allow you to build an
Order Status by Customer report.

8. Use the Sales Order Summary View which is located in:
Reporting
Transactions
Order Fulfillment
Sales
Sales Order Summary

Use the following data items:

View (L1) (L2) Column
Sales Order
Header

Customer Code
Customer Name
Sales Order Transaction Ref
Customer Description
Sales Order Line Demand Quantity
Invoice Status
Item Code
Line Number
Picking Status
Sales Order Line Number
Status
Warehouse Code
Pick Line Pick Confirm Quantity
Pick Quantity
Item Description
Item Code
Dispatch Stage Quantity Stage Quantity
Issue Issue Quantity

9. On the Selection Criteria tab make sure you have the following columns selected and that they are
all set as runtime Entries:

a. Picking Status
b. Customer Code
c. Item Code

10. You will also need to apply a sort order for the following columns:

a. Customer Code
b. Sales Order Transaction Ref

2. Once the library has been created make sure that you save both the .SRD and .ROL in the default
folder, which should be My Reports, as you will be using this library in the Report Designer
session.



Report Designer Advance



Page
22
3 Report Designer
3.1 Objectives

By the end of this session, delegates will be able to

Understand the Design Process

Customising the design Environment

Understand the Example Report Template

Understand the Design Editor

How to Include DSD Libraries

Add Data to a report

Understand the Layout Pane

Understand how Report Designer build Reports

Understand Components


































Report Designer Advance



Page
23
3.2 Overview of the Report Design Process

3.2.1 Design Process

All reports that are created in Report Designer use components without components it would be
impossible to build a report structure. These components will range from a simple text
component right through to a Page style component. You will notice that when you use a Report
template that has been designed by Systems Union all the major components have been
included in the design.

3.2.2 What are Components?

Components are the building blocks for report designing. There are different classes of components, each
with its own set of properties and behaviors. They can be simple, like DrawLine Control or complex like
GraphDetail. The OSSMain library contains the standard SunSystems components each being represented
by its class icon. These components classes have been derived from their superclass components in either
the SSSMain or AFC library files.

You assemble components in a report design to perform a wide variety of reporting tasks. The Design
Editors structure pane shows a diagram of the relationships among all the components in your report
design.

The following illustration shows the relationship among components in a typical grouped report. This
report has been grouped by Supplier code and lists the purchase orders that relate to it.

As each component that is used in the report design it is automatically subclassed. This
means that any property changes made by the user will only affect this component in the
current report and not be reflected in other reports that use the same component.

The following paragraph summarizes the task involved in creating a report design. These steps are part of
building a report using Report Designer.

You do not necessarily have to perform the steps in the order in which they are presented here. You can
perform most of these tasks through the visual interface provided by the design Editor, which is introduced
in the next session.


Start Finish





Setting Up the report

Start Report Designer. Start a new report using one of the templates or open an existing report
Design.

Specifying Data

Specify the connection to the source of information for the report design. You can use databases or flat
files as sources for your report. Setup the database connection (which should already exist in the standard
templates





Report Designer Advance



Page
24



Specifying a DataStream

Specify a connection to a specific view. This would be generated through Data Source Designer and is
contained in the Library. If DSD is not used then you will need to use a Datastream component from the
OSSMain Library.

Creating Sections

Use sections to create the logical structure that holds and organises the information in the report. For
example, a section can group rows by account code in a grouped report.

Creating Frames and controls

Use frames and controls to display data. For example, a frame might be used as a header section, which
contains text controls to display the customer address details.

Designing Page layouts

Use one of the pagelist components provided in the OSSPageList library, which will enable you to add the
required Page Style you want for your report. Page Styles contain margins, flows and other page layout
features. The Page List can also contain text and illustrations, such as company logos.

Setting Properties

Use the properties to customize the appearance and other characteristics of the report. For example, you
can set the font size in a text control or specify the type of data to be extracted by a component using the
value expression property.
Building and Running the Report

Generate code that implements your report design (.ROD) and generates the Basic Actuate Source (.BAS)
and then the Report Object Executable (.ROX). If the .ROX is completed then you will be presented with
the final output, which is the Report Object Instance (.ROI).

Viewing the Report

Look at the report. This can be done in either Report Manager or through the Report Designer Viewer.
After viewing you can go back to the design editor and fix errors or make improvements.

3.2.3 How Report Designer builds a Report

When you create and save a report design, you save the design in a Report Object Design (.ROD). You
then build, run and view the report to see current data in a finished version of the report. This diagram
below describes what happens internally as Report Designer takes the report from design stage to the
finished report.

The finished report, an .ROI file, contains data and can be viewed or printed.

The following diagram shows the report building process and the files that Report Designer creates after
each action.








Design Build .bas
code
Build .rox Run View
.ROD .BAS .ROX .ROI
Report Designer Advance



Page
25
3.3 Understanding the Design Environment

3.3.1 About the Tools

In Report Designer, you work with tools. Each tool is a window that you use to build a particular part of
the design. The main tools and the tasks you can accomplish with them are described in the following
table.

Tool

Task
Design Editor Specify the overall structure, location and appearance of a
report and its components
Query Editor Write or modify a query graphically to provide data for the
report
Expression Builder Point and click to construct mathematical and conditional
expressions
Report Viewer View the finished report after you run it to see the result of
your report design

3.3.2 About the Design Editor

The Design Editor is composed of two panes. The left pane shows the structure of the report design, and
the right pane shows the layout. You can drag the splitter bar to show or hide either pane.

3.3.2.1 Structure Pane

The structure pane shows the structure or organisation of the report and the relationships between report
components. Use the structure pane to work with the organisation of the report design. For example, you
can drag components from place to place to reuse them. Some components in the structure pane, such as
the database connection do not appear in the finished report.

When you first open a report in report designer you will see the unexpanded report structure, which
displays only the Content and the PageList components.


















One method for developing reports is to add the design components to the Structure pane, to determine
the component controls that will be used in the report. For example, the database connection to use,
whether sections and/or groups are used, or any conditional processing that may be required. Then, using
the Layout pane, add the data controls that will display the data required on the report. These controls are
the labels, data fields and frames.
The Content component
contains all the
information for the report
connection, headings,
groups and detail rows.
The PageList component
contains information
about the reports page
design.
Report Designer Advance



Page
26

3.3.2.2 Layout Pane

The layout pane shows the visual representation of the report design and allows you to work with the
appearance of components. Only components that are visible in the finished report are displayed in the
layout pane. Use this pane to work with the appearance or your report such as fonts, colours, test
alignment and images















3.3.3 About the Query Editor

Use the Query Editor to specify a query, which is a statement that specifies which data from the database
to include in the report. When you open the Query Editor, the Database Browser accompanies it, as shown
in the following illustration. The Query Editor, which is a graphical editor, is a central tool in the Report
Designer.

The Query Editor consists of an upper pane that displays tables and joins, and a lower pane. The lower
pane includes six pages, each of which is used for a particular task. To display a page, choose the
appropriate tab. By default, the Group By and Having tabs are hidden. To display the Group By and
Having tabs, choose View - Options - Query Editor and check Enable Group By and Having editors. To
change the display in the upper pane, choose a tab in the lower pane, and then choose the Move page up
button.

Page

Task
Upper pane Select tables, and specify the joins between the
tables.
Columns Select columns or define computed columns
Conditions Specify criteria for which rows the query retrieves
from the database.
Order By Specify how rows are sorted.
Group By Specify aggregate rows, which total data from a
group of rows.
Having Specify criteria for selecting specific aggregate
rows
SQL View the SQL SELECT statement

Report Designer Advance



Page
27
3.3.4 About the Expression Builder

The following illustration shows the Expression Builder, which you use to construct Actuate Basic value
expressions for properties. For example, the expression [Definition_Line_1] is an Actuate Basic expression
that displays the Address line 1 for each Address.














3.3.5 About the Viewer

The following illustration shows the ReportViewer. You use the Viewer to look at the results when you
run a report. The Viewer provides active viewing features, such as hyperlinks and saved searching.



















3.4 Customizing the Design Environment

Report Designer is highly customizable. You can change display characteristics, such as default fonts,
units of measurement, and tool placement. You can choose the configuration file that provides libraries and
data source connections for your report design. You also can customize search paths, component palettes,
and other aspects of the report design environment. To customize the environment, use both the Design
Editor and configuration files. The Report Designer configuration file does the following:

Specifies which component libraries are listed in the library organizer dialog box
Identifies a set of libraries that is included in every new report
Enable the user to change the default settings
Enables the user to specify the default font for labels and data
Enables the user to customize units of measurement


Report Designer Advance



Page
28
How to activate the configuration options dialog box

From the Main Menu select, View -> Options



The configuration options dialog box is made up of 8 tabs, each tab performs a different function

Design Editor Tab On this tab you can change the way the information is displayed on the layout and
structure panes. For example you have options to show empty slots, show group sections and display
sample data. The display sample data option allows the user to see the data component name if it left
unselected and will only show the Sample Data on all data components if it is selected. Other options on
this tab are to show slot and component names on the structure pane.

Units Tab This allows the user to choose the unit of measurement to work with when resizing and
positioning components. When specifying the unit of measurement, you can also specify some of the
display options. You can, for example, choose to add a unit suffix, such as cm, after a numeric value. You
can also specify the number of digits the application displays after the decimal point.

Font Tab The default font for labels and data is used only for controls that are subclassed directly from
the Actuate Foundation Classes. The default font is not used for controls that are subclassed from a user-
defined class.

Palettes - You can modify the component palettes that Actuate e.Report Designer supplies. You can make
the following changes to the Palette toolbar and to each component palette:

Add buttons
Change the location of buttons
Change the class that is associated with a button
Save a palette representation
Read a previously saved palette representation

You can, for example, combine the various palettes into one palette that contains only the Actuate
Foundation Classes you frequently use. Or you can replace some of the Actuate Foundation Classes with
custom classes you prefer to use.

At any time after you modify settings, you can restore the palettes and the classes associated with the
buttons to their default values

File Settings Tab On this tab you can specify to show the number of recently used files. The list
appears in the file menu as with any Office based product. In the configuration file option it should show
Design Editor Tab allows you to show or
hide slots, components and sample data.
Report Designer Advance



Page
29
the file path to the .XML file located in the SunSystems RDK folder. This enables report designer to show
the four SunSystems report templates.

Stored Procedure Data Source Builder Tab - This allows users to set up the settings required to use
stored procedures in report designing. A stored procedure is a set of predefined SQL statements that
perform a specific task. A stored procedure is stored in the database and it is referenced in the report
design by name.


Report Designer Advance



Page
30

3.5 Report Templates

Systems Union has supplied, so far, with SunSystems 5 four standard report templates. These should be
used as the basis from which all reports are developed. The four template files are:

RWF Report Template Landscape
RWF Report Template Portrait
RWF Simple Template Landscape
RWF Simple Template Portrait

Templates are used to speed up the report design process by providing all the standard elements required
for a report. Two of the four templates have a front page, detailing for example the name of the report, the
date the report was generated and the parameters that the user entered. The templates also include a
sequential section to add more than one report section in the report.

The two Report Template files contain all the standard elements described above and the only difference
is that one has landscape orientation and the other has portrait orientation.

The two Simple Template files contain all the standard elements except that they do not have the front
page element included. Again, one template for each page orientation.

Note: When using Report Designer and creating a new report design, the list of templates should appear
in the Create New Report dialog window. If they do not then part of the Reporting Suite configuration
was not performed.

Having opened a template, the first task to perform is to rename the report to a meaningful title and
then to save the report to a working directory.

What components are included in a RWF Templates?

The templates have the basic components a user will require to build a report from scratch. Systems
Union have built the templates to such an extent that the only thing the user really has to worry about is
what they want in the report and how they want to the report to look. If we examine the two different
types of reports available we can see the exact extent to which they have been built.























Report Designer Advance



Page
31
3.5.1 Report Template Layout

































The above diagram shows where in the template each component is found. You will see that at certain slots
have been filled with components and yet others have been left empty. The slots that have been left empty
are because these are optional. The user can add components depending on what they want to see in the
report design or how they might want the layout of the report to look.

1 - Root
2 - Sequential or parallel section Component
3 - DataBase Connection
4 - Report Body Page
5 - DataStream Connection from DSD Library
6 - First Group Section
7 Page/Flow shows the Report Page layout
Report FrontPage
not included in
the RWF Simple
Templates

Report Designer Advance



Page
32
3.6 The Design Editor

3.6.1 The Structure Pane

The Structure pane is the most important within the design editor. It is used to work with the organisation
of the report design. You can drag-and drop components into the structure pane to add them to the report,
or drag components from place to place within the structure pane to move, copy, or reuse them.

Some of the components in the structure pane do not appear in the finished report. For example, the report
uses the database connection component to get data, but the component itself is not visible in the pages of
the report. In contrast, the layout pane shows only components that are visible in the report

3.6.2 Understanding the Structure Pane

We will examine how the structure pane is made up within the templates provided and also look at
components, which are visible within the structure pane and those, which are not shown in the layout pane.

We will start with looking at a RWF Simple Template.

Note: As mentioned before the only difference between the RWF Simple templates and RWF Report
templates is that the RWF Report templates contain a front parameters page.

When you open this template it should look like the one below.

























Report Designer Advance



Page
33
Once you have the template open you will need to save it as another name. Save the template the My
Reports folder and call it Walkthrough.

Before we proceed I would like you to delete the component named Content-FirstGroupSection as we will
cover group section further on in the course.
Your template should like the one below.


























3.6.3 Important Template Components

Each of the four templates all have some important components already included in them. These are:

Root Component All report designs need a point where the compiling starts. This is the
highest level in the report design structure. It is at this level you would access to the
properties used to set the Report Title and the path for the Customrequester

Sequential or parallel section Component Determines the sequence of the creation of the
components inside the report

Connection Component Responsible for establishing the connection and authentication
with the database server.

Report Section Component Responsible for encapsulating the details of a particular report
format. You would have access to properties, which will enable you to set, page breaks and
page properties

Page/Flow Component Responsible for creating the actual page of the report. The flow
controls how the information be displayed. This is were you would set up components to
display company logos, page numbers and page flows (margins).

The first three components all have important roles as they allow the report to have a starting point when it
starts to compile the report, orders the way the report will be sequenced and also gives the template a
connection to the database.






Report Designer Advance



Page
34
Each component has a starting point for instance the Root controls all the components within the structure
pane as it is the place where the reports starts and the last component is the Page/Flow component. At the
same time the components between the Root and Page/Flow also have a starting point or highest points,
which controls every thing within them. You can easily identify what is the highest point by following the
hierarchy structure shown by the dotted line in the structure pane.
The following illustration shows which components are controlled by other components





















The components that control the way the data on the report is shown are:

3.6.4 Report Section

A report section initiates and maintains the data stream to retrieve information from a data source. A report
section also contains components to display the retrieved information. It is made up of 7 slots and each slot
performs a different action. The slots within the Report Section component are:

Slot Name Description

Connection This slot is not used
DataStream In this slot you would place the Datastream component from your Library
that has been created using Data Source Designer

Before Text or data that appears at the beginning of a report or section, such as
column headings. A component in the Before slot can also present
summary Data.

PageHeader Text or data that appears at the top of every page (expect the first page)
on which a component is printed or displayed. To display the
PageHeader component on the first page as well, set the reports
ShowHeaderOnFirst property to True.

The component in this slot is often a continuation version of the
component in the Before slot. For example, a page header could display
a customer name at the top of every page of a multi page customer
group.

Content Text or data that appears for every data row processed by the
component, such as a frame for every item in a customer order. Some
components can use more then one component in the content slot. For
Root This controls all components within the
Structure Pane.
Sequential Section This controls the sequence
of the report and also has the Connection to the
database within it.
Report Section This controls the layout of the
report and also has the Datastream Component
within.
Page/Flow This controls the layout of the page
for the data to be displayed on.
Report Designer Advance



Page
35
example, you can place several text and data controls in the content slot
of a frame.

PageFooter Text or data, such as page numbers, that appear at the bottom of every
page, except the last, on which a component is printed or displayed. To
display the PageFooter component on the last page as well, set the
reports ShowFooterOnLast property to true.

After Text or data that appears at the end of a report or section such as
summary data

3.6.5 Adding Data to a Report

Before you can add any data items to a section of the report you need to specify an area of the report you
want to the data in. In a report section you have the ability to add data items to five sections (which have
been mentioned above). Each section represents a part of the report and each section has its own
properties. Each section of a report is defined or made usable by inserting a Frame component.

3.6.5.1 What is a Frame component?

A frame is a rectangular container for controls. When you run the report and view or print it, what you see
is a collection of frames and controls. By placing a set of related controls in a frame, you can manipulate
the controls as a group. For example, you can move a frame from one place to another in a report design.

You can create frames that do not display data from the data stream. These frames contain only static
controls such as images and labels. However, most frames display data from the data rows provided by the
data stream. Each frame is associated with one type of data row.

Certain sections within the report section will allow you to set static size frames by this we mean the size
you set the frame will be the size it appears in the report. The following sections are static sections within
a report.

Before
Page Header
Page Footer
After

The Content section will then fill up any area that has not been taken up by the four static area sections.

3.6.5.2 Placing a frame into the Report Section

We will now place a frame into the following report sections: Page Header, Content and the After slots
1. Open the Library Browser
2. From the Library Browser open the OSSMain.ROL library
3. Find the frame OSS1FrameA4Landscape
4. Holding the Control key down on the keyboard and holding down the left mouse button
drag the frame and drop it into the Content slot in the structure pane.
5. You will be asked to rename the frame. Call it Content and click OK

Note: When naming components you cannot use spaces

6. Double click on the frame that you have just added to bring up the component properties
7. In the property Background colour change it from Red to Transparent
8. Resize the height of the frame to 2.5cm
9. Repeat steps 2 8 and place a frame in the PageHeader and After slots.
Report Designer Advance



Page
36
Your template should look like the illustration below.

























What you will notice is that when you have added the frames they will also appear in the layout pane.
When you place components within certain areas of the structure pane they will be shown in the layout
pane and vice versa.

Before you can proceed with the design of the report we will need to bring in a source of data, which will
enable you to add component that will show data and also static labels. This data source will be a library,
which has been designed in DSD. This library will also contain a Datastream component that allows the
report to extract the data more efficiently. It is this component which will make the library part of the
report design.

3.7 Report Designer Libraries

A component library is a read-only file that contains components that can be used in one or more report
designs. Component libraries provide one of the most useful ways to reuse components. System Union
has designed a number of components in Actuates Developer Workbench and then published these in
library files. These library files can then be included in report designs to allow users to use the
components.

Library file paths are specified by URLs in the configuration file. Libraries can be placed anywhere
provided the configuration file has been correctly set-up.

For SunSystems 5 there are essentially two different types of library files. The first are the library files
that have been derived from the Actuate Foundation Class library. These are the generic SunSystems files
that are available in Report Designer and are titled OSS. The second type of library file is the report
specific library file created using DSD. This file is specific to a report and contains the data stream
connection component and the controls for the data to be extracted for the report, (including label
controls).

A library is Subclassed from components contained in the afc.rol, which is provided by Actuate Developer
Workbench/Actuate Report Designer. The library, afc.rol, should never be changed by anyone.
OSSMain.rol is the standard tool-set library. This is an overrideable library, meaning that you can modify
and change its methods and properties. These changes affect the rest of the classes and libraries sub-
Frames in the
Layout Pane
Frames In the
Structure Pane
Report Designer Advance



Page
37
classed from OSSMain.rol. All the subclasses inherit the properties and methods of their superclass. If
you change the property settings of any subclass, the property that has been changed - will no longer
inherit the settings of the superclass (while all the unchanged properties will continue to inherit from the
superclass).

The way these libraries are named relates to whether you can override them or not. Library names
beginning with three letters SSS, suggest that they are standard libraries and they cannot be overridden,
e.g. SSSPageStyle.rol. Library names beginning with letters OSS, are overrideable, e.g.
OSSPageStyle.rol.

Remember do not use any library with names beginning with SSS.

3.8 How to Include a Library file in a Report Design

To include a library created in DSD, or any library created by a user, in a report design you will need to
access the Library Organizer within Report Designer.

The Library Organizer is accessed through the menu item Tools -> Library Organizer.

















Libraries Included in your report - Displays the libraries included in the current report. By default this
list should include all the standard SunSystems library files if you are using one of the existing template
files. This is because the components and controls that are in the template files are derived from these
libraries.

Available Libraries - Displays the libraries that are available to be included in the current report design.
This is where the library file created in the Data Source Designer should appear. If this window is blank
you will need to use the More button to select the DSD library file you want from the location that it
was saved to.

Once the file appears in the lower window, it can be added to the current report design by using the up
arrow to move the file into the upper window. Having moved the DSD library file up, close the dialog
window; this should cause the library file you have just added to open in Report Designer.

Having included this library within the current report design, you will be able to access it using the Library
Browser function. This is invoked from either the icon on the toolbar or via the View -> Library Browser
menu.

It is essential that the Datastream component from the DSD library be added to the report design, as this
will provide the necessary data retrieval information that the report requires.

The remaining data items that were selected in the DSD library will be found in the Frame component that
is visible in the Library view.

Libraries included in
the report
In this area you would see a
list of libraries that are
available to be included in a
report design
Click the more button to
find other libraries
Report Designer Advance



Page
38
By default the library organiser should point to the My Reports folder within the
SunSystems Directory.

Note: DSD library files are created as read-only. Therefore it is not possible to make any additions to
these files through Report Designer. The only way to modify the content is to re-open the file in DSD and
amend it there.

3.9 Adding Data to the report

Having included our library into our report we should have it available to us in our report. As shown in the
illustration below.
























The library that you have included into the report design only contains 3 types of components these are:

1. Datastream this component is made up of two components. These are:

a. Connection this is a direct connection to the view used in to build the library at the
Data Source Designer stage.
b. Datarow This will bring back information, which will populate all data components.

2. Data Components these components will be used to extract the data from the database to
populate the report

3. Label Components These components will only display static data and are linked to the data
dictionary.

To enable you to see the data in the report you will have to drag the entire Datastream component from the
library and drop it into the Datastream slot in the structure pane.







Included Library
Report Designer Advance



Page
39


The structure pane should look like the illustration below

















You can now start adding data to your report.

3.10 The Expression Builder

Boolean - An expression that yields one of two values, True or False. The False state is always zero and
the True state is always nonzero. The True state has two definitions, one bit-wise, the other logical. The
bit-wise definition is represented by the intrinsic constant True and always equals 1. The logical definition
is used in testing for conditional expressions in statements such as IF condition THEN... or WHILE
condition... WEND where any expression that evaluates to nonzero fulfills the condition.

You can associate components with several kinds of data values. To set the value a component displays,
use the components ValueExp property. This can be done in two ways:

1. You can set this property directly through the value expression in the Properties page of
Component Properties.
2. Is set automatically when using components from a Data Source Designer Library.

3.10.1 ValueExp has two purposes:

1. Determines how to set the value of the component from the data row by providing an expression
to do so.
2. Determines whether the component takes one or multiple rows, if ValueType is set to
AutoValueControl.

The rest of this section discusses value expressions in detail.

The following value expression computes the percentage of credit remaining to a customer:

100 - ([customer.balance] / [customer.limit] * 100)

To get help writing a value expression, choose the Builder button next to the ValueExp property. The
Expression Builder appears.
Included Datastream
Report Designer Advance



Page
40

3.10.2 Expression Builder

The following illustration shows the Expression Builder, which you use to construct Actuate Basic value
expressions for properties. For example, the expression [Detail_Account_Code] is an Actuate Basic
expression that displays the Account Code.















3.10.3 How to write an expression using the expression builder

To open the Expression Builder, you would do the following:

1. Select a control's ValueExp property in the Properties page of Component Properties, and click on
the assist button which will take you into the Expression Builder.

2. In the Expression Builder, build the expression as follows:
Type the expression.
Choose an element from below the Expression box. Choose Insert.
























Expression Box
Choose Insert to
add selection to
expression
Use buttons as
shortcuts to select
elements
Select expression
elements here
Report Designer Advance



Page
41
For example if you where to write an expression to sum a value then it would like the illustration below.


















When you have finished writing the expression you can do one of two things:

1. Click OK
2. Click Check This button allows you to check your expression for errors. If the Expression has
errors then the system will display a message like below









If this message appears you can usually find where the error is as the cursor will flash at the point where
the systems thinks the error has occurred.

Note: You should remember that even if the expression may be correct in the expression builder it might
not always work when the report is run. This should not occur often, as 99% of expression should always
work.

3.10.4 Computing Aggregates in the Value Expression

If you want to summarize data for a set of data rows, use one of the seven aggregate functions in a control's
value expression, or choose InsertTotal. These functions are also used in other kinds of expressions, such
as to specify computed columns in the Query Editor. The following table summarizes the aggregate
functions.

Aggregate function Description Examples
Max(<Value Exp>) Returns the highest value found for
Value Exp in the set of data rows.Max
ignores rows where the Value Exp is
Null.
Max([order.totalAmt])
Min(<Value Exp>) Returns the lowest value found for
Value Exp in the set of data rows.Min
ignores rows where the Value Exp is
Null.
Min([customer.limit] -
[customer.balance])
Sum(<Value Exp>) Returns the total of Value Exp for all
data rows.Sum ignores rows where the
Sum([items.quantity] *
[items.pricequote])Sum(1, 2,


Report Designer Advance



Page
42
Value Exp is Null. Null)=3
Ave(<Value Exp>) Returns the average value of Value Exp
over all data rows.Ave ignores rows
where the Value Exp is Null.
Ave([salesperson.ytd_sales])Ave(2
, 6, Null)=4
First(<Value Exp>) Returns the value of Value Exp in the
first data row.First returns Null if the
value of Value Exp in the first data row
is Null.
First([customer.name])
Last(<Value Exp>) Returns the value of Value Exp in the
last data row.Last returns Null if the
value of the Value Exp in the last data
row is Null.
Last([order.shipDate])
Count( ) Returns the number of data rows.Count
returns the number of rows, including
rows with columns with Null values in
them.
Count( )

The ValueExp parameter is any valid value expression. Each aggregate function has a default value. This
default value is used if the function processes no data rows. Max( ), Min( ), Ave( ), First( ), and Last( )
default to Null. Sum( ) and Count( ) default to zero.

3.10.5 Comparisons of using a look ahead aggregate.

You can compute two types of aggregates in a control's value expression. Running (or one-pass)
aggregates are computed while the report is being built. Lookahead (or two-pass) aggregates are computed
before the report is built.

A lookahead aggregate is useful when you want to know the total before you build the report. For example,
you might want to use the total to compute a value to be displayed for each row. The syntax for a
lookahead aggregate is as follows:

AggregateFunction(<ValueExp>)

[Where(<Condition>)]

{Group By(<GroupSectionKey>)|Overall}

Unlike lookahead aggregates, running aggregates are not available for use in row-by-row computations
because the aggregate values are not known until after all rows have been processed. Running aggregates
are most often used to compute values for controls in Before and After frames. The syntax for a running
aggregate is as follows:

AggregateFunction(<ValueExp>)

[Where(<Condition>)]

[Distinct(<Expression>)]

3.10.6 Specifying a lookahead aggregate

To specify a lookahead aggregate in a value expression, add the keywords Overall or Group By after the
aggregate function and its arguments, using one of the following formats:

<AggregateFunction>(<ValueExp>) Overall

<AggregateFunction>(<ValueExp>) Group By(<GroupSectionKey>)

Report Designer Advance



Page
43
When you use the Overall keyword, the lookahead aggregate is computed over all data rows in the data
stream.
When you use the Group By clause, the aggregate is computed over all data rows in a particular group
section. GroupSectionKey is a database column name which is the sort key (Key property setting) of a
group section in the report design. For example, the following expression, set in the ValueExp property,
shows the total orders for a customer:

Sum( [items.extension] ) Group By( [customers.ID] )

The following expression, set in the ValueExp property, calculates the percentage of an entire department's
salary represented by one employee's salary:

[emp.salary] / Sum( [emp.salary] ) Group By ( [emp.dept] ) * 100

3.10.7 Using a distinct Clause in the Value Expression

The Distinct clause in an Actuate e.Report Designer expression operates so that a row is included in the
aggregate only if the key value of that row differs from the key value of the previous row. The Distinct
clause might be used in running aggregates only, not in lookahead aggregates. The Distinct clause is
particularly useful for filtering out duplicate values in groups of rows.

To use Distinct to calculate the unique number of items in a column, be sure the data is already ordered by
the column that appears in the Distinct clause. The easiest way to sort is to place the column in the first
position of the OrderBy page of the Query Editor.

For example, suppose the report includes rows sorted by order number and item number. Many of the
OrdNum column values repeat row after row until the order number changes. For example, each order has
several values for ItemNum but only one associated value for the Balance.

To calculate the sum of all order balances, you need a way to exclude the duplicate values and include only
one order balance for each order ID. To accomplish this, use the Distinct clause as shown in the following
example:


Sum( [orders.Balance] ) Distinct( [orders.OrderNumber] )

The syntax of the Distinct clause is as follows:

<AggregateFunction>(<ValueExp>) Distinct(<Expression>)

The Expression parameter is a list of one or more expressions. Each expression can include any of the
following elements:

1. Reference to a data row column.

2. Lookahead aggregate.

Unlike the Group By clause, the expressions in the Distinct clause need not match any group section keys
in the report. Therefore, the Distinct clause is useful for filtering rows, or counting distinct items, in reports
that do not include group sections. The Distinct clause is also useful for reports that contain information
that lies outside of a group section.

3.10.8 How to order data for a distinct clause

The Distinct clause with an aggregate function in a ValueExp calculates correctly when the data on which
it is calculating is already in the correct order.
To work with the Distinct clause, the following process is recommended:

Report Designer Advance



Page
44
1. In the Query Editor, Order By page, place the key on which you wish to have the item sorted in
the first position. For example, if you are counting a distinct number of cities, place offices.city
first in the items on the Order By page.

2. Place other items below this one on the Order By page.

3. Continue to fill out the pages of the Query Editor.

4. Examine the SQL statement that is generated by the choices you have made in the pages of the
Query Editor.

The SQL statement now has, as its first item in the Order By clause, offices.city.

By the time the SQL statement has executed, the data items are correctly sorted and prepared for use by the
Distinct clause that then operates on the control.

3.10.9 Using the Where Clause in a Value Expression

The Where clause specifies that a row is included in the aggregate only if a specified condition is met. You
can use this clause in running aggregates and in lookahead aggregates. The syntax of the Where clause
follows:

<AggregateFunction>(<ValueExp>) Where(<Condition>)

The Condition parameter is a Boolean expression that indicates whether a given row is included in the
aggregate calculation. For example, the following expression shows the average dollar amount of sales
transactions. Payments and other types of transactions are not included in the calculation:

Ave( [trans.amount] ) Where( [trans.type] = "S" )

The Where clause is also useful for making sure null values are excluded from an aggregate, as shown in
the following example:

Ave( [trans.amount] ) Where( Not IsNull( [trans.amount] ) )

The Condition expression can include any valid element of a value expression, including other aggregate
functions. However, when you use the Where clause with a lookahead aggregate, the Condition parameter
cannot include another lookahead aggregate.

For example, the following running aggregate counts the number of orders of more than $10,000. The
Group By clause specifies a lookahead aggregate that is part of the Where clause of a running aggregate:

Count( ) Where( Sum( [items.extension] ) Group By( [orders.orderNo] ) > 10000 )

If the Count( ) function had been specified as a lookahead aggregate, this Where clause would not be valid.



Report Designer Advance



Page
45
3.11 Exercise 5 Correcting the Account Listing report

Objective

In this exercise you correct some value expression using the expression builder function. In the standard
Account Listing with Analysis for any Business Unit report the resulting totals are incorrect for profit and
loss accounts as they include the history transactions from previous years. The opening balance formulas
are correct and take account of the difference between profit and loss account and balance sheet account
codes. The totals need to incorporate this chance.

Solution.

Open the Accounting Listing exercise from the Start folder
Once open save the Exercise in the My Reports Folder
The Report layout will have three red components which are in the following sections

Group Before Brought Forward Balance
Group After Account Totals
Report After Report Totals

These components have a background colour of red.
You will need to change the expression in each of these components as follows.

Brought Forward Balance

The following expression should be inserted into the ValExp property.

Sum ( ( [Line_Base_Amount] ) * ( [Line_Accounting_Period] < Int( Mid$(
parmnAccounting_Period_From, 1,7 ) )) * ( [Line_Accounting_Period] > Int( Mid$(
parmnAccounting_Period_From, 1,4 ) ) * 1000 ) ) Group By( [Line_Account_Code] )

Account Total

The value expression in this component is Sum( [Line_Base_Amount] )Group By(
[Line_Account_Code] ) you will need to insert the following expression.

IIF([Header_Account_Type] = "3",(Sum(( [Line_Base_Amount] ) * ( [Line_Accounting_Period] > Int(
Mid$( parmnAccounting_Period_From, 1,4 ) ) * 1000 ) ) Group By( [Line_Account_Code])), (Sum(
[Line_Base_Amount] ) Group By( [Line_Account_Code])))

Report Total

The value expression in this component is Sum( [Line_Base_Amount] ) Overall you will need to insert
the following expression.

IIF([Header_Account_Type] = "3",(Sum(( [Line_Base_Amount] ) * ( [Line_Accounting_Period] > Int(
Mid$( parmnAccounting_Period_From, 1,4 ) ) * 1000 ) ) Overall), (Sum( [Line_Base_Amount] )
Overall))


Report Designer Advance



Page
46
3.12 The Layout Pane

This pane of the Design Editor window displays a visual representation of components showing their
appearance.

When you want to add components to a frame, you might prefer to place them in the layout pane rather
than the structure pane. The advantage of using the layout pane is that you can work with the location and
appearance of the components.

The following illustration shows the layout pane, which provides a way to work with the appearance of
components. Only those components that are visible in the finished report, such as frames and controls, are
displayed in the layout pane.












Use the layout pane to work with the appearance of the report. For example, you use the layout pane to
determine the colors, fonts, and alignment of text, data, and images.

Note: When designing the layout of the report it is best practice to use the Layout Pane

The complete design editor should now have components in both the Structure pane and the
Layout pane. As shown in the example below.




























Components in both the
PageHeader within the
layout pane and Structure
pane
Report Designer Advance



Page
47


When the report is run it should look like the one below.
























On the first page of the report you will see the components placed into the Pageheader Frame and below
that you would see the components placed in the content frame returning the data from the database. On
the last page of the report you will see the components placed in the After frame as these would be show
the report total.

3.13 Report Designer Component Properties

Properties are the characteristics of a component for which users can specify a default value. A property
controls the appearance or behaviour of an object, such as font size.

Report Designer provides a tool to assist users to view and manipulate the properties of a component in the
report design. The information in the Component Properties dialog changes whenever you select a
different component. The title bar shows the name of the component for which information is currently
displayed.


















Report Designer Advance



Page
48
The Component Properties dialog box is made up of two tabs, each of which is used for a different task.
Properties Tab: Used to view or set properties such as font size and background colour.
It also lets users access the Expression Builder.

Description Tab: Used to view or modify the component name or component type. You can also
view the name of the library that contains the component type, if any, and a
description of the component.

The Component Properties dialog can be activated in a number of ways:

Double click the component
Select the component, then click the Component Properties icon on the toolbar.
Right Click the component and select properties
Select the component and press F11
Select the component and using the main menu navigates to the Component properties option.

Users will use the Properties tab of the Component Properties editor to work with properties. Many of the
properties have default values listed in grey. These are inherited properties. If these are changed, users
can always go back to the inherited values by using the Default button. Users can set properties for a
single component or a group of components using this editor.

3.13.1 Commonly Used Properties
The list of properties for any one component/control can be extensive, depending upon the functionality of
the component or control used. The best source of information about the properties and therefore the
functionality of controls is the SunSystems ReportWriter help file.


3.13.2 Slots for Visual Components

Each slot is labelled with a name that indicates how the component dropped in that slot is used.
For example, the report section component has a before slot. When the user drops a frame in
that slot, it is printed or displayed at the beginning of the report.

The following describes the slots that can contain visual components.

Slot Name Description

Before Text or data that appears at the beginning of a report or section, such as
column headings. A component in the Before slot can also present
summary Data.

PageHeader Text or data that appears at the top of every page (expect the first page)
on which a component is printed or displayed. To display the
PageHeader component on the first page as well, set the reports
ShowHeaderOnFirst property to True.

The component in this slot is often a continuation version of the
component in the Before slot. For example, a page header could display
a customer name at the top of every page of a multi page customer
group.

Content Text or data that appears for every data row processed by the
component, such as a frame for every item in a customer order. Some
components can use more then one component in the content slot. For
example, you can place several text and data controls in the content slot
of a frame.

Report Designer Advance



Page
49

PageFooter
Text or data, such as page numbers, that appear at the bottom of every
page, except the last, on which a component is printed or displayed. To
display the PageFooter component on the last page as well, set the
reports ShowFooterOnLast property to true.

After Text or data that appears at the end of a report or section such as
summary data

There are other slots, such as PageList slots, that you will work with less often. A report section
component, for example has a PageList slot for the component that defines the set of page layouts in the
report.



Report Designer Advance



Page
50

3.14 Exercise 6 Adding content to a Report

Objective

In this exercise you are required to add a content section to the report design and then add the
corresponding data components within the content section to the labels within the Header Section.

Solution

Open the Supplier Exercise from the Start folder.
Save the Exercise in the My Reports folder
Once you have the exercise open the layout should be similar to the example below


























The exercise has a library attached (Supplier.rol).
You will need to add a frame to the content section.
Open the library from the Library Browser
From the library you want to use the _data controls
You will need to add the controls in the same format to those in the PageHeader Frame.

If the controls in your report have the word Label in them then you need to do the following.

Select View form the main menu
Select Options from the drop down menu.
On the first tab (Design Editor) make sure you have the Display Sample Data field selected.
Once you go back to the design you will notice that the label components now have the actual
label name showing.


Report Designer Advance



Page
51

4 Working with Sections

4.1 Objectives

In this session, delegates will be able to:

Understand how to use a Report Section

Understand how to use a Group Section

Understand how to use a Conditional Section

Create a report using all three Sections


Report Designer Advance



Page
52

4.2 What are sections?

A section is a component that determines the logical structure of the report. When you design a report,
sections act as containers for other components. When you run a report, sections receive the incoming data
rows and determine which components to instantiate to create the appropriate output.

Sections appear only as icons in the structure pane of the Design Editor. When you look at the report
design in the layout pane of the Design Editor or run the report and view it, you do not see the sections
themselves. The only visible sign of a sections existence is the effect it has on the organization of the
visual components, such as frames and controls.

The following summarizes the types of sections. Each type of section is described in more detail later in
the session.

Section Description Example of use

Report Section

Retrieves information from a data
source and contains components to
display that information

Design a report
Group Section Sorts data on a common field, such as
account code grouped by journal
number, and contains components to
display the data group.
Design a grouped report to print
journal numbers by account code
Conditional Sections Uses a conditional expression to
determine which two frames or sections
to display or print.
Print different frames for
different types of Journal types

4.3 Report Sections

A report section initiates and maintains the data stream to retrieve information from the data source. A
report section also contains components to display the retrieved information.

4.3.1 Placing a Report Section in a report design

To place a report section in a report design, drag-and-drop the report section icon from the OSSMain
Library to the Content, Then or Else slots of a conditional section, or the Content slot of a report
component.








4.4 Group Sections

A group section is a component that groups data on a common field and contains components to
display that data. For example, you can use a group section to group journal numbers by
account codes. If your report uses a query data stream, the group keys in the group sections
are also used as sort keys to sort the data.

For example, you can display account codes by journal number. The journal number group may
in turn be grouped by journal type or journal line number.
Use report
sections in these
slots
Report Designer Advance



Page
53
A grouped report presents data in an organised way that is more meaningful to the reader than
simply listing the data. A grouped report also provides a way to avoid repeating information.
For example, you need to print the account code and description only once, at the beginning of
the group of journal numbers, rather than including the account code with every journal number
line.

4.4.1 Creating group sections

Report Designer provides an easy way to add grouping levels to a report using Sorting and
Grouping. You can specify the group sections and group key for each group section. You can
move groups up and down in the priority list, and you can set options for each group, such as
grouping intervals.

The settings in the Sorting and Grouping dialog apply to the report section that contains the
selected component or slot. If no component or slot is selected, the settings apply to the top
level report section.

4.4.2 Adding and removing groups

There are two ways in which a user can add a group section to a report design. The first is by
using the drag-and-drop option the other is to use the Sort and Group function.

4.4.3 Using drag-and-drop

To use this option the user must have the OSSMain library open from which they can drag the
group section to the slot in which they want to see the group section.
















The above illustration shows the Group section from the OSSMain Library and points at the three slots that
the group section can be placed into. To use a group section in a report design you would drag-and-drop
the group section component into any one of the three slots.

After placing a group section component in a report design, you specify which data corresponds to that
section. Each group section corresponds to a sort key column, which is one of the columns returned in the
data stream.

To set the key for a group section, set the sections Key property to the appropriate column name. The
following illustration shows the dialog box that appears when you drag-and-drop a group section into a
report design.





OSSMain Library
Key property specifies the
sorted group of data that
corresponds to this group
section
Report Designer Advance



Page
54




Note: It is important that the Key property has been set as this tells the design what to set the group on.

If you place a group section inside another group section then you create a nested group structure that
specifies the sort order of the data. The innermost group section often contains a frame to print the most
detailed level of data. The following illustration shows a nested group section

























A group section provides slots in which you can place components for the section to use in various ways.

A group section can contain the following components:

Connection components in the Connection slot
Frames in the PageHeader, Before, Content, After or the PageFooter slot.
Report or Conditional in the Before, Content or the After slot
Another Group section in the Content slot.

The following table summarises how you use each slot in a group



Slot Contains Location Example of use
Connection Connection Does not appear in the
report
Separate database
connection for this
section
Before Frame Before the group Column headings such
as Account code and
description for account
code group
PageHeader Frame Top of each page as
group continues
Running header that
repeats the column
heading to keep reader
oriented
First Group
Section
Nested Group
Section
Report Designer Advance



Page
55
Content Frame or Section Between Before and
After. Content is where
the groups data prints
Account code number
and description
PageFooter Frame Bottom of each page of
the group.
Page numbers or text,
for example to be
continued.
After Frame After Group Total number of
accounts codes in the
group or Totals

4.4.4 What group sections do when you run a report

Remember that a group section corresponds to one column from the sort tab in your DataSource. Each
time the section receives a data row; the group section determines whether the value of the sort tab has
changed. The change in the value of the sort tab indicates the end of one group of data and the start of the
next group. The group section instantiates each component it contains in sequence. Some components,
such as the before frame, are instantiated only once each time then value of the sort tab changes.

4.5 Dynamic Group By

4.5.1 Overview

Sometimes a report section would like to be grouped differently, depending on a parameter. For example, a
report can be grouped by credit ranking or a report can be grouped by city depending on the parameter
entered.

Related

Properties:
KeyDynamicParameterName (OSS1SectionGroup)

ExtraOrderByClause (OSS1DataStreamSingleCompany/OSS1DataStreamNormal)

Apply To:

OSS1SectionGroup
OSS1DataStreamSingleCompany
OSS1DataStreamNormal







4.5.2 How to use Dynamic Group By

To activate dynamic group by:

1. Specifiy a parameter
Add a new parameter for the user to enter the column to be grouped on. The parameter itself can
have any name (restricted only by Actuate only) but it must be of type String. The parameter
does not need to belong to any group (although it can).

2. KeyDynamicParameterName property in OSS1SectionGroup
In the group section, set the KeyDynamicParameterName to be the parameter name specified in 18.2.1
to activate dynamic group by.

3. ExtraOrderByClause property in OSS1DataStreamNormal/OSS1DataStreamSingleCompany
Report Designer Advance



Page
56
In the datastream where the group section gets its data, set the DynamicOrderByClause to be the
parameter name specified above to sort the data for dynamic group by. If there are more than one
group in the report section then you must specified a position for the parameter (see notes below)

By doing the three steps above the group section will be grouped by the column specified in the parameter
above.

Note:

1. More than one group in the report section
If there is a dynamic group section in the report and more than one group sections (dynamic or not) in
the report section then the position of the order by column in the ExtraOrderByClause must be
specified. This is set in the ExtraOrderByClause property in the datastream component and is set to be:
<Parameter for the dynamic group>, Position

Heres an example of a report with multiple group sections and a dynamic group section in the report
sections content slot:











The outer group section is in position 1 and the inner group section is in position 2 and so on. The
datastream component would need to know which position the dynamic group is in. So in this
example the ExtraOrderByClause is set to be:
<Parameter for Dynamic Group 1>, 2

If the report has group sections like so:













Then the order by clause should be set to be:
<Parameter for Dynamic Group 1>, 2,<Parameter for Dynamic Group 2>,3

2. More than one dynamic group sections in the report section
If there are more than one dynamic group sections in the report section (i.e. one group is a sub group of
another) then you must specified a parameter for each group key (as in 18.2.1), and set the
KeyDynamicParameterName property for all the groups. For the ExtracOrderByClause property in the
datastream you must specified all the parameters in the property, separated by commas and with their
position values.

Normal
Group 1
Position 1
Position 2
Position 3
Dynamic
Group 1
Normal
Group 2
Dynamic
Group 2
Position 1
Position 2
Position 3
Normal
Group 1
Dynamic
Group 1
Report Designer Advance



Page
57
4.6 Conditional Sections

A conditional section is a component that uses a conditional expression to determine which of the two
frames or sections to display or print. Use a conditional section to accomplish the following tasks:

The user who runs the report enters parameters to choose which content to print. For example in
the example remittance a conditional section is used to print either the base amount or transaction
amount.
The User chooses between frames depending on the data in the data row

4.6.1 Placing a Conditional Section in a report

To place a conditional section in a report design, drag and drop the conditional section from the OSS Main
Library into an Empty Before, Content or After slot.

The following illustration shows a conditional section placed in the content slot of the group section.




















4.6.2 Specifying the condition for a Conditional Section

After placing a conditional section component in the report design, you specify it conditional expression.
When a user runs the report, Report Designer evaluates this expression to determine what to print for that
section. Depending on where you placed the conditional section, the expression can refer to the parameters
or the data row column.
You can use column names in the conditional expression only if the conditional section is in the Content
slot of a report section or group section.

To set the conditional expression, set the section's IfExp property to a Boolean expression that returns True
or False. If the expression in IfExp is True, the component in the Then slot is used. If the expression is
False, the component in the Else slot is used.

The following illustration shows a conditional section where the condition has been set to only show
values less than 10000.






Conditional Section
Group Section
Report Section
Conditional Section
The Then Slot has been used
as the report only needs to
show Values less than 10000
Report Designer Advance



Page
58




























4.6.3 What Conditional Sections do when you run a report

Each time the section's content is to be printed, Actuate e.Report Designer evaluates the conditional
expression and chooses the appropriate component to generate the output. The following illustration shows
how an Employees group section could be implemented using a conditional section to print alternative
frames for salaried and commission employees. The data rows contain information about employees and
departments, sorted by employee name within each department.


The Else Slot is left empty as we
do not want to see values greater
than 10000
Note: The Conditional IfExp
property has been set to only show
values less than 10000
Report Designer Advance



Page
59

4.7 Other Components

Components have different characteristics depending on what the component is used for or what
it was designed for. There are 5 main areas a component can fall into these are

4.7.1 Structure Components
These components control how the report is organized. They will include components such as

OSS1SectionReport

This is a standard report section component. It contains the default slots required to build a new section in
a report, or create a new section within an existing section. The SectionReport component can be added to
any of the following slots, if they are empty. Usually this component is used in the Content slot.

Available slots are:
Before - data that appears at the beginning of a report or section
Content - data that appears for every row
After - data that appears at the end of a report or section.

A SectionReport component is made up of eight other components.
Connection
DataStream
Before
PageHeader: data that appears at the top of every page (except the first page)
Content
PageFooter: data that appears at the bottom of every page (except the last page)
After
Subpage

Once the component is dropped in a slot, the name of that component will be displayed in that slot. Users
can now change the name of the component and view its properties.

OSS1SectionGroup

This is a component that groups the data. You could, for instance, group your orders by their Supplier
Code or even Analysis Dimensions.

The SectionGroup component can be added to any of the following slots, if they are empty. Usually this
component is used in the Content slot.

Available slots are:
Before - data that appears at the beginning of a report or section
Content - data that appears for every row
After - data that appears at the end of a report or section.

There is one very important property that must be set for the SectionGroup component and that
is the Key for the group. Each group section will correspond to a sort key that has been set.
Whenever the section receives data, the SectionGroup determines whether the value of the sort
key has changed. Changes in the value of the sort key means that, one group of data has ended
and another group of data has started.

To group data by interval rather than on changes of a single data value, you use GroupInterval and
GroupOn properties. For example, for grouping the Sales Invoices on a monthly basis, set GroupInterval
to 1 and GroupOn to GroupOnMonth.


Report Designer Advance



Page
60

OSS1SectionConditional

This is a standard conditional component used when there is condition that needs assessing and
where the result could cause different actions/information to be presented on the report.

OSS1Frame.

A frame is a container for other controls such as labels, text, graphs, data images, etc.
They are the main building block within the report as all the data and label controls must be contained in a
Frame. These are sub-classed as they are used

There are a number of different standard frame components in the OSSMain library, mainly differentiating
the page orientations that can be used for a report.

4.7.2 Data Components
These components control what data is available to a report. These will include components such as:

OSS1DataStream.

DataStream components are components that determine the type of connection to the SunSystems 5
database that is used, and the SQL select statement that is run against the target database to return the data
requested. These components are usually created by the Data Source Designer and will be contained in the
report specific library file that is created from DSD. All a user has to do is to drag and drop this
component on to the empty DataStream slot under a SectionReport component.

Each DataStream component contains a Connection component and a DataRow component. The
Connection component determines the data source to use and is automatically set by DSD. The DataRow
component contains the SQL select statement to be run against the specified database.

4.7.3 Control Components
These are the data components and determine how and what data appears on the report. These will include
components such as:

OSS1Label.

There are several standard label controls available in the OSSMain library. These are text controls.

OSS1DataText..

There are several standard data text controls in the OSSMain library. These are data
controls.


OSS1DataDateTimeControl

This is a date / time control.


OSS1CalcCurrency or OSS1Analysis.

These are Calculation controls. There are several standard calculation controls in the OSS1Main library.
They are used either to display currency values or analysis values.

Floating Point Control

There are several types of floating point controls within the OSS1Main library. They are used to display
numeric data.




Report Designer Advance



Page
61

4.7.4 Drawing/Graphics Components
Drawing/Graphic component controls what lines can be drawn on, and what images can be included in a
report. These includes components such as

OSS1DrawLineControl

This component is used to draw lines on the report.

OSS1Graph

There are three types of graph controls in OSS1Main library. These are used to display information in the
form of graphs.

OSS1Image.

There are two image controls within the OSS1Main library. These are used to display images or logos in
reports.

4.7.5 Page Components
Page components are used to determine the style of the pages the report is printed on. These components
allow users to enter page numbers, flow and page lists.

OSS1PageList


OSS1PageSytle

In the OSS libraries you will find more then one of each component.




Report Designer Advance



Page
62
4.8 Exercise 7 Creating a Report from Scratch Part 1.

Objective

In this exercise you will create a report from scratch using all the section covered in the previous session.

What you learn

In this exercise you will learn where each section can be used within the report design.

Open the report design Section Exercise from the Start folder within the My reports folder
Save the report design in the My Reports folder
You will need to include the library Section.ROL that can be found in the Library_SRD folder.
You will need to include a Report Section which will give you a starting point.
You will need to include a Group Section
Add Frames in the Report Section - PageHeader & After, Group Section Before, Content and
After.
You will need to create a Listing Report which should contain the following Columns:

Account Code
Period
Transaction Date
Journal Number
Journal Line Number
Transaction Ref
Transaction Amount

You will need to apply a Conditional Section which will not show accounts that are >64004 and
<64007.

Once you have completed this exercise the report layout should like the example below.


























Report Designer Advance



Page
63
4.9 Exercise 8 Creating a Report from Scratch Part 2

In this exercise you will need to add some further sections as you should have noticed from the previous
exercise that although the details for the accounts were getting hidden it was still showing totals for the
accounts.

You will need to place two more conditionals within the structure pane.

Open the report design Section Exercise Pt2 from the Start folder within the My reports folder
Save the report design in the My Reports folder
You will need to add another Conditional Section
You will need to figure out where the Conditional section needs to go.

The final report layout should like the example below
































Report Designer Advance



Page
64
5 Compiling Report Designs
5.1 Objectives

By the end of this session, delegates will be able to:

Understand what compiling is

Identify where compiling should be used

Understand what files get created when a compile is performed.




Report Designer Advance



Page
65
5.2 What is compiling?

To compile a report you would use a hidden function (Shift > F8)

When you build a report, Report Designer writes Actuate Basic code and saves it in a Basic source (.BAS)
file. The Basic source file contains Actuate Basic code, including class declaration, which corresponds to
the information in the report design (.ROD) file.

From the Basic source file, Report Designer builds an executable file (.ROX). It is this file that you run to
create a finished report for viewing or printing.

It is recommended that you compile not run SunSystems reports and documents when amendments have
been made to them. This allows the design to run against the database and report errors if any.

Looking at the generated code is a good way to learn Actuate Basic and understand how Actuate creates
reports. You cannot, however, compile the code in an environment other than Actuate.

The main difference between compiling and running are:

Running When you run a report it runs against the database and will return the details required in the
report design. It will create the report executable (.ROX) and the report instance (.ROI) files.

Compiling When you compile a report it stills runs against the database but does not return a final
output. It will only create a report executable (.ROX) file.

What you do when you have compiled a report design

When the report design has been compiled Report Designer displays the message Compile Finished
in the bottom left hand corner of the screen.
If there are errors during the compile the output dialog box will show the error messages.
The report executable (.ROX) file will be created automatically if no errors where found.
This report executable (.ROX) will be saved by default in the folder where the Report Design (.ROD)
is saved.
Wherever the report executable (.ROX) has been saved it will need to be moved to the Example
Reports folder within the SunSystems directory.
This will then allow the user to use the new version of the amended design when they run the report or
document from within Navigation Manager.

The above only relates to reports and documents that are provided by Systems Union in the standard
release. They do not apply to reports the user may have created from scratch.

Note: It is imperative that you copy or move the report executable (.ROX) into the Example Reports folder
within the SunSystems Directory. If you take a copy of a document and rename it then you will need to
make sure that the report executable (.ROX) has been specified in Document Format Setup (DFS) within
Navigation Manager



Report Designer Advance



Page
66

5.3 Exercise 9 Compiling a Report Design.

In this exercise you will compile a report within Report Designer and move the new ROX to the Example
Folder within the SunSystems directory. You will then test the new version of the report through the PYD
function within SunSystems.

Solution

1. Open the report design SAPDP3.rod from the Start folder. Save it in My Reports as the same name.
2. You will notice that this is the Remittance & cheque document. Carry out the compile function (Shift
F8)
3. Once the report has finished compiling a message will appear in the bottom left corner of the screen.
4. Open windows Explorer
5. Navigate to the My Reports
6. Copy the SAPDP3.Rox file and paste it into the Example Reports folder within the SunSystems
directory.
7. Maximise SunSystems
8. Type in PYD (Payment Documents) into the shortcuts menu
9. In the Payment Document dialog box enter the Profile code PAY.
10. In the Account Code field enter 81001 81005
11. Leave the Currency code blank
12. Click OK and then click the Print button
13. On the next screen Make sure the Document format code is ADP3
14. On the Document tab make sure you have the reprint option selected
15. Once all these have been entered click OK

You out put should look like the example below.





























Report Designer Advance



Page
67
6 Test Printing

6.1 Overview

Report writer checks if all the controls in the report are lined up properly and that the report is well
presented. Printing out a test print is a good way of checking that a report is formatted and aligned as you
want.

6.2 How to Test Print

To test print a report, set the parameter parmSSTestPrint to 1. This restricts the number of rows returned
by the datastreams in the report to 1. It also fills all the text controls with Xs and all the numeric controls
with 9s (* asterisks if the number does not fit the control). All date controls are set to todays date.
Labels are not changed.

An example test print (from a Purchase Order report):



























Report Designer Advance



Page
68
7 Report Designer Query Editor

7.1 Objectives

By the end of this session, delegates will be able to:

Navigate around Query Editor

Select a relevant table/view and columns

Define the runtime parameters

Define a sort order

Create a report using Query Editor

Report Designer Advance



Page
69


7.2 Introduction to Query Editor

The Query Editor is used to specify a query, which is a statement that specifies which data from the
database to in include in the report.

Use the Query Editor to specify a query, which is a statement that specifies which data from the database
to include in the report. When you open the Query Editor, the Database Browser accompanies it, as shown
in the following illustration. The Query Editor, which is a graphical editor, is a central tool in the Report
Designer.

For the Query Editor to work, Report Designer must be able to establish a database connection. If you do
not already have an open database connection when you start Query Editor, Report Designer attempts to
connect to a database using the connection properties defined in the connection component.

It is tool in Report Designer and e.Report Designer Professional used to write a SQL SELECT statement.
The upper pane in the Query Editor lists tables included in the e.report. The upper pane also shows the
joins between those tables. Use the upper pane to select tables and specify the joins between the tables.

If the connection component does not contain the necessary information, Report Designer cannot connect.

7.3 Navigating around Query Editor

7.3.1 The Query Editor is made up of two screens.

The first (main) screen is split into two panes. The upper pane displays the tables or views that have been
selected and the lower pane is made up of 4 tabs each of which is used perform particular tasks. These are:

Columns This allows the user to select columns or define computed columns

Conditions Allows the user to specify criteria for which rows the query retrieves from the database

Order By Allows the user to specify how rows are sorted

SQL This allows the user to view the SQL select statement

The second screen is the Database Browser (DB Browser), which displays a diagram of available
databases, tables and views managed by the database management system which Report Designer is
connected to. To specify which table you want in the query, drag and drop tables form the DB Browser
into the upper pane of the main screen.












7.4 Selecting Tables to Retrieve from

Report Designer Advance



Page
70
To select a table (or view) to retrieve data from use the DB Browser (located at the top right of the Query
Editor in the previous screenshot). This contains a listing of all the tables and views available for access in
the database:



To select a table simply drag and drop it into the upper pane of the Query Editors main screen.

7.5 Selecting Columns to Retreive

To select the columns that you wish to retrieve, click the Columns tab at the bottom of the Query Editor.
Then click in one of the leftmost fields and you will be presented with a drop down list of available
columns:


Select the columns that you wish to retrieve. Alternatively, you can simply drag and drop the columns
from the table into the column field. If multiple columns need to be selected the shift and Ctrl keys will
allow columns to be selected sequentially or randomly. To select all columns form the table click on the
asterisk * and drag and drop into the columns field.

7.6 Applying Conditions to the Selection
Conditions can be placed on the query using the Conditions tab of the Query Editor. Select the
column that you wish to apply the condition to (in exactly the same way as selecting the column
to retrieve) and then enter the other half of the conditional expression (including the relational
operator) in the Query Expression field.
Report Designer Advance



Page
71

Note that if you enter multiple Query Expressions they will be ANDed together. In order to use the OR
operator in your conditional expression you must type into the box at the bottom like so:



7.7 Specifying the Sort Order

You can specify the order in which the query brings back rows of data using the Order By tab of the
query editor. Only those columns that have been selected under the Columns tab are available for
selection. Highlight the column that you wish to sort on in the right hand pane and then click the left
arrow. To deselect, click the column in the left hand pane and click the right arrow.







7.8 Viewing the Query

Report Designer Advance



Page
72
To view the SQL Query generated by the query editor, select the SQL tab:


7.9 Creating Joins

A SQL query operation that combines records from two tables and returns them in a result set based on the
values in the join columns. When used without further qualification, join usually refers to an equi-join. For
example, Supp_Code in one table is joined to another Supp_Code within another Table. The result set
contains combined Supp_Code and order records in which the Supp_Codes are equal.












When you select more than one table, Report Designer creates joins to link related tables if it can
determine the columns on which the tables are joined.

A join is a SQL query operation that combines records from two tables and returns them in a result set
based on the values in the join fields.

Without a join operation, you would have to assume that the data in the tables is in the correct order. If the
data were not in order, the result set might contain a Supplier from one table and an order from another.
This consequence would give an inaccurate picture of what has been order from one supplier.

To decide where joins should occur, Report Designer applies these criteria in order:

1 The relationship information, if available, in the data dictionary of a database
2 Primary and foreign keys
3 Matching column names and types

Note: Report Designer does not create joins based on matching column names and types. The joins
e.Report Designer creates might not match the structure of your database schema. If you need more
information about the joins in your database, ask your database administrator for a schema diagram.
You can also establish joins using the Query Editor. The types of join you can create depend on your
database management system. The Query Editor supports the following types of joins.

Type of join Description

Report Designer Advance



Page
73
Inner join Returns records from two tables where the values of the joined fields have a specified
relationship, such as equal to or greater than.

Left outer join Returns records from the leftmost table even if there are no matching values in the other
table.
Right outer join Returns records from the rightmost table even if there are no matching values in the
other table.

As you create joins, Report Designer writes the Where clause of the SQL SELECT statement.


Inner Join

A type of join that returns records from two tables based on their having specified values in the join fields.
The most common type of inner join is the equi-join, in which records are combined and returned based on
field values being equal. For example, if customer and order tables are joined on customer ID, the result set
will contain only combined customer and order records where the customer IDs are equal.

Outer Join

A type of join that returns records from one table even if there are no matching values in the other table.
The two kinds of outer join are the left outer join and the right outer join. The left outer join returns all
records from the table on the left in the join operation even if there are no matching values in the other
table. The right outer join returns all records from the table on the right in the join operation. For example,
if customers and orders tables are left outer joined on customer ID, the result set will contain all customer
records including records for customers with no orders.


Report Designer Advance



Page
74


7.10 Exercise 10 - Create an Account listing using Query Editor

For this exercise you will build a report using the Query Editor. Using what you have learnt about the
Query Editor you will:

Build a simple listing report
Add Formatting to your report
Add additional components such as a Frontsheet and a Grand Total to your report
Add an additional level of Grouping to your report
Create a summary report

In practice you will rarely need to create a report from scratch with Report Designer. Instead it will prove
easier to amend an example report or use Data Source Designer to create a library of components for you
to drag into your report.
Part 1

Objective

Build a simple financials transaction listing selected and grouped by Account with additional columns for
Journal Number, Line Number, Transaction Date, Transaction Reference, Base Amount and Debit/Credit
Marker with Account Totals.

Hints

First open Report Designer to create a new report from a template. Include the OSSMAIN SunSystems
library. Use the Query Editor, DB Browser to find an appropriate view in the database, try
PKP_V_CODEA_LFAC_6010, and then select your Data Items and selection criteria.




























Report Designer Advance



Page
75
Solution - Part 1

1. Open Report Designer from Navigation Manager. Its the last item under Setting up SunSystems,
Tools in Navigation Manager.

























2. Report Designer opens and displays the Welcome dialog below.

Note: If a report is displayed instead of the dialog this means the previous session of Report Designer was
closed without saving an open design and it is re-opened when the application is next launched. If that is
the case simply select File Close from the menu followed by File New and go straight to the next step but
one.
























Report Designer Advance



Page
76
3. Select Create a New Report, Click OK and the New Report dialog below is displayed















4. Now select RWF Simple Template Landscape report and click OK. The template will load a blank
report layout as below with default filename Design 1


























5. The first thing you should do is decide on the name of your report and save it. First right click the top
report component and rename it from the name of the template to any appropriate name. You will
notice that once you have changed the name the layout pane goes blank. This is a bug within Report
Designer.







6. Then right click again, select properties and enter a Report Title for the report.



Report Designer Advance



Page
77



















7. Save the report design in My Reports folder

8. Note that once you have saved it, the name of your design appears in the title bar. Now open the
OSSMain library of SunSystems report. To do this select View, Library Browser from the menu. A
dialog appears as below

9. Select OSSMain.rol. new window containing a structure view of the library will now appear on our
screen as below











10. The library contains all the basic types of component you need to design a report. Some will also be
present on the palette if it has been customised to use SunSystems components.

Note: Never use the field list function, as it cannot be customized in this way

11. From the OSSMain library, hold the CTRL key down and drag a blue SQL DataSource
OSS1DataStreamSingleCompany component into the structure pane so your report can connect to the
SunSystems database.













Report Designer Advance



Page
78

12. After completion of this operation your screen should appear as below

























13. Now select View DataSource from the menu to launch the query editor.

14. In the DataBase Login dialog box log in as SUN, SUNSYS.









15. The query editor dialog appears as below



















Report Designer Advance



Page
79




16. Open up the hierarchy of the DBBrowser dialog and find PKP_V_CODEA_LFAC_6010 and drag it
into the top pane.
























17. Select the Columns tab and drag on Account Code, Account Description, Amount, Journal Number,
Journal Line Number, Period, Transaction Date and Dr/Cr marker.
























18. Next select the conditions tab and drag on Account code. Make sure you Check Ad hoc


Report Designer Advance



Page
80





























19. Select Window from the menu and return to the Design Editor. Before going any further it is worth
planning what you want your report to look like. The objective of this part of the exercise is to group
by Account. There is already an empty Group section in the template together with a header section
in which we can display details about account.

20. Double click on the square green FirstGroupSection component under the content branch of the
structure pane and its properties will be displayed as below.

















21. Click in the empty box to the right of the Key property and select [ACNT_CODE] from the picklist.
Click Apply then Close




Report Designer Advance



Page
81























22. For clarity it is best at this stage to rename the Group component appropriately for example Account
23. From the OSSMain Library drag a OSS1LabelText Control into the Before section of the Account
Group
24. This is going to act as a standard label in the group. If you want the label to link to the data dictionary
then you have to enter the following details into its component properties.
25. Firstly in the ValueExp column enter the following Account Code

Note: When entering standard text in an OSS1LableText component that is to appear as a column heading
you must always enter the text in quotes. For example Account Code. If you do not do this then the
report will not run.

26. You then need to specify the table name which will retrieve the name from the data dictionary. In the
TableName column enter the following V_CODEA_LFAC_6010


















27. You will now need to enter the column name within the table that holds the name. This will be
ACNT_CODE.





Report Designer Advance



Page
82





















28. Once you have entered all the details click Apply and close
29. Now drag an OSS1DataText component for Account Code data from the Main library into the Before
Group Section. Select the correct column for the Value Expression using the list box













30. Drag the same component for the OSSMain library but this time select Description for the value
expression.

31. Your Before Section in the layout pane should look the one below









32. Next drag in controls for all other data fields required into the GroupContents frame and their
respective column heading labels above them in the PageHeadings frame. Use the Query Editor
description of the data types of the columns to decide which control to use e.g. integer for journal and
line and a data double control for the amount. Note that you can only drag one component from a
library at a time but once on the layout pane multiple controls can be selected to change a property for
all or align/resize using the right click mouse button. At this stage your design should look something
like the illustration



Label Text
Control
Data Text control
for Account Code
Data Text control
for Description
Report Designer Advance



Page
83



































33. All that remains for this part of the exercise is the group total. To do this hold down the control key
and drag the Amount component from the data row to the After section of the group and place in line
with the Amount in the Group Contents frame. Rename it SumAmount.

34. In the ValueExp column for this component you will have to change the expression so that it will give
you a total.

35. To do this double click on the component to bring up the component properties. Scroll down to the
ValueExp column. Click in the column so that the browser button appears.










36. Click on the browser button to bring up the Expression Builder.





Browser Button
Report Designer Advance



Page
84








37. In here edit the expression to Sum([PKP_V_CODEA_LFAC_6010.AMT])
38. Do the same for the Debit/Credit marker holding down the Control key and dragging it down to the
After frame before releasing to copy the existing one.
39. However for the marker to work correctly for an aggregate amount you will need to copy it again, set
some properties so that each appears conditional on the value in the total amount field and place one
on top of the other in the layout pane. The properties to set for the debit marker are as follows





















40. And D including the quotes in the Value expression property column. Also set the table name and
column names in there respective columns. For the credit marker enter the same except
ConditionalOperator < and C in the Value Expression.

41. Your finished report design should appear as the illustration below.




















Report Designer Advance



Page
85







42. Now all that remains is to run it. To do so either click on the Running Man icon on the toolbar or
select Report Run from the menu.
43. You will be presented with the Custom Requester dialog box asking, Do you wish to load data from
an XML file? Click No
44. You should then see Parameter Editor appear as below. If instead you immediately see a parameter
grid dialog, cancel and check the path to CustomRequester.exe is set in the properties of the topmost
component of the structure pane.


















45. On the General Tab you will see that the Business Unit Code field is in red. This means that it is a
mandatory field and must be entered. Use PKP and A for the ledger.

46. Then on the Ungrouped tab enter a single account or a range of account codes. Select a small range
of accounts or else your report will take too long to run and click OK.

47. Select OK and the second page of your generated report should appear in the viewer window as
below.




















Report Designer Advance



Page
86







48. You will notice a number of aspects that can be improved. Proceed to the next part of the exercise to
amend and enhance this report.

Report Designer Advance



Page
87


Part 2

Before you start this session save your report design for Part one. Close the report and reopen it and save
it under another name.

Objective

Refine the layout and formatting of the controls. For example,
Make the column headings appear on every page rather than at the start of every
account,
Draw a line below the column heading labels,
Amend the Journal and Line controls to be left aligned,
Reformat the Base Amount to comma thousand separator and 2 decimal places,
Remove the minus sign from debit values,
Correct the display length of the debit/credit marker,
Align all controls horizontally
Add a grand total in the after section.
Add a Frontsheet to the report to display parameters

Hints

More controls can be added from the OSSMain Library and a Frontsheet from OSSComponent. The
properties of all components can be amended by double clicking on the control. Right clicking a
component also accesses properties but also alignment and sizing options.

Report Designer Advance



Page
88


Solution Part 2

1. You may have noticed that the header frame in the template is positioned to repeat the headings for
each account. This facilitates alignment of labels. However to change to page headings click the
Before frame in the Group Section and drag to the empty Report Body Pages Page Header slot. The
report should now appear as below

Note: This operation is not possible in the layout pane alone, although you can drag to it as long as you
start in the structure pane.



























2. To make sure the headings appear on the first page as well as all subsequent ones amend the
ShowHeaderonFirst property of the Content-ReportBodyPage component to As Page Header as
below.



















Report Designer Advance



Page
89

3. To further enhance the appearance of the headings by adding a horizontal line above and below the
headings
4. From the OSSMain library find the DrawLine Control and drag it into the page headings frame.
Reselect and resize and reposition using the handles. You may need to resize the frame to provide a
line space below the headings and the line as shown.




5. When you run the report you will notice that the column heading appear after the Group headings.
6. To change this we will need to move the PageHeader Before frame and the GroupBefore frame to the
scratch pad as below















7. Move the BeforeGroup frame to the Content PageHeader slot and the PageHeading frame to the
Before slot of the group section. When you have moved the frames out of the scratch pad close it.
Your report design should look like the one below.


























Report Designer Advance



Page
90
8. The controls for Journal Number and Line are numeric and default to right aligned. To left align to
match their labels, hold down the control key, click on both controls and then the left align toolbar
icon.
9. Next select the Amount number control. Amend the Format property to #,##0.00. Do the same for
the Group Total.





















10. To remove the negative sign from debit values, double click on the amount control and change the
value of the NegativeSymbol property from n to n. Do the same for the equivalent control in the
Account group total frame.
















11. To allow full display of the Dr/Cr Marker simply click and drag one of the handles or double click,
select Size, width property and amend to say .8















Report Designer Advance



Page
91



12. To make sure all controls on the data row are the same height and on the same level, click anywhere in
the GroupContents frame and holding the left mouse button down lassooe all the controls within it by
drawing a rectangle which touches all of the controls without touching the frame itself. You do not
need to completely enclose all the controls you wish to select. Alternatively hold down the control
key and click all the controls individually. When all controls are selected right click and select Size,
Same Height, then select Align , Centers.

13. The base control for all operations is the one clicked last. The same operation can be carried out on
the column headings and the Account header controls.

14. The only detail left for the report is to add a Grand Total.
15. Before you can do this you must place a frame in the Report content After slot. Open the Library
browser and from the OSSMain Library drag and drop the OSS1FrameA4LAndscape in the empty
slot.
16. You will notice that the frame you have just added has a background colour of red. To change this
double click in the frame and in the component properties change the background colour to
transparent.















17. Now from within the layout pane click on the Amount component and while holding down the Ctrl
Key drag and place the copy into the Report After Frame and align it with the amount component in
the group after frame.
18. If after you run the report and the report total is not correct. Go back to the report design and double
click on the amount component in the report after frame to bring up the component properties. And in
the ValueExp change the expression to read as follows.

Sum([PKP_V_CODEA_LFAC_6010.AMT]) overall

19. For the Debit/credit markers to work follow the steps 39 41 in part one of the exercise.

20. The last thing we are going to do is to add a front sheet to our report.













Report Designer Advance



Page
92



21. To add a Frontsheet to display parameters etc first open the scratchpad using the icon to the right of
the Library Browser then drag the entire existing content section to it as below.
























22. Next Open the library browser and select the OSS1Component library from here drag the component
called OSS2FrontPageReportSection to the second component down in the structure pane entitled
Content MainSequentialSection.

















23. Then drag the entire Content component from the scratchpad and drop it in on the same component
you dropped the front page component. Afterwards the report structure will appear as below




Report Designer Advance



Page
93


























24. Run the report again. It should now have a front sheet (Title Page) like the one below.
































Report Designer Advance



Page
94



























25. If there are still areas of formatting you wish to improve, amend them and repeat the process


Report Designer Advance



Page
95

Part 3 - Summary report

Before you begin this section save the report you built in part two and then rename the report to
another name. Use what you have learnt to complete this part of the exercise.

Objective

Use the transaction listing to create a summary showing account and period totals only

Hints

The aggregate controls in the existing report refer directly to the database and not the content section.
Solution Part 3

1. Delete the content section with the line detail
2. Delete all the column heading controls except Base Amount and Dr/Cr
3. Delete the Account Before section
4. Delete the label control in the Account After section and move the account code control to the left
5. Move all three controls to the top of the frame and reduce the height (line spacing) of the control
6. The layout of your summary report should be similar to below






































Report Designer Advance



Page
96

7. The output should be similar to below

























































Report Designer Advance



Page
97

7.11 Exercise 11 Converting a Query Editor Report to CDR

Objective

In this exercise you will take a report that has been built using the Query Editor function and convert the
entire content of the report to CDR format. CDR or Common Data Retrieval is the format that is used
when you create a report through using a library created in Data Source Designer.

Solution

Open the exercise AddressBook Template.
The Report design should look like the example below

























Save the exercise in My Reports folder
The report has a Library (AddressBook.rol) already available
Open the Library from the Library Browser
Drag the Data Stream component from the Library and add it into the Structure Pane
Once you have the DataStream in the structure pane you will need to go through each individual
component and change the value expression to that from the new library.
Once you have finished the report you will need to run it to make sure it works.













Report Designer Advance



Page
98
8 Adding Parameters to a report
8.1 Objectives

By the end of this session, delegates will be able to:

Understand how to set up parameters

Understand what Parameter Names are used for

Understand what Parameter Aliases are used for

Define a Parameter Group Alias

Understand the WhereClause

Understand how to display Static parameters









































Report Designer Advance



Page
99
8.2 Parameters: Names And Aliases
8.2.1 Overview
SunSystems reports do not use the default Actuate Requester dialog for entering of parameters, but instead
use a customised requester called the SSIntegration Parameter Editor.
When reports are run using the SSIntegration Parameter Editor, the report parameters are displayed
grouped together on tabs. Each tab displays a different set of parameters, for example, the General tab
may display parameters like Business Unit Code, A/B Marker, etc., as shown below:






















These tabs and parameters need to be displayed in different languages according to the installation.
Therefore, the name for the parameter or tab cannot be hard coded in the report but has to be looked up in
the database.

The parameter editor also allows some parameters to be entered via drop down lists or query boxes that
present the selection of valid values that can be entered for the parameter.

The names of the tabs are created from the group name aliases. The names of the parameters on the tabs
are created from the parameter name aliases. The parameters are displayed on the tab specified by its group
name. The aliases for both groups and parameters also permit specifying the ordering of groups and of
parameters within the groups, ie the order of the tabs in the Parameter Editor and of the parameters on
those tabs.

The parameter group and name aliases are used in a similar way to display the parameter names on the
front page of a report. If the parameter name alias has not been specified correctly, the parameters will not
be displayed correctly on the front page parameter display.

In order for the parameters to be displayed properly in their correct groups we have to follow a certain
convention when naming the group and parameter aliases.








8.2.2 Defining a Parameter Group Alias


Report Designer Advance



Page
100
For the group aliases (specifying the tabs in the parameter editor) we need to consider:

The position of the group in the editor (i.e. which tab).
Whether or not to lookup the group name from the data dictionary.
Whether or not to display the group and its parameters on the front page of the report.
Group name to use if no lookup is required.
The table name to use to look this group name up if lookup is required.
The column name to use to look this group name up if lookup is required.

A Parameter Group alias is encoded in the following format:

<Ordering>\\_<Group Name>, <Table Name>, <Column Name>

Information Description
Ordering 2 digit number which is used to order the groups
\\* Indicates that the name of the group should be picked up from a data
dictionary lookup. If the backslashes are not included, the group name is used
as is, ie no data dictionary translation will occurr
_* Indicates that the group, and its parameters, should be displayed on the
reports front page
Group Name Name for the group
Table Name* Table Name for Data Dictionary label lookup to retrieve the translated name of
the parameter group. Only used if the two backslashes are used to prefix the
group name
Column Name* Column Name for Data Dictionary label lookup to retrieve the translated name
of the parameter group. Only used if the two backslashes are used to prefix the
group name.
(Items marked with a * are optional)

Example 1

10\\_General,ZZ_RWF,GEN

Ordering 10
Group Name General
Table Name ZZ_RWF
Column Name GEN

This group will appear before any groups with a number > 10. The translation for the group name
(General) will be looked up in the data dictionary (because of the two backslash prefix). Table and Column
name will be used to do this look up. The group (and its parameters) will be displayed on the front page of
the report.

8.2.3 Defining a Parameter Alias

For the parameter aliases we need to consider:

The position of the parameter within the group.
The table name to use to lookup the parameter alias.
The column name to use to lookup the parameter alias.
The table name to use to lookup the alias suffix.
The column name to use to lookup the alias suffix.
Whether to override default parameter values.



For each parameter it is necessary to encode the following information within the Alias string:
Report Designer Advance



Page
101

\\<Ordering,>\<Table Name>,<Column Name>,<suffixTable Name>,<suffixColumn
Name>,<WhereClauseIndicator>,<PseudoAdhocIndicator>

Information Description
Ordering Order in which the Parameter should be placed within the group (Tab
in the Parameter Editor)
Table Name Table Name (for bound and unbound labels)
Column Name Column Name (for bound and unbound labels)
Suffix Table Name* Table Name (unbound label for suffix of the main label)
Suffix Column Name* Column Name (unbound label for suffix of the main label)
WhereClauseIndicator* This determines whether the default parameter value will be
overridden when the report is run from control desk, i.e. when the
ExtractId has been set. This indicator should only be set with Adhoc
parameters.
See section Error! Reference source not found. for more
information.
PseudoAdhocIndicator* An advanced setting automatically set by Report Designer program,
to indicate a parameter type. Not to be used.
(Items marked with a * are optional)

Example 1

\\00\POL, SUPP_ITEM_CODE,,,0,0

Ordering 00
Table Name POL
Column Name SUPP_ITEM_CODE
Suffix Table Name
Suffix Column Name
WhereClauseIndicator 0
PsuedoAdhocIndicator

This parameter will appear as the first parameter in the group or on the tab. Table and Column name are
used to do the data dictionary lookup to find the translation of the parameter.

Example 2

\\05\,POL,PO_TXN_REF,YYCOM,FROM

Ordering 05
Table Name POL
Column Name PO_TXN_REF
Suffix Table Name YYCOM
Suffix Column Name FROM
WhereClauseIndicator
PseudoAdhocIndicator

This parameter will appear after the first parameter (with ordering no 00) in the group/tab. Table and
Column name are used to do the data dictionary lookup to find the translation of the parameter name. The
name will be suffixed with the result of the data dictionary lookup using Suffix Table and Column names,
eg Purchase Order Txn Ref from.







Report Designer Advance



Page
102

8.2.4 Explanation of the WhereClauseIndicator

When designing a report it is possible to specify default values for the parameters in the report.
When running the report with the SSIntegration Parameter Editor, these default values will be used.

When the Report is being run from the Sun Systems ControlDesk, Control Desk sets an ExtractId and
passes it to the Parameter Editor. The presence of this ExtractID will cause the Parameter Editor to look at
the WhereClauseIndicator of parameters to determine whether the parameters default value should be
overridden by ControlDesk values.

Only set the WhereClauseIndicator to 1 for parameters whose value you want to be overridden by Control
Desks values. If the ExtractId is present and the WhereClauseIndicator is set to 1, the parameter (and its
default value) will not be present on the Parameter Editor Tab and therefore no value can be entered for it.

If the WhereClauseIndicator is not present, or set to zero, the parameter value will always override the
Control Desk.

The WhereClauseIndicator should only be set for adhoc parameters since these are the ones which Control
Desk should override.

8.2.5 QBE Syntax

QBE (Query By Example) syntax can be used when entering values for adhoc parameters at run time or
when specifying colon parameters in the query editor.
You can use QBE syntax to build four types of expressions:

A single value, such as 10
A relational expression, such as >50
A range of values, such as 20-25
A list of the above separated by commas, such as 10, >50, 20-25

The following table gives examples for each type of QBE expression. The second column in the table
shows which database column the expression applies to. For example, when you type a QBE expression in
the Conditions page of the Query Editor, you first select a column name. The last column in the table
shows the SQL syntax that Actuate adds to the Where clause of the query.

Type of
expression
Database
column
QBE expression SQL
Single value quantity 0 quantity = 0
Relational quantity >50 quantity > 50
custState !CA custState <> 'CA%'
custName >P custName > 'P%'
Range price 10-20 price BETWEEN 10 AND 20
orderDate 1/1/1994 - 5/31/1994 orderDate BETWEEN {d '1994-01-01'}
AND {d '1994-05-31'}
custName Ed - Kl custName BETWEEN 'Ed%' AND 'Kl%'
List custState CA,TX,NV custState LIKE 'CA%' OR custState
LIKE 'TX%' OR custState LIKE 'NV%'
empCode 1, 6-8 empCode = 1 OR empCode BETWEEN
6 AND 8


Report Designer Advance



Page
103
8.2.6 Colon Parameters
Adhoc parameters are sufficient for most of the time, however the slight disadvantage of them is their
flexibility. Adhoc parameters allow the user to enter values using QBE (Query By Example) syntax giving
them the ability to enter wildcard expressions, ranges, etc.
If you wish to enforce the expression being used in the query, for example you want to enforce the
condition DateTime >= 1/1/2001 then you must use a colon parameter in the query expression in the
query editor instead of an adhoc parameter. The syntax for this is as follows:

<relational operator> :<parameter_name>

An example of the use of colon parameters and where to enter them is shown below:


The QBE Syntax can also be used here for example, you could enter :AccPeriodFrom - :AccPeriodTo
into the query expression field and this would specify a date range in the query.

Note If the table/view in the datasource does not exist in the database your report may still
run due to substitition of the business unit prefix. However you will be unable to create
new colon parameters unless you change the table/view to one that does exist

8.3 Display of Parameters

Parameter values are normally displayed on the frontsheet but may be displayed on every sheet of a report
using the component OSS1HeaderParameterFrame in the Parameter Display library.


Report Designer Advance



Page
104
8.4 Exercise 12 Adding/changing Parameters on a report

Objective

In this exercise you will change the parameters on a report so that they link back to the database. You will
also add a parameter, which will allow you to enter static text to the report.

Solution

Open the Parameters Exercise from the Start Folder.
Save the Exercise in My Reports Folder
If you run the report you will notice that the ledger code field is missing and the run time selections
appear on the Ungrouped Parameters Tab



















Cancel the report from running, as you will need to make some changes to it.
Click No to all the error messages that will appear
Close the report down and then reopen it.
First you must include the Library Ledger.rol using the Library organiser function. This library is
located in the Lib folder which is within the:
Report Designer folder
SunSystems RDK
SSUserToolset
Lib
Once you have include the library and you click OK in the Library Organiser dialog box the library
will appear in the report design.
Close the Library down as we will not be using it
You will need to add another condition to the report for Period.
Once you have done this you will need to go to Tools on the main menu and then select the
Parameters option from the drop down menu.
You will need to move the report parameters to within the 20\\_RTS,ZZ_RWF,RTS
The following details must be used for each parameter

Parameter Alias Group
Account Code \\10\A_SALFLDG,ACCNT_CODE,,,1,1,0,,,,0,7 20\\_RTS,ZZ_RWF,RTS
Period \\15\A_SALFLDG,PERIOD,,,1,1,0,,,,0,7 20\\_RTS,ZZ_RWF,RTS

Once you have changed the parameters you will need to add a static parameter so that you can enter a
message at runtime, which will then appear, on the report.
Go to Tools on the main menu and then select the Parameters option from the drop down menu.

Report Designer Advance



Page
105
Expand the 20\\_RTS,ZZ_RWF,RTS Parameter
Click on the Add field
On the Parameters dialog box you will need to enter the following details

Parameter Name Type Group
Message String 20\\_RTS,ZZ_RWF,RTS

Once you have created the Parameter you will need to add a OSS1DataText control to the Before
Section of the report.
In the Value expression type Message.
Now run the report and you Parameter Editor should look like the example below.





















Report Designer Advance



Page
106

9 Conditional Properties
9.1 Objectives

By the end of this session, delegates will be able to:

Understand how the conditional properties work

Set up the conditional properties for a component

Set up the conditional properties to look at another component

Understand when to use conditional properties












































Report Designer Advance



Page
107

9.2 Overview
In all the visual components (lines, data controls, labels etc) in the OSSMain library, there are the abilities
to perform certain actions given a condition. For example, a report writer would like to hide a control if
the value in another control is bigger than a certain value. There are other actions that the report writer
would like to control including moving and resizing the control, set different font size and colour or just
add a border to the control to highlight its existence.

Related ConditionalClassName
Properties: ConditionalDataType
ConditionalOperator
ConditionalRangeFrom
ConditionalRangeTo
ConditionalThen
ConditionalThenElse

APPLY TO:
All Calculation Controls (e.g. Summary Total Controls, Page Total Controls)
All Data Controls (e.g. Data Text Controls, Currency Controls)
All Drawing Controls (e.g. Line Controls, Rectangle Controls)
All Graph Controls (e.g. Summary Graphs, HLC Graphs)
All Label Controls (e.g. Basic Label Controls, Currency Label Controls)

9.3 Conditional Properties
For all visual components in the OSSMain libraries, there are seven properties used to perform the
conditional actions, all with the prefix Conditional:


Here is an example to demonstrate what each of these properties does:

You would like the report to display a piece of text (in control c1) if the total (in another control c2)
exceeds a certain value (called the value t). And the text should be hidden if the total does not exceed that
value. To summarise:

If Value(c2) > t then Show(c1)
or in another way:
If Value(c2) <= t Then Hide(c1) Else nothing






Report Designer Advance



Page
108


To do this, perform the following steps:

1. Set ConditionalClassName to be the name of the control to retrieve the value from. In this
case it would be c2.

2. The ConditionalDataType property specifies the type of comparison on the condition. In this
case, its a comparison between integers (or doubles).

3. The operator for the condition check is specified in ConditionalOperator. In this case it would
be <=.

4. In the ConditionalRangeFrom property, specify the value for comparison. In this case, it would
be the value t. The name of a control in the frame can also be used in the
ConditionalRangeFrom property. The value of the control will then be used instead for the
comparison. If ConditionalOperator is specified as Range then use both the
ConditionalRangeFrom and ConditionalRangeTo properties to set the range.

5. If the condition is satisfied then the actions specified in ConditionalThen will be executed.
Otherwise, actions specified in ConditionalThenElse will be executed.

Hence the example could be summarised as follows:

If Value(c2) <= t Then Hide(c1) Else nothing







9.4 Conditional Properties Summary

Here are the list of properties associated with the Conditional Controls and their possible values. All the
values are not case sensitive.

9.4.1 ConditionalClassName

Possible Values Notes
Me Use the controls own value to check the condition
<ControlName> The class name of the control that is used for the check the condition

9.4.2 ConditionalDataType

Possible Values Notes
Date Use date comparison to check the condition
Number Use number comparison to check the condition
Text Use Text comparison to check the condition







ConditionalClassName Conditional
Range From
Conditional
Operator
ConditionalThenElse
ConditionalThen
Report Designer Advance



Page
109
9.4.3 ConditionalOperator

Possible Values Notes
Range Returns true if the value in ConditionalClassName is between values in the
ConditionalRangeFrom and ConditionalRangeTo properties. False
otherwise.
> Returns true if the value in ConditionalClassName is bigger than the value
in the ConditionalRangeFrom property. False otherwise.
< Returns true if the value in ConditionalClassName is less than the value in
the ConditionalRangeFrom property. False otherwise.
>= Returns true if the value in ConditionalClassName is bigger than or equal
to the value in the ConditionalRangeFrom property. False otherwise.
<= Returns true if the value in ConditionalClassName is less than or equal to
the value in the ConditionalRangeFrom property. False otherwise.
= Returns true if the value in ConditionalClassName is equal to the value in
the ConditionalRangeFrom property. False otherwise.
<>, != Returns true if the value in ConditionalClassName is not equal to the value
in the ConditionalRangeFrom property. False otherwise.

9.4.4 ConditionalFrom, ConditionalTo

Depending on the value set in ConditionalDataType, the possible values could be text (in double
quotes), number or date. The ConditionalRangeFrom property should always be set. The
ConditionalRangeTo property is not used unless the ConditionalOperator is set to Range.

If text is specified (without the double quotes) in the ConditionalRangeFrom property, the text will
be taken as the name of the control. The value of the control will then be obtained and used as part of the
condition.

The ConditionalRangeFrom property can also be set to True or False. Setting the property to
True will execute the conditions in the ConditionalThen property. Setting the property to False
will execute the conditions in the ConditionalThenElse property. For this to work, the
ConditionalClassName must be set to me.

The ConditionalRangeFrom property can also be the name of another component. For example, if
you want to hide a control if its value is the same as another control, you can use
ConditionalClassName = me, ConditionalDataType = text,
ConditionalOperator = =, ConditionalRangeFrom = <classname>.

The ConditionalRangeFrom property can also be set to NULL. If the value equals NULL then the
conditions in ConditionalThen will be displayed, otherwise the actual value (or if
ConditionalThenElse specified it will be the conditions in there displayed).

9.4.5 ConditionalThen, ConditionalThenElse

More than one action can be executed at one time. Use semi-colons to separate the actions. There are
three main types of actions the report writer can use:

General Components
All the components with the conditional properties can execute these actions
Data Components Only
Only the data components (including labels) can execute these actions
Drawing Components
Components includes rectangles, lines and ellipses (circles)
Report Designer Advance



Page
110

9.4.5.1 General Components

Possible Values Notes
Hide Make the control invisible.
MoveBy(x,y) Move the control by the x (horizontal) and y (vertical) values in centimetres.
MoveTo(x,y) Move the control to the x (horizontal) and y (vertical) co-ordinates in centimetres.
ResizeBy(x,y) Resize the control by the x (horizontal) and y (vertical) values in centimetres.
ResizeTo(x,y) Resize the control to the x (horizontal) and y (vertical) values in centimetres.

9.4.5.2 Data Components Only Actions

Possible Values Notes
Font Align <type> Set the alignment of the value in the control. Type include: Left, Right,
Centre/Center
Font Bold Set the boldness of the value in the control to be on
Font Bold Off Set the boldness of the value in the control to be off
Font Colour/
Font Color
<value>
Set the colour of the font in the control. RGB values and colour names specified
in Actuate can be used. i.e. RGB(123,123,123) or Black. TransparentColor
can also be used.
Font Italic Set the value of the control to be italic
Font Italic Off Set the value of the control to be not italic
Font Size Set the size of the font in the control
Background
<value>
Set the background colour of the font in the control. RGB values and colour
names specified in Actuate can be used. TransparentColor can also be used.
Border <value> Value On shows the border of the control. Value Off turns off the border of
the control

9.4.5.3 Rectangle and Ellipse Controls Actions

Possible Values Notes
Border Colour/
Border Color
Set the border colour of the rectangle/ellipse control. TransparentColor can also
be used.
Fill Colour/ Fill
Color
Set the colour of the rectangle/ellipse control.
TransparentColor can also be used.

9.4.5.4 Line Controls Actions

Possible Values Notes
Line Colour/ Line
Color
Set the line colour of the line control. TransparentColor can also be used.
Width Set the line width of the line control (in centimetres)



Report Designer Advance



Page
111
9.5 Uses of Conditional Controls

Here are some examples of the use of conditional controls.

9.5.1 Display text if the data value is empty

There is a control in a report that needs to show a text value from the database. If the value doesnt exist
then display the message: Error: No Data Found!. To do this, set the conditional properties for the
control as follows:

ConditionalClassName: Me
ConditionalDataType: Text
ConditionalOperator: !=
ConditionalFrom: (need to type in the quotes)
ConditionalTo:
ConditionalThen: ShowText Error: No Data Found
ConditionalThenElse:

If the control needs to show the message if the data value from another control
is empty then change the ConditionalClassName property to be the name of the
other control.
9.5.2 Displaying Debit and Credit columns

Heres a report that needs to display the following:

Debit Credit
2
4
4
2
12
_____________
8 16

The best way to do this is to have two conditional controls in the content frame with the same value
expression, i.e.















Both the DebitControl and CreditControl will have the ValueExp property set to be the database
column containing the data. For the DebitControl, the control needs to be hidden if the data
value is greater than 0 (i.e. only show if the data value is less than zero). This can be done
using the conditional control properties.

DebitControl
TotalDebitControl TotalCreditControl
CreditControl
Report Designer Advance



Page
112
ConditionalClassName: me
ConditionalDataType: Number
ConditionalOperator: >
ConditionalFrom: 0
ConditionalTo:
ConditionalThen: Hide
ConditionalThenElse:

The DebitControl will then be hidden if the data value is bigger than 0. Similarly
for the CreditControl, the control needs to be hidden when the data value is less
than zero. So set the conditional properties of the control to be:

ConditionalClassName: me
ConditionalDataType: Number
ConditionalOperator: <
ConditionalFrom: 0
ConditionalTo:
ConditionalThen: Hide
ConditionalThenElse:

For the totals, the TotalDebitControl should have the value expression:
[Table.Column] where [Table.Column] < 0
([Table.Column] being the table and column where the data is being stored in
the database)

Similarly for the TotalCreditControl, the value expression should be:
[Table.Column] where [Table.Column] < 0


Report Designer Advance



Page
113

10 Carry Forward and Brought Forward Controls

10.1 Objectives

By the end of this session, you will be able to:

Understand the Carried forward and Brought forward balances

Understand how to use these controls

Apply these controls to a report design

Add these controls to a predefined template

Report Designer Advance



Page
114


10.2 Overview

There will be some reports in which columns of figures flow onto multiple pages. To deal with these
situations, carry forward and brought forward controls can be used.

A Carry Forward control can be used to hold the cumulative value of a control, as at the end of that page.
The Brought forward control holds the cumulative value for a control brought forward from previous
pages.

An Example
Consider a list of numbers spanning 3 pages.

At the bottom of the first page, the Carry Forward control will have the sum of numbers on that first page.

On the second page, the Brought Forward control will have the amount carried forward from the first page.
The carry forward will have the sum of numbers of the first two pages.

On the third and final page, the Brought Forward control will have the amount that has been carried
forward from the second page. There will be no Carry Forward on the third page, since the numbers do not
go onto a fourth page.

When Carry Forward controls are used within a Group Section, the Carry Forward value relates to the
cumulative amount while the grouping has not changed.

For example, consider is a list of machine parts and their costs, grouped per order number
The cumulative amount in the Carry Forward control is for the cumulative cost of the order. When the
order number changes then the cumulative amount starts again, for the new order.


The Carry Forward and Brought Forward Controls work on numerical or currency Controls.

When working on numerical values, the following controls will be used:


Control Class Type Slot Description Term Used
OSS1DataCFDoubleControl Contents, Before
or After
This control
must be used
instead of
OSS1DataDo
ubleControl if
the data is to
have carry
forward
calculations
performed on
it.
TargetControl
OSS1CalcDoubleBFControl Page Header or
Page Footer
This control will display the
brought forward value for the
TargetControl
Brought Forward
Control
OSS1CalcDoubleCFControl Page Footer This control will display the carry
forward value for the
TargetControl
Carry Forward
Control




Report Designer Advance



Page
115


Control Class Type Slot Description Term Used
OSS1DataCFIntegerControl Contents, Before
or After
This control
must be used
instead of
OSS1DataInte
gerControl if
the data is to
have carry
forward
calculations
performed on
it.
TargetControl
OSS1CalcIntegerBFControl Page Header or
Page Footer
This control will display the
brought forward value for the
TargetControl
Brought Forward
Control
OSS1CalcIntegerCFControl Page Footer This control will display the carry
forward value for the
TargetControl
Carry Forward
Control

When working on currency values, the following controls will be used:
Control Class Type Slot Description Term Used
OSS1DataCFCurrencyControl Contents,
Before or After
This control must
be used instead
of
OSS1DataCurren
cyControl if the
data is to have
carry forward
calculations
performed on it.
TargetControl
OSS1CalcCurrencyBFControl Page Header or
Page Footer
This control will display the brought
forward value for the TargetControl
Brought Forward
Control
OSS1CalcCurrencyCFControl Page Footer This control will display the carry
forward value for the TargetControl
Carry Forward
Control





10.3 Setting up Target Control
















Report Designer Advance



Page
116




The target control may be in either the Content, Before or After sections of a report.
The class name of the control, and the frame containing the control will be used to identify the target
control.

The class name can be obtained from the Component Editor, class tab.



















10.4 Setting up Carry Forward Control

The Carry Forward control must be in the Page Footer. If Carry Forward is being used, the TagetControl
must be either OSS1DataCFDoubleControl or OSS1DataCFCurrencyControl.


Set the TargetControl using the properties SourceControlClassName and SourceFrameClassName

SourceFrameClassName: ContentFrame
SourceControlClassName: CostControl

The SourceControlClassName and SourceControlFramename are case sensitive.


















Report Designer Advance



Page
117


There must be only one Carry Forward control in the Page Footer, per target control.

10.5 Setting Up the Brought Forward Control

The Brought Forward control may be in the Page Header or Page Footer frames.

There is no limit to how many Brought Forward controls relate to the same target.

To specify the TargetControl for the Brought Forward Control, the SourceControlClassName
must be given.

The SourceControlClassName is case sensitive.



















If there is a Brought Forward control, there must be a Carry Forward control, which relates to the
same target. The Carry Forward Control must be in the Page Footer, as described above.

If you do not wish to see the CarryForward control, set the CarryForward controls ShowWhenViewing
and ShowWhenPrinting properties to False.

Report Designer Advance



Page
118

10.6 Exercise 15 - Adding Carried/Bought Forward controls

Objective

In this exercise you will need to add some carried forward and bought forward controls to an existing
report.

Solution

Open the CF_BF Exercise from the Start folder and save it in My Reports folder
You will notice that this a normal account listing to which we will add some brought forward and
carried forward totals.
Apply what you have learnt to add a frame to the following sections to the report
Report Footer
Report After
Once you have added the frames the following components will need to be added and the details
entered as shown in the table.

Report Footer Frame
Page Total
Component Type OSS1CalcCurrencyPageTotalControl
Value Expression
Source Control Class Name AccountListing::AccountContent::Amount
Source Frame Class Name
Brought Forward From Previous Page
Component Type OSS1CalcCurrencyBFControl
Value Expression
Source Control Class Name Amount
Source Frame Class Name
Carried Forward to Next Page
Component Type OSS1CalcCurrencyCFControl
Value Expression
Source Control Class Name Amount
Source Frame Class Name AccountContent
Report After Frame
Total
Component Type OSS1CalcCurrencyPageTotalControl
Value Expression
Source Control Class Name AccountListing::AccountContent::Amount
Source Frame Class Name
Brought Forward From Previous Page
Component Type OSS1CalcCurrencyBFControl
Value Expression
Source Control Class Name Amount
Source Frame Class Name
Grand Total
Component Type OSS1DataCurrencyControl
Value Expression Sum([PKP_V_CODEA_LFAC_6010.AMT])
Source Control Class Name
Source Frame Class Name

Note: You will have to rename the amount component in the content frame to AMOUNT or the report
will not work. As mentioned in the session you must make sure that all the components that you use when
setting up carried forward and brought forward balances must be from the same control group. You must
also make sure that the target controls are from the same control groups.
Once you have added all the components your report layout should look like the example below.
Report Designer Advance



Page
119

























The report output should look like the example below

































Report Designer Advance



Page
120
10.7 Exercise 16 Creating a payment Listing

Objective

The client (PKP World Wide) has given us a sample of reports and documents that they wish to be created
in SunSystems. Below is a copy of the Payment listing that they fax over to the Paymaster General once a
Payment run has been made. Prior to Sun they would have created this report in Excel.












































From the above report template you will have to create this report in Report Designer.

Report Designer Advance



Page
121


Report Scope

This report needs to be run straight after a payment run and it need the information for the Payment Table.
You have managed to get hold of a report that was built for another client and you will use this as your
basis for the clients report.

Solution

Open the Payment Listing Template from the Start folder and save it in My Reports folder
You will see that this template has had all the details removed and you will need to design the
template to the clients report layout.

Hints

Header

In the header all the controls were labels with static text in them. The only controls that will probably
cause some problems are the ones used to show the date. In the value expression for each control you will
need to use the following expression:

Day - format$(parmdSSDocumentDate, "dd")
Month - format$(parmdSSDocumentDate, "mm")
Period - format$(parmdSSDocumentDate, "yy")

Content

In the content the following columns need to display data:
Transaction Reference, Account Description, Account Code and Transaction Amount

Footer and After

Refer to the previous exercise on bought forward and carried forward balances.

The report layout should look like the example below.











Report Designer Advance



Page
122

11 Introduction to Documents
Objectives

By the end of this session, you will be able to:

Understand the basic set up of a:
Financial Document
Supply Chain Document
Identify the important areas on a document
Understand the layout and functionality of components within a document
11.1 Amend an existing document which has been created using a DSD Library
Report Designer Advance



Page
123
11.1 Introduction


In this session we will examine the layout of some existing documents that are available within version 5.
We will look at how the documents were created and how the user can change the layout of these
documents to incorporate the clients needs or specifications.

Version 5 comes with a range of reports and documents that have been created for the user. As with 4.2
users would use an existing report or document and change the layout to incorporate the businesses
requirements. The principle has not changed for version 5 reports and documents.

Users need to understand the differences between reports and documents before they attempt to change the
layout or these designs.

Reports Only extract data from the database. These are mainly listing report such as account listing,
journal listing, supplier listing etc.

Documents Will send data back to the database as well as extracting information. These can be Sales
orders, purchase orders, cheques etc.








































Report Designer Advance



Page
124
11.2 Financial Document layout

There are eight financial documents with version 5 each producing a different output. The first five
documents from the list of 10 are for single payments and the last five are for a normal payment run:

1. SAPDP_S1 Remittance Only
2. SAPDP_S2 Cheque only
3. SAPDP_S3 Remittance & Cheque
4. SAPDP_S3_Top Cheque & Remittance
5. SAPDP_S4 Remittance & Bank File
6. SAPDP1 Remittance Only
7. SAPDP2 Cheque only
8. SAPDP3 Remittance & Cheque
9. SAPDP3_Top Cheque & Remittance
10. SAPDP4 Remittance & Bank file

Note: The datasources for these financial documents have been created using DSD

All reports and documents can be found in the Example ReportSource folder within the SunSystems
directory.

For this part of the session we will be looking at the SAPDP3 (remittance & cheque) document and the
SAPDP1 (Remittance only). As these are the only types of financial documents that PKP World Wide
have used previously.

11.3 SAPDP3 Remittance & Cheque

We will examine the layout and structure for this document.

To open this document you must first have Report Designer open. Open the document so that it is
displayed on the screen. Your screen should look like the illustration below.

























You will notice that the Structure pane is minimized and should only be showing the following
components:
Report Designer Advance



Page
125











ReportTemplate This is the root of the report and it is where you specify the report Title as well as the
custom requester
Content - MainSequentialSection - A section that contains several frames, sub reports, or other sections
that display or print in a specified order.
Content - OSS2FrontPageReportSection This is the reports front page and displays the runtime
parameters relating to the report.
Content RemittanceAndCheques This is the main report design and holds all the components that
make up the remittance and cheque.
PageList TitleBodyPageList - This is where the page layout is specified for example where you want to
see the company logo, dates, page numbering etc appear.

If you expand the Content RemittanceAndCheque section we can examine further what each frame and
certain components are used for.

If you click on the plus sign next to the Content RemittanceAndCheques you should get a view similar to
the one below.

















You will now notice that within the Content RemittanceAndCheque Section you have more components.
These are:

DataStream Payment_Docment_CDR DataStream components are components that determine the
type of connection to the SunSystems 5 database that is used. In this document the Datastream has been
generated through Data Source Designer
Content PaymentDocument This is a group section that has been placed into report contents slot and
will determine how the contents are displayed.
After OSS1SectionSquential1 This Sequential section is in the after slot of the report and will only
carry out the conditions if there is no data found for the report.



Root
DataBase Connection
Front Page
Report Content
Page setup
DataStream
Group Section
Sequential Section
Report Designer Advance



Page
126
11.3.1 The Report Structure

You will notice that the structure of the Report has 3 group levels where the keys for the groups are set as
follows



























Group 1 Account Code This group will help identify what supplier code is being passed through from
the database.
Group 2 Currency Code This is a dummy group and is solely used to pass information to from hidden
components that are passing the totals for the supplier to the next group section.

Group 3 Currency Code - Once the Supplier code and total amount to be paid to that supplier has been
passed through it will then group on what currency code that Supplier is going to be paid in.

You will notice that the remittance has been designed in the final group section. Within the group section
the following frames have been used.












Page Header This is the remittance header.
Content Within the content section you have a conditional component, which has been used to identify
whether the amount is in Base or Transaction amount.
Footer This is the Cheque, which will appear at the end of each remittance.

Group 1 Account Code
Group 2 Currency Code, which is a
dummy group
Group 3 Currency Code
Remittance Header
Remittance Content
Remittance Footer
Report Designer Advance



Page
127

If you look over to the layout pane you will see the following.

11.3.2 Pageheader













Draft/Copy Labels These have conditional properties set which identify whether the document is being
run as Draft, Copy or final version. Depending on what the user enters as a runtime parameter determines
what label get printed.

Supplier Address Details - These details are picked up the supplier setup within SunSystems

Date Label and Data Showing date the remittance will be printed.

Supplier Code - These details are picked up the Chart of Accounts setup within SunSystems

Column Heading these are static labels that are linked to the Data Dictionary. All Label used in every
report/document have links to the data dictionary. This will allow the label as well as the data to change
language.

Own Address Based on a SQL Select statement returning the address where the address code is equal to
0000000.

Supplier Name - These details are picked up the supplier setup within SunSystems

11.3.3 Content

As mentioned before the content section has been built in a conditional section which is used to identify
whether the payment run has been generated in Base or Transaction Amount.













DataText Components These components are showing details such as Transaction Reference,
Transaction Date and Description from the Account details.

Supplier
Address details
Own Address Details
Draft/Copy Labels
Column Headings
Date Label and
Data component
Supplier Name
Supplier Code

This frame is used if its Base
Amount
This frame is used if its
Transaction Amount
Datatext Components
DataCurrency Controls
Report Designer Advance



Page
128
DataCurrency Controls The remittance has two of these controls where one is showing Debits and the
other is showing Credits. This has been achieved by using the conditional properties where one has been
set to show amounts less than 0 and the other greater than 0.
11.3.4 Footer

The footer on the remittance is the cheque part of the remittance.

















Total to be paid to Supplier This is the amount to be paid to the supplier the remittance is for.

Numbers to Words Data Components Each of these components use the Masking property. The
masking is based on 0 or 1 condition where 1 returns the value and 0 returns no value. And converts the
value to a word. For example:

The value 1234.56 would be masked as follows

Amount Mask Return Value
1234 1000 One (thousands)
1234 100 Two (Hundreds)
1234 10 Three (Tens)
1234 1 Four (units)

Void Labels There are a total of three void labels each having conditional properties set on them. The
table below shows what each label does:



Cheque Reference This is the where the cheque reference will appear. The cheque reference will only
appear if the remittance is printed as a final print.

Hidden Components The properties on these components have been set so that they do not show when
printing or viewing. They are used to gather and pass information to the final part of the Document.

The final part of the report structure before the printing takes place in the Sequential section, which
communicates back to the database.





Void label Condition Then
VoidAmtLabelNeg If value > 0 Hide
VoidAmtLabelDraft If Value = draft Hide
CalcGroupLastPage If Value = 1 Hide
Void Labels
Cheque Ref
Hidden Data
Components
Numbers to
Words Data
Components
Total to be paid
to supplier
Report Designer Advance



Page
129











Calling Stored Procedures In this conditional section you have three components that are used to
communicate back to the database. The three components are:

Component Name Column Updated
tablename "ACNT_PYMT_IFACE"
columnname "RPT_UNIQUE"
reportid Val(Payment_Documents_CDR::parmnIdentifier)

The actual stored procedure has been set at the frame level as it the data within the frame that will update
the table and columns within the database.

The stored procedure has been set to call at finish and is as follows:

ssp_del_rpt_unique (tablename, columnname, reportid)

Show Empty Report Section If no data is found for the payment run the a message of No Data in This
Report is shown on the first and only page of the report.































Calling stored procedures
Show Empty Report Messages
Report Designer Advance



Page
130



11.4 Amending A Cheque

In this section we will look at the principles of amending cheques and remittances. There are a few points
to consider, they are as follows.

1) The default printer which is used for cheque printing in the printer preference should be checked,
so that the page size is A4 and not any other custom setting. This will have an effect on your
calculations.

2) Open file C:\Program Files\SunSystems\ExampleReportSource\SAPDP3.rod
and SaveAs: Cheque1.rod in My Reports.

2) In our menu under View/Options/Units, make sure that Unit Display and Unit Recognition is set
to centimeters 2 decimal places, and from our menu under Tools/Page Setup, make sure that the
paper size is the correct height and width. For example our page height is going to be 29.7cm and
page width is going to be 21.0cm.

3) The top, bottom, left and right margins should be zero. This will enable us to measure from our
ruler, where each component will be placed.

4) There are three sections in this file where we make our amendments. They are:
a) Page Header This contains customer details.
b) Contents This contains transaction lines.
c) Page Footer This contains the cheque area.

5) Start by going into the Page Header section of your report and under Page Header properties
change the Height is 7.9cm and the Width is 21cm, then delete the components which you do not
need. The components that you do need, amend the x and y axis accordingly. (see over)

6) Next go into the Contents section of your report and under Contents Properties, change the Height
to 0.0 (This is so you can have the maximum transaction lines per cheque) and the Width to
21cms. Delete the components that you need, amending the x and y axis accordingly (see over)

7) The last section which needs to be amended is the Page Footer, again go into Report Footer
Properties and change the Height to 9.2cm and the Width to 21cm. In this section you must not
delete any components which you do not understand, some of them contain conditions. You can
however delete the obvious. Again amend the x and y axis accordingly. (see over)













Report Designer Advance



Page
131

Report Designer Advance



Page
132


Report Designer Advance



Page
133
11.5 Exercise 17 Creating the Remittance and Cheque Document

Objective

In this exercise you will create a Remittance and cheque document for PKP World Wide from a predefined
template.

The client has some pre printed stationery, which they would like to utilise as they have them in stock. A
copy of their previous remittance & Cheque is below

















































Report Designer Advance



Page
134
Solution

Open the Remittance_Cheque_Exercise.rod from the Start folder and save it into My Reports

The aim of this exercise is to allow you to understand what components are important to the final design
and components that can be left out of the design.

The template consists of three frames that have been added to the template each frame has been labelled to
enable you to create the areas of the remittance. The frames are:

Page Header
Content
After

When the template is open it should look like the one below.






























You will need to add the header, content and the rest of the Footer (Cheque) details.

Note: You will notice that certain frames on the template have some red components these components are
all important as should not be deleted.

Hints.

In the header section you will need to add some hidden parameter controls. These controls will be used to
group the document and show the labels Draft and Copy. These must be the first components that you set
up.
You will also need to add two label components one to say, DRAFT and the other to say COPY.
These components will need to have the conditional properties setup.


Report Designer Advance



Page
135
How to set up Hidden Parameter Controls

1. From the OSSMain library drag an OSS1DataTextControl and place it in the Header Frame.
2. Rename the Component DynamicGroupBy.
3. In the ValueExp Property type DynamicGroupBy. The value expression is looking at a hidden
parameter.
4. Set the Show When Printing and Show When Viewing properties to False
5. From the OSSMain library drag an OSS1DataTextControl and place it in the Header Frame.
6. Rename the Component DocumentType
7. In the ValueExp Property type parmstrSSDocumentType. The value expression is looking at a
hidden parameter.
8. Set the Show When Printing and Show When Viewing properties to False
9. From the OSSMain library drag an OSS1DataTextControl and place it in the Header Frame.
10. Rename the Component ReprintOption
11. In the ValueExp Property type parmstrSSReprintOption. The value expression is looking at a
hidden parameter.
12. Set the Show When Printing and Show When Viewing properties to False

On all three components set the background color property to Red.

How to set up the Draft and Copy label Controls

Setting up the Draft control:

1. From the OSSMain library drag an OSS1LabelTextDDControl and place it in the Header frame.
2. Rename the component Draft
3. The Properties should be set as below

Property Name Value
Conditional Class Name DocumentType
Conditional Data Type Number
Conditional Operator =
Conditional Range From 1
Conditional Then Hide
ValueExp DRAFT

4. From the OSSMain library drag an OSS1LabelTextDDControl and place it in the Header frame.
5. Rename the component Copy
6. The Conditional Properties should be set as below

Property Name Value
Conditional Class Name ReprintOption
Conditional Data Type Number
Conditional Operator =
Conditional Range From 0
Conditional Then Hide
ValueExp COPY
Once all the above controls have been set up you can start to design the document. This template will be
designed by using a DSD library. The library used is SAPDP.rol which is the standard one used in all the
financial documents. All the components are available in this library.

Once you have finished designing the report the Layout pane should look like the example below.
In the My Reports folder you have an TestCheque.XML file which you can use to test the document while
you design it.




Report Designer Advance



Page
136























The output should look like the example below



























Note: The above example is for reference if your report output looks nothing like the example then you
shouldnt worry.
11.6 SAPDP1 Remittance only

In this Session we will examine the layout and structure for this document.

Report Designer Advance



Page
137
To open this document you must first have Report Designer open. Open the document so that it is
displayed on the screen. Your screen should look like the illustration below.

























You will notice that the Structure pane is minimized and should only be showing the following
components:











ReportTemplate This is the root of the report and it is where you specify the report Title as well as the
custom requester
Content - MainSequentialSection - A section that contains several frames, sub reports, or other sections
that display or print in a specified order.
Content - OSS2FrontPageReportSection This is the reports front page and displays the runtime
parameters relating to the report.
Content Remittanceonly This is the main report design and holds all the components that make up the
remittance.
PageList TitleBodyPageList - This is where the page layout is specified for example where you want to
see the company logo, dates, page numbering etc appear.

If you expand the Content RemittanceOnly section we can examine further what each frame and certain
components are used for.

If you click on the plus sign next to the Content RemittanceOnlys you should get a view similar to the
one below.


Root
DataBase Connection
Front Page
Report Content
Page setup
Report Designer Advance



Page
138














You will now notice that within the Content RemittanceOnly Section you have more components. These
are:

DataStream Payment_Docment_CDR DataStream components are components that determine the
type of connection to the SunSystems 5 database that is used. In this document the Datastream has been
generated through Data Source Designer
Content PaymentDocument This is a group section that has been placed into report contents slot and
will determine how the contents are displayed.
After OSS1SectionSquential1 This Sequential section is in the after slot of the report and will only
carry out the conditions if there is no data found for the report.
11.6.1 The Report Structure

You will notice that the structure of the Report has 3 group levels where the keys for the groups are set as
follows



























Group 1 Account Code This group will help identify what supplier code is being passed through from
the database.

DataStream
Group Section
Sequential Section
Group 1 Account Code
Group 2 Currency Code
Report Designer Advance



Page
139
Group 2 Currency Code - Once the Supplier code and total amount to be paid to that supplier has been
passed through it will then group on what currency code that Supplier is going to be paid in.

You will notice that the remittance has been designed in the final group section. Within the group section
the following frames have been used.












Page Header This is the remittance header.
Content Within the content section you have a conditional component, which has been used to identify
whether the amount is in Base or Transaction amount.
After This is where the totals are placed, which will appear at the end of each remittance.

If you look over to the layout pane you will see the following.

11.6.2 Pageheader













Draft/Copy Labels These have conditional properties set which identify whether the document is being
run as Draft, Copy or final version. Depending on what the user enters as a runtime parameter determines
what label get printed.

Supplier Address Details - These details are picked up the supplier setup within SunSystems

Date Label and Data Showing date the remittance will be printed.

Supplier Code - These details are picked up the Chart of Accounts setup within SunSystems

Column Heading these are static labels that are linked to the Data Dictionary. All Label used in every
report/document have links to the data dictionary. This will allow the label as well as the data to change
language.

Own Address Based on a SQL Select statement returning the address where the address code is equal to
0000000.
Supplier Name - These details are picked up the supplier setup within SunSystems

Supplier
Address details
Own Address Details
Draft/Copy Labels
Column Headings
Date Label and
Data
Supplier Name
Supplier Code
Remittance Header
Remittance Content
Remittance After
Report Designer Advance



Page
140
11.6.3 Content

As mentioned before the content section has been built in a conditional section which is used to identify
whether the payment run has been generated in Base or Transaction Amount.










DataText Components These components are showing details such as Transaction Reference,
Transaction Date and Description from the Account details.

DataCurrency Controls The remittance has two of these controls where one is showing Debits and the
other is showing Credits. This has been achieved by using the conditional properties where one has been
set to show amounts less than 0 and the other greater than 0.

11.6.4 After

In the after you have another Conditional Section which is used to identify whether the payment
run has been generated in Base or Transaction Amount
































This frame is used if its Base Amount
This frame is used if its Transaction Amount
Data text
Components
Data Currency
Controls
Total to be paid
to supplier
Hidden Data
Components
Calling stored procedures
Report Designer Advance



Page
141






Calling Stored Procedures In this conditional section you have three components that are
used to communicate back to the database. The three components are:

Component Name Column Updated
tablename "ACNT_PYMT_IFACE"
columnname "RPT_UNIQUE"
reportid Val(Payment_Documents_CDR::parmnIdentifier)

The actual stored procedure has been set at the frame level as it the data within the frame that
will update the table and columns within the database.

The stored procedure has been set to call at finish and is as follows:

ssp_del_rpt_unique (tablename, columnname, reportid)

Show Empty Report Section If no data is found for the payment run the a message of No
Data in This Report is shown on the first and only page of the report.




































Show Empty Report Messages
Report Designer Advance



Page
142
11.7 Exercise 18 Creating the Remittance Document

Objective

In this exercise you will create a Remittance document that PKP World Wide would use to send to all the
Suppliers that are paid by BACs. We will be using a predefined template and try and create an output that
will be suitable to the client.

They have some idea of they would like to see on the remittance and have asked if it would be possible to
give them a draft output.

Solution

Open the Remittance_Template from the start folder and save it in My Reports.

Client requirements:

Header Details As per Remittance & Cheque document with the word Remittance changed to BACS
Remittance Advice
Content - As per Remittance & Cheque document.
After See below












When the template is open it should look like the one below.



11.8




















Total 12345.67
The total amount has been credited to your bank account as follows:
Account Name From Database
Bank Name From Database
Account Code From Database
Sort Code From Database

If you have any enquires please contact the Finance Dept on 01252551234 or contact
Jbloggs@PKPWorldwide .com
GBP
Report Designer Advance



Page
143
11.9 Sales Invoice Layout

The Sales invoice that we are going to look at has been compiled (designed) using Data Source Designer.
This means that when you open the document the library created in DSD will be available in the Library
Browser.

The document that we will look at is CDRSalesInvoice. Any Report Design (.ROD) that have the letters
CDR in the file name have all been created using Data Source Designer.

To open this document you must first have Report Designer open. Open the document so that it is
displayed on the screen. Your screen should look like the illustration below.

Before we start we want to save the report in My Reports as Client_Invoice.ROD


























As with the Financial document in the previous session the structure pane in minimized and only certain
components are displayed.









ReportTemplate This is the root of the report and it is where you specify the report Title as well as the
custom requester
Content - MainSequentialSection - A section that contains several frames, sub reports, or other sections
that display or print in a specified order.
Content - OSS2FrontPageReportSection This is the reports front page and displays the runtime
parameters relating to the report.
Content InvoiceDocument This is the main report design and holds all the components that make up
the Sales Invoice
Root
DataBase Connection
Front Page
Report Content
Page setup
Report Designer Advance



Page
144
PageList TitleBodyPageList - This is where the page layout is specified for example where you want to
see the company logo, dates, page numbering etc appear.
If you expand the Content Sales Invoice section we can examine further what each frame and certain
components are used for.

If you click on the plus sign next to the Content InvoiceDocument you should get a view similar to the
one below.
















DataStream SAPDPQuery DataStream components are components that determine the type of
connection to the SunSystems 5 database that is used, and the SQL select statement that is run against the
target database to return the data requested
Content OSS1SectionConditional1 This is a conditional section that has been placed into report
contents slot and will determine how the contents are displayed. The reason it is a conditional is because
the sales invoice will only print if certain conditions are met. For example is it a new invoice is it a reprint
After After-CallAtFinish This frame in the after slot of the report is needed as it calls some stored
procedures once the report has finished.

11.9.1 Making Changes to the Sales Invoice

The main areas that we will concentrate are those that can be changed to incorporate the users needs and
requirements. It will be possible for the user to change certain components within the design layout.

You will be shown how you can make the structure pane and the layout of the report easier to work with
and easier to understand.

As with any document in SunSystems you will always have information that you may not need in the final
output. This could be down to a variety of reasons such as:

1. Not part of client requirements
2. Client does not have all the modules used in Sales Order Processing

So we will look at what can be taken out that will not effect the final output i.e. making it more the client
specification.










DataStream
Conditional Section
Report After frame
Report Designer Advance



Page
145
PKP World Wide has given us a spec for the sales invoice and has made it clear that the only thing they
would raise an invoice for is Consultancy Services.

We will need to make some changes to the standard sales invoice and take information out that will never
be used by PKP World Wide.

11.9.2 Removing unwanted components

The first thing we will change is the component (Before OSS1SectionSequential1) from the structure
pane and place it in the Scratch Pad.

The Before OSS1SectionSequential1 allows you to bring in standard text paragraphs that may be used
for extra information to be displayed on the Sales invoice Header. PKP World Wide will not be using this
function.




















From the scratch pad we will need to drag the content InvoiceHeading frame and place it into the empty
Before slot of the Content OrderRefGroup.























Report Designer Advance



Page
146
If you look at the layout pane it should like the example below



























You will need to copy the labels and paste them into the Sales Invoice Before. This is so that you will have
labels on the first page of the sales invoice and then every page after that.

The Second thing we are going to do is remove another sequential section. From within the structure pane
extent the group section Content ItemGroup. You should see the sequential section as below.










We want to drag this component and drop it in to the Scratch Pad. If you still have the first sequential
section in the scratch pad then holding down the shift key down delete it out of the Scratch Pad.













Sales Invoice
Page Header
Sales Invoice
Before
Sales Invoice Page
Header Labels
Second sequential
section

Report Designer Advance



Page
147
We can delete the Frame PageHeader-ItemContinued as we will not be using it. We can also delete the
group section Content ItemCharGroup as this will not be used. We can also delete the conditional
section After SerialisedConditional in the After slot.

You will then need to drag the Content ItemDetail frame from with the Sequential Section that is in the
Scratch Pad and place it into the Content slot of the Group Section Content ItemGroup. The Structure
Pane and the Layout Pane should look like the example below.






























On the sales invoice we should only have the following sections:

Page Header Section
Before Section
Content Section
Page Footer
After Section

We will know look at each section so that you can understand what its purpose within the report design is.
More importantly we will look at what components you can and cannot delete.

PageHeader Section

This is the section of the report that will be displayed on every page but the first one. To make sure this
does not get shown on the first page the property ShowHeaderOnFirst for the Content
InvoiceDocument Report Section has been set to No Header on First.







Report Designer Advance



Page
148

The PageHeader section is mainly made up of Label and Data components.



















11.9.3 Before Section

This section will only appear on the first page of each customers invoice. This is because it has been
created in the before section of the Content - OrderRefGroup Group Section. The Key for this group
section has been set to Sales_Invoice_Header_Sales_Invoice_Id. The layout of this section is exactly the
same as the Page Header Section.

11.9.4 Content Section

This section will display each line detail for the sales invoice. It will only ever contain Data components.












The component that is used for the Unit Price value label is an OSS1DataDoubleControl. The component
used for the NET, VAT and Gross value labels is an OSS1DataCFCurrencyControl.
For the NET, VAT and Gross values the OSS1DataCFCurrencyControl has been used because these
values will be used to calculate carried forward and bought forward balances if the sales invoice runs over
more than one page.










Data
Components
Label
Components
Data components
showing Analysis
information
Data components
showing line
information
Value Labels:
Unit Price, Net
VAT & Gross.
Report Designer Advance



Page
149
11.9.5 PageFooter Section

The page footer section will appear on every page but the accept the last. This section will display the
page total, carried forward and brought forward balances.









11.9.6 After Section

The after section will always appear on the last page of the sales invoice. This section will calculate the
invoice totals.









11.9.7 Value Labels

We will now look at how the value labels are used in the sales invoice. The concept of the value labels
will be the same for any supply chain document and any financial document where the user may want to
see carried and brought forward balances on there documents.

There are five different types of components that are used. These are:

Component Type Section
OSS1DataCFCurrencyControl (Line Details) Content
OSS1CalcCurrencyPageTotalControl (Page Totals) Page Footer
OSS1CalcCurrencyBFControl (Brought Forward) Page Footer and After
OSS1CalcCurrencyCFControl (Carried Forward) Page Footer
OSS1DataCurrencyControl (Grand Total) After

















Page Total
Controls
Brought Forward
Controls
Carried Forward
Controls
Page Total
Controls
Brought Forward
Controls
Grand Totals
Report Designer Advance



Page
150
Each of these components will use different properties within them to display the values. The table below
shows which properties to use when setting up value labels.

Component Type Property Expression
OSS1DataCFCurrencyControl placed in
the Content Section.
ValueExp DataRow These would be the NET,
VAT and gross value labels from the
DSD Library.
OSS1CalcCurrencyPageTotalControl
Placed in the PageFooter and After sections
SourceControlClassName RootName::Frame::Component
RootName Name of highest
component within Structure Pane.
Frame Name of content frame where
the NET, VAT and Gross have been
placed.
Component Name of Component,
which will display the NET, VAT and
Gross Values.
OSS1CalcCurrencyBFControl
Placed in the PageFooter and After sections
SourceControlClassName Name of Component, which will
display the NET, VAT and Gross
Values
OSS1CalcCurrencyCFControl
Placed in the PageFooter Section
SourceControlClassName Name of Component, which will
display the NET, VAT and Gross
Values

SourceFrameClassName Name of Frame where component
which displays the NET, VAT and
Gross Values are placed
OSS1DataCurrencyControl ValueExp DataRow These would be the NET,
VAT and gross value labels from the
DSD Library.



Report Designer Advance



Page
152
11.10 Exercise 19 Changing Value Label on a Invoice
Objective

The aim of this exercise is to change the value labels on the original Sales Invoice to show transaction
values instead of base.

As with the old Report Definitions in 4.2 it was recommended that you take a copy of the document or
report that you wanted to change rather than trying to create a new one from scratch. This is again true
with Report Designer. It is recommended that you take a copy of an original document and then make the
changes to it.

Note: For the user to able to use the new report/document you will have to do the following actions:

Steps

1. The Data Source for this sales invoice was complied in Data Source Designer. You will need to open
the Data Source (.SRD) file in DSD and add the transaction value labels to the library. Make sure you
save the SRD and generate the library once you have made the changes.

2. For this exercise use the document CDRSalesInvoice which can be found in the examples folder
within the Report Source folder within the SunSystems directory.

3. Once you have opened the document save it in My Reports folder and call it Value_Label.ROD.

4. You will only need to change the value labels in the content section where the line details are shown.

5. Once you have made the changes to the value labels you will need to compile the Report. When it has
finished compiling.

6. Move the Value_Label.rox from My Reports folder and place it in the ExampleReports folder.

7. From within SunSystems run the Document Format Setup function.

8. Select the document format code SALINV and click OK

9. Click the amend button and change the Executable name from CDRSalesinvoice.rox to
Value_label.rox.

10. Once you have changed the Executable Name click OK.

11. You will now need to run a reprint of the Sales Invoice.

12. Run the Sales Inquiry (SQ) function within SunSystems

13. In the Control Desk enter INVOICE as the Filter Name and click Run

14. Set the Order status to Fully Invoiced and click OK

15. From the Sales Order control desk select a few lines and click Review

16. On the review selected items screen set the Program Name Field to print Sales Invoice and click OK.

17. On the next screen Document Format select View on the General tab and on the Document tab leave
as default and click OK.

18. You will notice Report manager minimised at the bottom of your screen.

The final output should look like the example below.
Report Designer Advance



Page
153





















































11.11 Exercise 20 - Creating the Sales Invoice for PKP World Wide

Objective

Report Designer Advance



Page
154
In this exercise you will create a sales invoice for PKP World Wide. The client has given us a copy of a
sales invoice they have created in their present system.

Looking at the example you will have to identify what data components must be used to display the right
data in the right sections
















































Starting from a predefined template you will need to recreate the sales invoice in Report Designer to meet
the client specifications.

Everything the client wants on the sales invoice can be achieved in Report Designer.

Solution:



Report Designer Advance



Page
155

From the start folder open the SalesInvoice_Template.rod and save it in My Reports. The template should
look like the example below.

























Once you have opened the template you will notice that the sections required to complete the sales invoice
have been added.

From the Examples folder within the Report Source folder you will need to open the CDRSalesInvoice.srd
in DSD and rename it to PKPSalesInvoice.srd then save and generate the library into the Library_SRD
folder within My Reports. You will then need to include the library PKPSalesinvoice.rol into your report
design.

Once you have included the library make sure you add the Datastream into the Structure Pane.

Once you have added the DataStream you can start to design the sales invoice for PKP World Wide.

Use the example sales invoice on the previous page as a guide.

Refer to notes in section 14.8 to help you understand how to build the sales invoice. You can also look at
the example sales invoice CDRSalesInvoice for reference.

Hint: Before you start designing the sales invoice you may want to create an XML file to use within
Report Designer.

The final report layout should look like the example on the next page.










Report Designer Advance



Page
156





















































11.12 Purchase Order Layout

The Purchase Order that we are going to look at has been compiled (designed) using Data Source
Designer. This means that when you open the document the library created in DSD will be available in the
Library Browser.
Report Designer Advance



Page
157

The document that we will look at is CDRPurchaseOrder. Any Report Design (.ROD) that have the letters
CDR in the file name have all been created using Data Source Designer.

To open this document you must first have Report Designer open. Open the document so that it is
displayed on the screen. Your screen should look like the illustration below.

Before we start we want to save the report in My Reports as Client_PO.ROD

























As with the Financial document in the previous session the structure pane in minimized and only certain
components are displayed.









ReportTemplate This is the root of the report and it is where you specify the report Title as well as the
custom requester
Content - MainSequentialSection - A section that contains several frames, sub reports, or other sections
that display or print in a specified order.
Content - ReportFrontPage This is the reports front page and displays the runtime parameters relating
to the report.
Content PurchaseOrder This is the main report design and holds all the components that make up the
Purchase Order
PageList TitleBodyPageList - This is where the page layout is specified for example where you want to
see the company logo, dates, page numbering etc appear.

If you expand the Content Purchase Order section we can examine further what each frame and certain
components are used for.

Root
DataBase Connection
Front Page
Report Content
Page setup

Report Designer Advance



Page
158
If you click on the plus sign next to the Content PurchaseOrder you should get a view similar to the one
below.
















DataStream Purchase_Order_Summary DataStream components are components that determine the
type of connection to the SunSystems 5 database that is used, and the SQL select statement that is run
against the target database to return the data requested
Content POTxnRefGroup This is the first group section in the structure pane and the key is set to
Purchase_Order_Header_Purchase_Order_Reference.

11.12.1 Making Changes to the Sales Invoice

The main areas that we will concentrate are those that can be changed to incorporate the users needs and
requirements. It will be possible for the user to change certain components within the design layout.

You will be shown how you can make the structure pane and the layout of the report easier to work with
and easier to understand.

As with any document in SunSystems you will always have information that you may not need in the final
output. This could be down to a variety of reasons such as:

1. Not part of client requirements
2. Client does not have all the modules used in Purchase Order Processing

So we will look at what can be taken out that will not effect the final output i.e. making it to the client
specifications.














PKP World Wide has given us a spec for the purchase order.

We will need to make some changes to the standard purchase order and take information out that will
never be used by PKP World Wide.
DataStream
First Group Section
Report Designer Advance



Page
159

11.12.2 Removing unwanted components

The first thing we will change is the component (Before FirstPageHeading) from the structure pane and
place it in the Scratch Pad.

The Before FirstPageHeading allows you to bring in standard text paragraphs that may be used for extra
information to be displayed on the Purchase Order Header. PKP World Wide will not be using this
function.
















From the scratch pad we will need to drag the content POHeading frame and place it into the empty
Before slot of the Content DelvAddrGroup.



















Next we want to expand the group Content POLHeadings as we want to remove another Sequential
section, which is used to display extra text on the line details.

When you expand this group section the structure pane should look like the example below.










Sequential section for extra
text on line details
Report Designer Advance



Page
160








We do not want this component in our final design so by holding the Shift key down press the delete key to
remove it from the structure pane.

We will also need to take all the components from the PageHeader_POLHeadings section and place them
at the bottom of the Before POHeading section.

We also want to take a group section out as we only want to group by purchase order number and purchase
order line number. We do not want to group by delivery address as it is not important for this client.

What you will need to do is drag the Content DelvAddrGroup from the structure pane and place it in the
scratch pad.













From the scratch pad we want to drag the Content POLineGroup group section and place it into the
empty content slot in the structure pane.

We will also need to drag the Before POHeading frame from the scratch pad and place it into the Before
slot of the Content POTxnRefGroup group section.

The final structure within the structure pane should like the example below.




















PO Ref Group
PO Heading
PO Line Group
PO Content
PO Page Totals
PO Totals
Report Designer Advance



Page
161
If you look at the layout pane it should like the example below






























On the purchase order we should only have the following sections:

Before Section
Content Section
Page Footer
After Section

We will know look at each section so that you can understand what its purpose within the report design is.
More importantly we will look at what components you can and cannot delete.

Before Section

This section will only appear on the first page of each suppliers purchase order. This is because it has been
created in the before section of the Content - POTxnRefGroup Group Section. The Key for this group
section has been set to Purchase_Order_Header_Purchase_Order_Reference.













Purchase Order
Content
Purchase Order
Header details
Purchase Order
Page Footer
Purchase Order
After
Report Designer Advance



Page
162
The Before section is mainly made up of Label and Data components.

















11.12.3 Content Section

This section will display each line detail for the purchase order. It will only ever contain Data
components.











The component that is used for the Unit Price value label is an OSS1DataDoubleControl. The component
used for the NET, VAT and Gross value labels is an OSS1DataCFCurrencyControl.
For the NET, VAT and Gross values the OSS1DataCFCurrencyControl has been used because these
values will be used to calculate carried forward and bought forward balances if the purchase order runs
over more than one page.
11.12.4 PageFooter Section

The page footer section will appear on every page but the accept the last. This section will display the
page total, carried forward and brought forward balances.

















Data
Components
Label
Components
Data components
showing Analysis
information
Data components
showing line
information
Value Labels:
Unit Price, Net
VAT & Gross.
Page Total
Controls
Carried Forward
Controls
Report Designer Advance



Page
163
11.12.5 After Section

The after section will always appear on the last page of the purchase order. This section will calculate the
purchase order totals.



11.12.6 Value Labels



We will now look at how the value labels are used in the sales invoice. The concept of the value labels
will be the same for any supply chain document and any financial document where the user may want to
see carried and brought forward balances on there documents.

There are five different types of components that are used. These are:

Component Type Section
OSS1DataCFCurrencyControl (Line Details) Content
OSS1CalcCurrencyPageTotalControl (Page Totals) Page Footer
OSS1CalcCurrencyBFControl (Brought Forward) Page Footer and After
OSS1CalcCurrencyCFControl (Carried Forward) Page Footer
OSS1DataCurrencyControl (Grand Total) After

Each of these components will use different properties within them to display the values. The table below
shows which properties to use when setting up value labels.

Component Type Property Expression
OSS1DataCFCurrencyControl placed in
the Content Section.
ValueExp DataRow These would be the NET,
VAT and gross value labels from the
DSD Library.
OSS1CalcCurrencyPageTotalControl
Placed in the PageFooter and After sections
SourceControlClassName RootName::Frame::Component
RootName Name of highest
component within Structure Pane.
Frame Name of content frame
where the NET, VAT and Gross have
been placed.
Component Name of Component,
which will display the NET, VAT and
Gross Values.
OSS1CalcCurrencyBFControl
Placed in the PageFooter and After sections
SourceControlClassName Name of Component, which will
display the NET, VAT and Gross
Values
OSS1CalcCurrencyCFControl
Placed in the PageFooter Section
SourceControlClassName Name of Component, which will
display the NET, VAT and Gross
Values

SourceFrameClassName Name of Frame where component
which displays the NET, VAT and
Gross Values are placed
OSS1DataCurrencyControl ValueExp DataRow These would be the NET,
VAT and gross value labels from the
DSD Library.





Page Total
Controls
Grand Totals
Report Designer Advance



Page
164
11.13 Exercise 21 Creating the Purchase Order for PKP World wide

Objective

In this exercise you will create a purchase order for PKP World Wide. The client has given us a copy of a
purchase order they have created in their present system.

Looking at the example you will have to identify what data components must be used to display the right
data in the right sections
















































Starting from a predefined template you will need to recreate the purchase order in Report Designer to
meet the client specifications.
Report Designer Advance



Page
165

Everything the client wants on the purchase order can be achieved in Report Designer.

Solution:

From the start folder open the PurchaseOrder_Template.rod and save it in My Reports. The template
should look like the example below.

























Once you have template open you will notice that the sections required to complete the sales invoice have
been added.

From the Examples folder within the Report Source folder you will need to open the
CDRPurchaseOrder.srd in DSD and rename it to PKPPurchaseOrder.srd then save and generate the library
into the Library_SRD folder within My Reports. You will then need to include the library
PKPPurchaseOrder.rol into your report design.

Once you have included the library make sure you add the Datastream into the Structure Pane.

Once you have added the DataStream you can start to design the sales invoice for PKP World Wide.

Use the example sales invoice on the previous page as a guide.

Refer to notes in section 14.8 to help you understand how to build the sales invoice. You can also look at
the example purchase Order CDRPurchaseOrder.rod for reference.

Hint: Before you start designing the Purchase Order you may want to create an XML file to use within
Report Designer.

The final report layout should look like the example on the next page.







Report Designer Advance



Page
166




11.14 Debtor Statement Layout

The Debtor Statement that we are going to look at has been compiled (designed) using Query Editor. This
means that when you open the document there is no library that has been created in DSD available.

The document that we will look at is SAADPBase.rod.

To open this document you must first have Report Designer open. Open the document so that it is
displayed on the screen. Your screen should look like the illustration below.

Before we start we want to save the report in My Reports as Client_Statement.ROD
























As with the Financial document in the previous session the structure pane in minimized and only certain
components are displayed.









ReportTemplate This is the root of the report and it is where you specify the report Title as well as the
custom requester
Content - MainSequentialSection - A section that contains several frames, sub reports, or other sections
that display or print in a specified order.
Content OSS2FrontPageReportSection This is the reports front page and displays the runtime
parameters relating to the report.
Content AccountDocumentsBase This is the main report design and holds all the components that
make up the statement
Root
DataBase Connection
Front Page
Report Content
Page setup
Report Designer Advance



Page
167
PageList TitleBodyPageList - This is where the page layout is specified for example where you want to
see the company logo, dates, page numbering etc appear.

If you expand the Content AccountDocumentsBase we can examine further what each frame and certain
components are used for.
If you click on the plus sign next to the Content AccountDocumentsBase you should get a view similar
to the one below.














You will now notice that within the Content AccountDocumentsBase section you have more
components. These are:

DataStream SAADPQuery DataStream components are components that determine the type of
connection to the SunSystems 5 database that is used. In this document the Datastream has not been
generated through Data Source Designer
Content AccountDocument This is a group section that has been placed into report contents slot and
will determine how the contents are displayed.
After OSS1SectionSquential1 This Sequential section is in the after slot of the report and will only
carry out the conditions if there is no data found for the report.

If we expand the Content AccountDocument section, which is the first, and only group section within
this report design you will see the required frames to make up the statement.












If you click on the SQL icon on the main toolbar it will bring up the database login dialog box. The user
name is SUN and the password is SUNSYS.

You should now have access to the Query Editor module within report designer. The screen should look
like the example on the next page.

Note: Refer to the section on Query Editor for more info.






DataStream
Group Section
Sequential Section
Page Header
Content
After Section
Group Section
Report Designer Advance



Page
168






























If you click on the SQL icon it will take you back to the design editor.

The final report design should only have the following sections:

Page Header
Content
After

We will now examine each section in more detail.

11.14.1 PageHeader

This section of the report design will display all the address details for the client and also for the customer.













The client address details are using a SQL select statement to return the information required.


Company
address lines
Customer
address
Label
Components
Data
Components
Report Designer Advance



Page
169
Note: It is now possible to use a predefined component from the OSSMain library that will return the
address details in one component rather that having one component for each line. This component it called
OSS1CompanyAddress.

11.14.2 Content

The content section will display line details as with any document that has been created in Report Designer






11.14.3 After

The after section will display what is over due for payment by 30, 60 and 90 days and will also give you a
grand total for the statement.








11.14.4 How does it calculate the number of days?

The way the days are calculated is very simple. The first thing the data component needs to identify is the
starting date from when it needs to work backwards from. This has been picked up from a set parameter
from within the report design.

The table below details the Boolean expression that is required to work out the value.

Number of
days
Boolean expression
Current Sum(([DEM_V_PYMT_OR_RCPT.AMOUNT])*((parmdSSDocumentDate-
[DEM_V_PYMT_OR_RCPT.DUE_DATETIME]<30)OR(IsNull([DEM_V_PYMT_O
R_RCPT.DUE_DATETIME]))))Group By(
[DEM_V_PYMT_OR_RCPT.ACCNT_CODE] )
30 days Sum(([DEM_V_PYMT_OR_RCPT.AMOUNT])*(parmdSSDocumentDate-
[DEM_V_PYMT_OR_RCPT.DUE_DATETIME]>=30)*(parmdSSDocumentDate-
[DEM_V_PYMT_OR_RCPT.DUE_DATETIME]<60))Group By(
[DEM_V_PYMT_OR_RCPT.ACCNT_CODE] )
60 days Sum(([DEM_V_PYMT_OR_RCPT.AMOUNT])*(parmdSSDocumentDate-
[DEM_V_PYMT_OR_RCPT.DUE_DATETIME]>=60)*(parmdSSDocumentDate-
[DEM_V_PYMT_OR_RCPT.DUE_DATETIME]<90))Group By(
[DEM_V_PYMT_OR_RCPT.ACCNT_CODE] )
90 days Sum(([DEM_V_PYMT_OR_RCPT.AMOUNT])*(parmdSSDocumentDate-
[DEM_V_PYMT_OR_RCPT.DUE_DATETIME]>=90))Group By(
[DEM_V_PYMT_OR_RCPT.ACCNT_CODE] )

Note: The datarows will have to be replaced if the statement was to be designed using Data Source
Designer.





Data
Components
DataCurrency
Components showing
Debit and credit values
30, 60 and 90-
day data
components
Grand Total
Report Designer Advance



Page
170



11.15 Execise 22 Creating a Debtor Statement for PKP World Wide

Objectives

The client has seen a copy of the example statement and is more then happy to use this as a basis. They
only have a view change requests, which are mainly to do with cosmetic look of the statement.

They have also supplied a mock up to be used as a starting point.

















































Report Designer Advance



Page
171


Client Specification

1. Change the font size to 10
2. Add the company logo
3. Remove the parameters page
4. Suppress unused address lines They would like blank address lines suppressed within the
header.
5. Change the pagelist to hold a body page only.

Solution

Open the Statement_Template from the start folder. Save the report in My Reports. Once you have this
design open it should look like the example below.

























You will notice that the template is a copy of the example statement available in SunSystems.

You will need to change the look of this statement to incorporate the clients requirements.

Hints.

1. You will need to add the OSS1CompanyAddress component from the OSSMain library to replace
the company address.
2. You will also need to refer to section 19.2 Addresses excluding blank lines to understand how
set up the component.
3. In the Start folder within my reports you should have a word document, which has the Boolean
expression in it.
4. Copy this expression from the word document and place it into the ValueExp property of the text
component, which is to be used as the customer address.

The final report layout should look like the example on the next page.



Report Designer Advance



Page
172




























































Report Designer Advance



Page
173



11.16 Dunning Letter Layout

Unfortunately there is not an example dunning letter which goes out with SunSystems. This report will
have to be created using the report design that is used for the Statement.

The basis for a dunning letter structure is exactly the same as the structure for the statement. We will have
to make some major changes to the statement to make sure it can be used as a dunning letter.

The client has provided us with a letter they would usually have created in Word. They would like this as
part of a system process.













































Report Designer Advance



Page
174




11.17 Exercise 23 Creating a Dunning Letter for PKP World Wide

Objectives

You will have to create a dunning letter from a predefined template. The dunning letter will be created
using Query Editor as the example statement has been created using Query Editor.

Open the Statement_Template.rod from the Start folder and save it in My Reports. Once you have the
report open it should look like the example below.

























From this template you will have to create the dunning letter.

Solution

1. Use the example supplied by the client as a reference.
2. You will only need to use two sections for the dunning letter. The sections that you will need are:

a. Before
b. After

3. Change the font size to 10
4. Add the company logo
5. Remove the parameters page
6. Suppress unused address lines They would like blank address lines suppressed within the
header.
7. Change the pagelist to hold a body page only.




Report Designer Advance



Page
175


Hints

1. You will need to add the OSS1CompanyAddress component from the OSSMain library to replace
the company address.
2. You will also need to refer to section 19.2 Addresses excluding blank lines to understand how
set up the component.
3. In the Start folder within my reports you should have a word document, which has the Boolean
expression in it.
4. Copy this expression from the word document and place it into the ValueExp property of the text
component, which is to be used as the customer address.

The final report layout should look like the example below.













































Report Designer Advance



Page
176


12 Component Functionality

12.1 Objectives

By the end of this session you will be able to:

Understand the Component Functionality

Understand how to Calculate Percentages

Display Numbers to Words

Display an amount in a sentence format

Format numbers to decimal places

Create Page Numbering






































Report Designer Advance



Page
177

12.2 Calculating Percentages
12.2.1 Overview

Often a value needs to be displayed in the report that is a percentage of another value/values. For example,
the market share of a product displayed as percentages. Properties have been added to make the
implementation slightly easier.

Related PercentageNumerator
Properties: PercentageDenominator

APPLY TO:
OSS1DataDoubleControl

OSS1DataIntegerControl

12.2.2 How to Use

The OSSDataDoubleControl and OSSDataIntegerControl component contains functionalities that calculate
percentages from other value(s) in other controls in the same frame.

To use this control, the PercentageNumerator and PercentageDenominator properties must be set. The
formula for working out the percentage is as follows:





12.2.3 PercentageNumerator / PercentageDenominator Properties

The following values can be specified in the PercentageNumerator and PercentageDenominator properties:
1. A column in a table in the database. Syntax: [TableName.ColumnName]. The table and column
must be specified in the data stream in the report section. Data would then be retrieved from the
database.
2. Name of a control in the same frame. Syntax: ControlName or Me for the control itself. Data
would then be retrieved from the controls datavalue.
3. A numeric value.

The percentage would then be displayed. Use the Format property to change the number of decimal
places displayed in the control.
Example
The best way to describe how this works is by example. Suppose that a report is written to show all the
different packs of nails are sold in a DIY shop:

Description Price Each Units Sold
Nails A 50 pack 2 200
Nails A 200 pack 6 150
Nails A 500 pack 10 50
Total Number of Packs Sold: 400

However, this report needs to show the proportion of 50 pack, 200 pack and 500 pack are sold in
relation to the total. i.e.



Before/PageHeader Frame
Contents Frame
After Frame
value returned by PercentageNumerator
value returned by PercentageDenominator
x 100
Report Designer Advance



Page
178


Description Price Each Units Sold Percentage Sold
Nails A 50 pack 2 200 50.00%
Nails A 200 pack 6 150 37.50%
Nails A 500 pack 10 50 12.50%
Total: 400 100.00%

To do this, a hidden control is needed:

Description Price Each Units Sold Percentage Sold Total Sold
Nails A 50 pack 2 200 50.00% 400
Nails A 200 pack 6 150 37.50% 400
Nails A 500 pack 10 50 12.50% 400
Total: 400 100.00%





12.2.4 To calculate the total in the content frame

As an example, the number of units sold per type is stored in the Item table and the UnitsSold column in
the database. To calculate the total sold, specify in the ValueExp of the hidden control the value: Sum
([Item.UnitsSold]) Overall. The Overall command forces Actuate to calculate the aggregate
immediately.

12.2.5 To hide the control

This can be done by making it a conditional control. To do this, set the ConditionalClassName
property of the control to be Me, the ConditionalFrom property to be True and
ConditionalThen to be Hide. This will hide the control. For more details on conditional controls
please see Chapter 4 - Conditional Controls.

12.2.6 To work out the percentage sold for each type of product

1. Drag a double control (OSSDataDoubleControl) from OSSMain.rol for use as the PercentageControl.
2. Set the PercentageNumerator property of the control to be the name of the control that displays the
number of units sold per type of product.
3. Set the PercentageDenominator property of the control to be the name of the control that displays the
total number of units sold per type of product.
4. Change the format of the control if necessary to display the correct number of decimal places.














Hidden control in the
content frame to store the
total number sold
Report Designer Advance



Page
179
12.3 Displaying Numbers as Words

12.3.1 Overview

This functionality allows numbers to be displayed in reports using words for each of the units. For
example, the number 123.456 would appear as One Two Three Point Four Five Six. It can also be used for
displaying single digits of a number, so each unit could be a different control. This is useful when digits
need to be positioned individually, for example in printing cheques.

Note: This is not the same as displaying numbers as sentences.

12.3.2 How it works

There is a property called NumberToWords on each of the numeric controls. If this is set to True, the
number will be displayed using words for each digit. A second property, Mask, is used to specify how the
number should appear.
The number strings are stored in the SunSystems Data Dictionary, and will be translated into the
appropriate language for printing.

12.3.3 Report Developer Considerations

Mask

This property allows the report developer to specify which parts of the number to display. It should be
entered as a combination of the characters 1, 0, # and a single decimal point (.), where:

1 Always return a value, even if the value is zero
0 Return nothing
# - Return zero if the value is zero, but only after a non-zero value

Example 1: To display 123.456 as One Two Three Point Four Five Six
Mask: ###.### or 111.111

Example 2: To display 123.456 as Zero Zero One Two Three Point Four Five Six Zero Zero
Mask: 11###.###11 or 11111.11111

Note: The use of 1 means that a zero is used to pad out the number to the required length


Example 3: To display 123.456 as One Two Three

Mask: ### or 111

Note: If the number string does not include whole numbers and decimals, the decimal point does not
appear.

Example 4: To display 123.456 as Zero One Two Three Point Four Five in separate fields (for cheque
printing)

Thousands
Field
Hundreds Field Tens Field Units Field Tenths Field Hundredths
Field
Mask: 1000 Mask: 100 Mask: 10 Mask: 1 Mask: .1 Mask: .01
Value: Zero Value: One Value: Two Value: Three Value: Four Value: Five

12.4 Display Amount in Sentences

Report Designer Advance



Page
180
12.4.1 Introduction

This functionality allows numbers to be displayed in reports using sentences. For example, the number 16
would appear as Sixteen.

Note: This is not the same as displaying numbers as words.

12.4.2 How to use Number to Sentences

There is a property called NumbersToSentence on each of the numeric controls. If this is set to True, the
number is displayed using a sentence. A second property NumbersToSentenceCurrencySource decides
which Currency the amount is in. The third property NumbersToSentenceUseSubUnit, decides how the
decimal aspect is to be printed.
The information is stored in the SunSystems Data Dictionary, and is translated into the appropriate
language for printing.

12.4.3 Setting up the Control

In order to enable the printing of Amounts as Sentences, the property NumbersToSentence needs to be set
to True. The Control itself needs to be made big enough to accommodate the largest sentence possible.

The property NumbersToSentenceCurrencySource must be set to one of three values, "Value1", "Value3",
and the relevant Table.Column name.

Here is a list of how the values might be used in a report.

For a value required in the Base Currency, type "Value1" in the NumbersToSentenceCurrencySource.

For a value required in the Reporting Currency, type "Value3" in the NumbersToSentenceCurrencySource.

For a value required in the Transaction Currency, find the relevant Table/View.Column name which
indicates the currency for that data row. For example:
For a report based on the view PKP_V_LDG_ARC_UNION, this string may well be used in the
NumbersToSentenceCurrencySource. PKP_V_LDG_ARC_UNION.CONV_CODE"

The report works out the currency type for the transaction it is working on at the time. Do not use quotes.

The property NumbersToSentenceUseSubUnit is used to control how the Decimal aspect is printed. If it
set to False, then the decimal appears as the digit divided by 100 (i.e. 16.25 appears as "Sixteen Pounds
And 25/100" for Currency GBP). If the value is set to True, it appears with just the number (i.e. 16.25
appears as "Sixteen Pounds And 25 Pence" for Currency GBP).








12.5 Exercise Amount to Sentence

Objective

In this exercise you have been asked by the client to produce a Remittance and Cheque where the amount
on the cheque is shown in a sentence format. They want to have a look at what this document will look
Report Designer Advance



Page
181
like. They have agreed that this is outside the scope of the project and have agreed an extra 2 days to
design this document.

Solution

As we have already designed a Remittance and cheque document we have our work cut out for us.

Open the exercise Number to sentence Rem_Chq template.
You will have to delete all the amount controls except for one control.
This control will be used to display the amount in sentence format

The final Report layout should like the example below.








































12.6 Formatting numbers Decimal Places
12.6.1 Overview

The number of decimal places to be displayed for each numeric control in a report can be defined in a
number of ways:


Report Designer Advance



Page
182
1. Value1
If the DecimalPlaceSource property of the control is <blank> or set to Value1, the number will be
displayed with the base number of decimal places.
2. Value3
If the DecimalPlaceSource property is <blank> or set to Value3, the number will be displayed with
the second base, or reporting number of decimal places.
3. Datarow Variable
If anything other than <blank>, Value1 or Value3 is entered in the DecimalPlaceSource property,
it is assumed to be the name of a variable within the datarow. If the string in DecimalPlaceSource
matches with the name of a numeric column in the datarow then the value in this column is used as the
number of decimal places to display for the current row only.
4. Format
If the Format property of a component is set, this takes precedence over any value in the
DecimalPlaceSource property, so formatting is applied as normal.

12.6.2 How it works

The base and second base numbers of decimal places are stored in the database definition on the
SSINSTAL table. The first time either of these values are required, i.e. when a control has
DecimalPlaceSource set as above, these values are retrieved from the database and put into global
variables to be used throughout the report. In the BuildFromRow method is a call to a new method,
SetDecimalFormat. SetDecimalFormat will retrieve the number of decimal places required from either the
datarow or the global variables (populating them first if required), and generates a format string with the
correct number of decimal places, which is placed in the property DecimalFormat.
When the report is viewed, the method GetText is called to supply the text that should be displayed. If
DecimalFormat has been set, the format is applied to the text returned, setting it to the correct number of
decimal places.
1.1.1.1 Report Developer Considerations
If DecimalPlaceSource is not found as a datarow variable, no format is applied to the number, so the
precision will be shown as whatever is stored in the database.
















12.7 Page Numbering
12.7.1 Overview

Without setting any properties for page numbering, the pages will be numbered from 1 to n (where n is the
number of pages). If the front page is printed, it does not have a page number displayed, and the first
body page will be number 2. By using the settings described below, the behaviour of page numbering can
be adjusted.
Report Designer Advance



Page
183
1.1.1.2 PageList Component PageNumberControlName property
If this is set to the name of the component which displays the page numbers (e.g.
A4PortraitPageNumTextControl), the SunSystems page numbering is activated, and page numbers will be
displayed in the format specified in the PageNumberFormat property on the PageList component (e.g.
Page n of nn). If a front page is printed, it will not be included in the total number of pages, and the first
body page will be number 1 of nn (where nn is the number of body pages).
1.1.1.3 Group Section ResetPageNum property
If this is set to true, the page number is reset for each group. If a report has more than one body section,
both sections must have groups, which reset the page numbering.
1.1.1.4 Page/Line Numbering within Frame
If you want to print the page number within a frame, you must do the following:

Use the OSS1DataIntegerControl and assign it the ValueExp of g_intPageNumber
ResetPageNumbering to True on the SectionGroup
ResetLineNumberBy to be set to either GROUP or PAGE at the highest SectionGroup level.

If you want to print the Line number within a frame, you must do the following:

ResetPageNumbering to True on the SectionGroup
ResetLineNumberBy to be set to either GROUP or PAGE at the highest SectionGroup level. If
set to GROUP it will start the line number range on change of the Key field. If PAGE, then every
page will have a new line count.
Use the control OSS1CalcLineNumberControl. Everything else will be handled.

12.8 Analysis Components

12.8.1 Overview

These components can be used to retrieve aggregate information for the report (e.g. year to date figures).

Related AnalysisAggregate Function
Properties: AnalysisValueDatabase Column
AnalysisValueDatabase Table
AnalysisLink1ClassName
AnalysisLink1Database Column
AnalysisLink2ClassName
AnalysisLink2Database Column
AnalysisCalculationType
AnalysisDate
AnalysisDateDBColumn
AnalysisDateOffset
AnalysisDateOffsetUnit
AnalysisDateUnit
AnalysisReportBaseDate
AnalysisToDateUnit
AnalysisCondition1
AnalysisCondition2
AnalysisCondition3
AnalysisCondition4
AnalysisCondition5


APPLY TO:
OSS1AnalysisBasicControl (first 7 properties shown above)
OSS1AnalysisTimeControl (first 14 properties shown above)
Report Designer Advance



Page
184
OSS1AnalysisTimePlusControl (all properties shown above)

12.8.2 How to use

The different sections outlined below have a cumulative effect. The Basic Properties must be filled in.
The other three sections outlined below are optional, and can be used to restrict the data being returned.
Examples of how to set up some of these components are included in the Notes section.

12.8.3 Basic Properties (MANDATORY)
Available on:
OSS1AnalysisBasicControl, OSS1AnalysisTimeControl, OSS1AnalysisTimePlusControl:

Property Name Property Description Property Values
AnalysisAggregate Function Whether you want to return a sum of
amounts, a count or min/max. Default is
sum.
Count (report designer must delete
currency from the Format property to
display as an integer)
Max
Min
Sum
AnalysisValueDatabase
Column
Database Column to be summarised on the
report.
e.g. AMOUNT
AnalysisValueDatabase
Table
Table/view containing the
AnalysisValueDatabaseColumn.
e.g. ZZZ_Z_SALFLDG


12.8.4 Linking the aggregate data to fields on the report
These properties restrict the data returned in accordance with components on the report. Two links are
provided between components on the report (class names) and columns in the database. Both properties
of a link must be set up in order for it to work.
Available on:
OSS1AnalysisBasicControl, OSS1AnalysisTimeControl, OSS1AnalysisTimePlusControl:

Property Name Property Description Property Values
AnalysisLink1ClassName Component on the report which you want to
use to restrict data for the aggregate. The
value from this component is added to the
where clause.
e.g. ACCNTCODEControl
AnalysisLink1Database
Column
(linked to AnalysisLink1ClassName). e.g. ACCNT_CODE
AnalysisLink2ClassName Second component on the report which you
want to use to restrict data for the aggregate.
The value from this component is added to
the where clause.
e.g. TCodeControl
AnalysisLink2Database
Column
(linked to AnalysisLink2ClassName). e.g. T1


12.8.5 Date Manipulation:
These properties restrict the data being returned in accordance with time. Leaving the
AnalysisDateDBColumn blank will prevent the time factor from being used.
Available on:
OSS1AnalysisTimeControl, OSS1AnalysisTimePlusControl:

Property Name Property Description Property Values
AnalysisCalculationType Movement (all transactions during the
specified time period), Balance (total of all
movement
balance
Report Designer Advance



Page
185
transactions at a point in time) or ToDate
(transactions during a specified time frame
(e.g. year) up to and including the specified
date). Forecast takes a ToDate calculation
and forecasts it to the end of the
ToDateUnit (e.g. forecasts to the end of the
year).
todate
forecast
AnalysisDate Date on which to base the analysis. (see
also AnalysisReportBaseDate)
01/01/1991 (date)
1991001 (period)
LabelControl7 (class name)
AnalysisDateDBColumn Corresponding column on the database
(linked to AnalysisDate).
e.g. PERIOD
AnalysisDateOffset Used to get this period last year etc. e.g. 1 to use the previous, or 1
to use the next
AnalysisDateOffsetUnit (linked to AnalysisDateOffset). e.g. year.
Allowable values depend on the
AnalysisDateUnit. If the
AnalysisDateUnit is DATE,
then the
AnalysisDateOffsetUnit can be
YEAR, QUARTER, MONTH,
DAY, WEEK. If the
AnalysisDateUnit is PERIOD,
then the
AnalysisDateOffsetUnit can be
YEAR, PERIOD.
AnalysisDateUnit (linked to AnalysisDate). Describes the AnalysisDate:
e.g. PERIOD or DATE.
AnalysisReportBaseDate Linked to AnalysisDate When no AnalysisDate is
specified, then we use the Date
specified here. This is to enable
using a parameter date to
specify a date
AnalysisToDateUnit Required if using an
AnalysisCalculationType of ToDate.
Allowable values depend on the
AnalysisDateUnit. If the
AnalysisDateUnit is DATE,
then the AnalysisToDateUnit
can be YEAR, QUARTER,
MONTH. If the
AnalysisDateUnit is PERIOD,
then the AnalysisToDateUnit
can be YEAR.
12.8.6 Additional Conditions:
These properties can be used to impose additional restrictions on the data being returned.
Available on:
OSS1AnalysisTimePlusControl:

Property Name Property Description Property Values
AnalysisCondition1 Additional condition to be added to the
where clause.
e.g. D_C = D
AnalysisCondition2 Additional condition to be added to the
where clause.
e.g. ROUGH = Y
AnalysisCondition3 Additional condition to be added to the
where clause.
e.g. STATUS < 2
AnalysisCondition4 Additional condition to be added to the
where clause.
e.g. ALLOCN = A
AnalysisCondition5 Additional condition to be added to the
where clause.
e.g. CURR = GBP
Report Designer Advance



Page
186


12.8.7 Cross Business Unit Comparisons
Cross Business Unit comparisons are possible. Use the ExecuteSQLBUOverride property to specify
which Business Unit you want the Analysis Component to act upon. Leave the ExecuteSQLBUOverride
blank to act upon the Business Unit specified in the standard Business Unit Code
(parmstrSSBusinessUnitCode) parameter.

12.8.8 Further Data Manipulation Using the ValueExp
leave blank (as default) - just the value obtained from the database
"Max Periods: " & (datavalue) - string concatenation
DataValue + (DataValue/10) - this adds on 10%

12.8.9 Examples

Two examples of setting up Analysis Components are described below:

12.8.10 Example 1













1. Subclass of OSS1AnalysisBasicControl

1
3 2
DboSSRFACCACCNTCODEControl
Report Designer Advance



Page
187


2. Subclass of OSS1AnalysisTimeControl



2. Subclass of OSS1AnalysisTimeControl
(as 1 but with the AnalysisCalculationType set to balance)





Report Designer Advance



Page
188
12.8.11 Example 2







1. Subclass of OSS1AnalysisTimeControl



2. Subclass of OSS1AnalysisTimeControl
(as 1 but with the AnalysisAggregate set to COUNT)
(the format property has been changed from currency to blank)

3,4. Subclass of OSS1AnalysisTimePlusControl
(as 2 but with the AnalysisCondition1 set to D_C = 'D and D_C = 'C' respectively)

5,6. Subclass of OSS1AnalysisTimeControl
(as 1 but with the AnalysisAggregate set to MAX and MIN respectively)
1 2 3 5 6 4
Report Designer Advance



Page
189
13 Summaries Based on Another Column (OSS1CalcBreakOutTotalControl)

13.1 Overview

This is used to display totals based on another column (e.g. total of amounts by currency, or by an analysis
code). It is only applicable to headers and footers.
Used with an OSS1DataTextControl, it creates an alphabetically sorted list of codes, and displays the totals
next to each code.

To use the OSS1CalcBreakOutTotalControl you must ensure that the following properties within the
properties dialog box have been used and the information within each property is correct.

SummaryBreakOutField
SummaryIgnoreZero
SummaryLabelClassName
SummaryRepeatDirection
ValueExp

How to use the Summary Properties

Property Name Property Description
SummaryBreakOutField The name of the datarow variable (field) which you want the
summary broken out by (e.g. currency code). These codes will be
displayed through the control referred to in the
SummaryLabelClassName.
SummaryIgnoreZero Whether to include data rows where the value to be summarised is
zero or null.
SummaryLabelClassName The name of the OSS1DataTextControl which will display the codes
found in the SummaryBreakOutField.
SummaryRepeatDirection Specifies the direction in which the extra controls to display the
values will be created. Set to 'horizontal' for left to right, or 'vertical'
for top downwards.
ValueExp The name of the datarow variable (field) which is to be summed.
These values will be displayed through the
OSS1CalcBreakOutControl. You can use the expression builder to
create more complex expressions. Do NOT add sum() to the
expression. The addition will be done by the component.

Report Designer Advance



Page
190



























13.2 Setting up the Controls

Put an OSS1CalcBreakOutControl into a header or footer frame on a report. This control will be used to
display the summary value(s). An OSS1DataTextControl will also need to be placed on the report to hold
the codes for the totals (e.g. currency codes). Only one of each of these controls is needed on the report
design, because extra controls will be created dynamically to display the necessary information. The
relative positioning of these two controls will depend on whether you want the controls to be created
horizontally or vertically. An example of this is shown below (taken from the TotalByCurrency example
report). The report output is also shown.

This property should show the complete
name of the Datarow Label you want the
breakout based on.
Set this property to True or False
if you want to include data rows
where the value to be summarised
is zero or null.
The name of the
OSS1DataTextControl which will
display the codes found in the
SummaryBreakOutField.
Specifies the direction in which the extra
controls to display the values will be
created. Set to 'horizontal' for left to
right, or 'vertical' for top downwards.
Use these properties to set the
trailing labels to be shown
The name of the datarow (field) which is to be
summed. These values will be displayed through the
OSS1CalcBreakOutControl. You can use the
expression builder to create more complex
expressions. Do NOT add sum() to the expression.
The addition will be done by the component.
Report Designer Advance



Page
191





All properties relating to the totaling functionality are set on the OSS1CalcBreakOutControl. The
formatting properties of each of these controls can be set to display them as required, and this formatting
will be copied into the new controls created.

13.3 Horizontal Repeat Direction

The first example shown above is repeated horizontally. The SummaryRepeatDirection is set to
horizontal. The SummaryLabelClassName is the name of the OSS1DataTextControl which was placed
above it to hold the codes. The SummaryBreakOutField is set to the field which contains T0, and the
ValueExp is set to the Amount field. When the SummaryRepeatDirection is set to horizontal, extra
controls required to display the values and codes are created from left to right. For this reason, any
summaries that are repeated horizontally should not have any controls to the right in the same frame, as
they will be overlapped. The controls for the code and value should be designed to be the same width to
keep them in line when repeated. No change is made to the size of the container frame because the width
of a report is usually fixed.

13.4 Vertical Repeat Direction

The second example shown above is repeated vertically. The SummaryRepeatDirection is set to vertical.
The SummaryLabelClassName is the name of the OSS1DataTextControl which was placed beside it to
hold the codes. The SummaryBreakOutField is set to the field which contains Conversion Code, and the
ValueExp is set to the Transaction Amount field. When the SummaryRepeatDirection is set to vertical,
extra controls required to display the values and codes are created downwards. The controls for the code
and value should be designed to be the same height to keep them in line when repeated. The container
frame and any frames containing it are resized vertically to accommodate the new controls. For this
reason, any summaries that are repeated vertically should not have any controls below them in the same
frame, as they will be overlapped.

OSSDataTextControl OSS1CalcBreakOutTotalControl
Report Designer Advance



Page
192
Notes
Values are sorted and displayed alphabetically by the codes (specified in the SummaryBreakOutField).
Care must be taken when using more than one in the same frame. This is due to the positioning of the
controls to display the repeating values. The example report shows how this can be done.
If SummaryIgnoreZero is set to True, breakout values (e.g. currency codes) with transaction amounts
of zero or null will not be included in the summary. Also, if no values are found in any of the
ValueExp results, the controls will be resized to 0,0.
If SummaryIgnoreZero is set to False, a control will be created for every breakout value (e.g. every
Currency Code, including those Currency Codes with a zero or null values). This means that you will
get a summary, which includes every currency code from the report, even if the values for that
currency are zero.
By setting the ValueExp to 1, you can create a count of transactions (e.g. a count of transactions for
each currency, or for each of the different T0 values in a report).
By extending the ValueExp, you can generate a count of transactions for each currency within a date
range (e.g. ([ZZZ_Z_SALFLDG.TRANS_DATETIME]=CDate("05/03/1990")) ). This will
return a value of 1 if the transaction is equal to 5/3/1990.
By extending the ValueExp further, you can generate a sum of transactions for each currency within a
date range (e.g. [ZZZ_Z_SALFLDG.OTHER_AMT] *
([ZZZ_Z_SALFLDG.TRANS_DATETIME] = CDate("05/03/1990")) ). This will add the
transactions equal to 5/3/1990.




































Report Designer Advance



Page
193

14 Creating a balance sheet type report.

14.1 Overview

This is one way in which a user could use Report Designer to set up a balance sheet or profit and loss
report. It would be easier for the user to set up one of these reports using Financial statements or
Financial Tables within Sun 5.

Note: You must set this up in the after frames of either the group or the page.

Setting up the report has the same principles as setting up any report the only major difference is that you
must create an expression for each line you want to extract. The expression must be set as below for each
line.

SUM([PKP_V_CODEA_AGAN_6026.AMT] * (([PKP_V_CODEA_AGAN_6026.ACNT_CODE] > "8"
AND [PKP_V_CODEA_AGAN_6026.ACNT_CODE] < "9")))

What does this mean?

We start the expression with:

1. SUM([PKP_V_CODEA_AGAN_6026.AMT] this is to sum the amount value.
2. * - Which represents the where clause
3. (([PKP_V_CODEA_AGAN_6026.ACNT_CODE] > "8" this is the first where clause we are
setting. This is only picking up account code greater than 8
4. AND will allow us to restrict the data selection
5. [PKP_V_CODEA_AGAN_6026.ACNT_CODE] < "9"))) this is our second where clause
which allows to stop the selection on accounts less then 9

Note each action must be in brackets. As you can see we have the expression carrying out three
commands hence the value ends with 3 closing brackets.

Totaling when creating balance sheet type reports.

Once you have set up each line you want to see on the report you will then need to show totals. To do
this we would use the expression builder and build an expression that would be based on the one
below.

1
st
line - SUM([PKP_V_CODEA_AGAN_6026.AMT] *
(([PKP_V_CODEA_AGAN_6026.ACNT_CODE] > "6" AND
[PKP_V_CODEA_AGAN_6026.ACNT_CODE] < "7"))) +

2
nd
line - SUM([PKP_V_CODEA_AGAN_6026.AMT] *
(([PKP_V_CODEA_AGAN_6026.ACNT_CODE] > "8" AND
[PKP_V_CODEA_AGAN_6026.ACNT_CODE] < "9")))

This time instead of using the AND command we use the + command. In the expression we are
basically saying that we want the total to be based on the two lines added together.








Report Designer Advance



Page
194


14.2 Exercise Creating a Balance Sheet

Objective

In this exercise you will work with a predefined template. The template has been set up to allow you to
start the building of the balance sheet.

Solution

Open the Balance_sheet_Template.rod from the Start folder and save it in My Reports. Once you have the
report open it should look like the example below.

























You must set this up in the after frames of either the group or the page.

Setting up the report has the same principles as setting up any report the only major difference is that you
must create an expression for each line you want to extract. The expression must be set as below for each
line.

SUM ([Line_Transaction_Amount] * (([Line_Account_Code] >="5" And [Line_Account_Code] <=
"5zzzz")))

What does this mean?

We start the expression with:

6. SUM ([Line_Transaction_Amount] this is to sum the amount value.
7. * - Which represents the where clause
8. (([Line_Account_Code] >="5" this is the first where clause we are setting. This is only
picking up account code equal to or greater than 5
9. AND will allow us to restrict the data selection
10. [Line_Account_Code] <= "5zzzz"))) this is our second where clause which stops the selection
on accounts less then 5zzzz

Report Designer Advance



Page
195

Note each action must be in brackets. As you can see we have the expression carrying out three
commands hence the value ends with 3 closing brackets.

Totaling when creating balance sheet type reports.

Once you have set up each line you want to see in each section of the report you will then need to
show totals. To do this we would use the expression builder and build an expression that would be
based on the one below.

1
st
line - SUM([Line_Transaction_Amount]* (([Line_Account_Code] > "5" AND
[Line_Account_Code] < "5zzzz"))) +

2
nd
line - SUM([Line_Transaction_Amount]* (([Line_Account_Code] > "6" AND
[Line_Account_Code] < "63999")))

This time instead of using the AND command we use the + command. In the expression we are
basically saying that we want the total to be based on the two lines added together.

The lines on the Balance sheet should be as follows:

Balance Sheet Classification Account Range
Assets Cash at Bank 5 5zzzz
Inventory 60000 - 63999
Debtors 64000 - 64999
Clients 70000 - 79999
Prepayments 65000 - 65999
Fixed Assets 4 4zzzz

Liabilities Creditors 81000 81999
Accruals 84000 - 84999
Taxes 94000 94999
Suspense 999 - 99999

Equity Share Capital 96100 96999
Share Premium 96200 96299
Retained Earnings 97000 98999
Surplus (deficit) 10000 - 39999

The expression for the Asset total component should be as follows:

SUM ([Line_Transaction_Amount] * (([Line_Account_Code] >="5" And [Line_Account_Code] <=
"5zzzz"))) + SUM ([Line_Transaction_Amount] * (([Line_Account_Code] >="60000" And
[Line_Account_Code] <= "63999")))+ SUM ([Line_Transaction_Amount] * (([Line_Account_Code]
>="64000" And [Line_Account_Code] <= "64999"))) + SUM ([Line_Transaction_Amount] *
(([Line_Account_Code] >="70000" And [Line_Account_Code] <= "79999"))) + SUM
([Line_Transaction_Amount] * (([Line_Account_Code] >="65000" And [Line_Account_Code] <=
"65999"))) + SUM ([Line_Transaction_Amount] * (([Line_Account_Code] >="4" And
[Line_Account_Code] <= "4zzzz")))

Make sure that you create total the other two sections of the balance sheet.







Report Designer Advance



Page
196


The report layout should look like the example below.

























The report output should look like the example below
































Report Designer Advance



Page
197
15 Hints & Tips

15.1 Purpose

This section of the course gives you some helpful hints and dips which look at:

19. Printing issues in SunSytems
20. Account listing Nitty Gritty
21. Printing Selected Digits
22. Last day of the Month
23. Excluding Blank Address lines















































Report Designer Advance



Page
198
15.2 Printing in SunSystems 5


Following applies when non-standard printing is required, for example customised form sizes (cheques).

15.2.1 Actuate:

Where a report is wider than tall Acutate assumes Landscape orientation and currently rotates printing
through 90 degrees (correct for A4 paper), where this is not required it will be necessary to make the page
size portrait using multiple frames. This can be achieved by copying the flow within the page ensuring
the page size is exactly the multiple of the frame sizes. For example we put 2 4x 8 cheque flows on a
page size of 8x 8 which Acutate recognised as portrait thus our printing remains the correct way round.

15.2.2 Printer:

In addition it is necessary to select the printer properties at print runtime showing the correct printer and
paper size. Where the design of the paper size does not exist it must be set in settings\printers\file\server
properties administrator privileges are required to create a new form and you can then enter the exact
dimensions of the paper in either metric or imperial. If possible set the defaults of the printer to ensure the
new form is its default paper. Printer paper size must be the same as the paper size used in the Actuate
page i.e. for our cheques we used 8x 8 paper as our form calling it cheques thus selecting that and the
default for our printer.

It is still wise at print time within actuate, using file, print from the menu rather than the print icon, to
ensure the correct printer and properties have been picked up.

NOTE: If it seems impossible to produce contiguous documents due to page skips then consider the
possibility that the print driver does not support custom paper sizes.

























Report Designer Advance



Page
199
15.3 Account Listing
15.3.1 Overview
Using the Account Listing for 513 as a basis, I will take you through some of the techniques, design ideas
and pitfalls of report design using Actuate and SunSystems

15.3.2 CDR
15.3.2.1 What it is

A method of producing efficient data extraction instructions
Requests only the data required
Joins tables as required using hierarchy and foreign key relationships in the data dictionary

15.3.3 What it isnt

A major performance improvement for reports. This is because most of the time taken to produce a report
is in producing the pages, not extracting the data. This can be seen by watching the page count when a
report is produced in ERD. Pages 1 and 2 take some time, while the data is extracted by the SQL engine.
The remainder of the time is producing the report. A good report performance at 513 is 2 or 3 pages per
second.

15.3.4 DSD


15.3.5 Philosophy
An easy to use tool for creating an Actuate library containing the components required to produce a report
for a function
Report Designer Advance



Page
200
15.3.6 Shortcomings

Hierarchy based. If the hierarchy doesnt contain the data you want for that function, you cant have it
(unless you work outside of DSD)
Not all components are available, such as breakouts.
Component properties still need to be set
ERD must not be running when DSD is writing ROL.
Selection operator is fixed for runtime (you cant change from > to <)
Slow to reload an SRD file of any complexity
Tied to a Business Unit because of the way analysis and value labels work. (will work with other
IDENTICAL business units. May work elsewhere)
Relative paths for libraries.


Report Designer Advance



Page
201
15.3.7 Parameters
15.3.8 Default values


Dont mess about with those created by DSD

15.3.9 Why runtime parameters are on 2 tabs

RTS is a special label
Always in front at runtime, regardless of tab number
CDR datasources currently do not expect any other runtime parameters on the same tab. It crashes if there
are.
Report Designer Advance



Page
202
15.3.10 Why the period parameter is in 2 parts; opening balances

15.3.11 Value expressions

15.3.12 Boolean logic

Sum ( ( [Line_Base_Amount] ) * ( [Line_Accounting_Period] < Int ( Mid$ (
parmnAccounting_Period_From, 1,7 ) ) ) * ( [Line_Accounting_Period] > Int ( Mid$ (
parmnAccounting_Period_From, 1,4 ) ) * 1000 ) ) Group By ( [Line_Account_Code] )


The worst we have..

(Sum(([PKP_V_LDG_ARC_UNION.AMOUNT]) * ( [PKP_V_LDG_ARC_UNION.PERIOD] <
AccListQryPeriodFrom) * ([PKP_V_LDG_ARC_UNION.PERIOD] > ( ( Int (AccListQryPeriodFrom /
1000) )* 1000)) ) Group By( [PKP_V_LDG_ARC_UNION.ACCNT_CODE] ) *
([PKP_V_6008_ACNT_BASIC.ACNT_TYPE] = "3" )) +
(Sum(([PKP_V_LDG_ARC_UNION.AMOUNT]) * ( [PKP_V_LDG_ARC_UNION.PERIOD] <
AccListQryPeriodFrom) ) Group By( [PKP_V_LDG_ARC_UNION.ACCNT_CODE] )*(
[PKP_V_6008_ACNT_BASIC.ACNT_TYPE] <> "3" ))

Very powerful
Very difficult to maintain
Build up in stages
Use expression Builder
Use lots of brackets

15.3.13 Aggregate helpers
Breakouts
Not always successful, usually in after sections. Then you have to use a sub report, with its own
datasource (reference the main one) and frames.
Report Designer Advance



Page
203
15.3.14 Miscellaneous
15.3.15 Setting properties for multiple controls
Properties at top level
Report Designer Advance



Page
204
Table and Column Name
Custom requester.
Why set it?
What happens if this isnt here?

15.3.16 Page heading property
























Report Designer Advance



Page
205
15.4 Last day of the Month

This document allows the user to set the date so that it always shows the last day of the month on the
report.

It has two parts so you will need to use 2 date components. In the first one you copy the expression and
replace (datecol) with the date column using the expression builder.

Repeat the process for the second column.

We ignore leap years!

Day: 28 + (3 * (month(datecol) = 1) +(3 * (month(datecol) = 3) +(2 * (month(datecol) = 4) +(3 *
(month(datecol) = 5) +(2 * (month(datecol) = 6) +(3 * (month(datecol) = 7) +(3 * (month(datecol) = 8) +(2
* (month(datecol) = 9) +(3 * (month(datecol) = 10) +(2 * (month(datecol) = 11) +(3 * (month(datecol) =
12)

Month and year: format$(datecol, mm) & / & format$(datecol, yyyy)








































Report Designer Advance



Page
206
15.5 Printing Selected Numeric Digits

When using the property NumberToWords a mask can be used to select the digit whose word is to
appear in the control. For example, a mask of 100 will print the hundreds digit. Unfortunately the mask
property has no function when printing numerics.

However, it can be done:
1 Move a DataDoubleControl to the desired location; size it as desired (0.15).
2 In the Format property, remove the decimal point and places to ensure a single digit is printed
(#,###,##0).
3 In the ValueExp property, use this formula, varying the number of zeros in the divisors to select the
required digit:

15.5.1 INT(DataValue/n) - INT(DataValue /10n)*10

where n = the mask you want to use (units, tens, hundreds, thousands etc)
and DataValue is what can usually go into a ValueExp:
- a CDR data value e.g. [Ledger_Data_Base_Amount]
- an Actuate data value e.g. [DEM_V_TXN_MATCH_IFACE.LDG_AMT]
- an aggregate value e.g. Sum([Ledger_Data_Base_Amount])
- a global variable e.g. g_CalcAmount01
- etc


This example is columns from a cheque amount.
- the units; INT(g_CalcAmount01) - INT(g_CalcAmount01/10)*10
- the tens; INT(g_CalcAmount01/10) - INT(g_CalcAmount01/100)*10
- the tens of thousands;
INT(g_CalcAmount01/10000) - INT(g_CalcAmount01/100000)*10




























Report Designer Advance



Page
207
15.6 Addresses Excluding Blank Lines.

The Value Expression is as follows:

[DEM_V_PYMT_OR_RCPT.ADDR_LINE_1]& Iif(
(IsNull([DEM_V_PYMT_OR_RCPT.ADDR_LINE_1]) ) , "" , Chr$(10) ) &
[DEM_V_PYMT_OR_RCPT.ADDR_LINE_2]& Iif(
(IsNull([DEM_V_PYMT_OR_RCPT.ADDR_LINE_2]) ) , "" , Chr$(10) ) &
[DEM_V_PYMT_OR_RCPT.ADDR_LINE_3]& Iif(
(IsNull([DEM_V_PYMT_OR_RCPT.ADDR_LINE_3]) ) , "" , Chr$(10) ) &
[DEM_V_PYMT_OR_RCPT.ADDR_LINE_4]& Iif(
(IsNull([DEM_V_PYMT_OR_RCPT.ADDR_LINE_4]) ) , "" , Chr$(10) ) &
[DEM_V_PYMT_OR_RCPT.ADDR_LINE_5]& Iif(
(IsNull([DEM_V_PYMT_OR_RCPT.ADDR_LINE_5]) ) , "" , Chr$(10) ) &
[DEM_V_PYMT_OR_RCPT.TOWN_CITY]& Iif( (IsNull([DEM_V_PYMT_OR_RCPT.TOWN_CITY])
) , "" , Chr$(10) ) & [DEM_V_PYMT_OR_RCPT.STATE]& Iif(
(IsNull([DEM_V_PYMT_OR_RCPT.STATE]) ) , "" , Chr$(10) )
&[DEM_V_PYMT_OR_RCPT.COUNTRY]& Iif( (IsNull([DEM_V_PYMT_OR_RCPT.COUNTRY]) ) ,
"" , Chr$(10) ) &[DEM_V_PYMT_OR_RCPT.POST_CODE]

15.6.1 How to use it.

1. Place an OSS1DatatextControl in the Frame where you want to see the address. See below.














2. Copy the above expression into the components ValExp property field. This should appear as
soon as you have placed the component in the frame.













3. Make sure the size of the component is big enough to include all address lines.




OSS1DataTextControl

Das könnte Ihnen auch gefallen