0% found this document useful (0 votes)
403 views142 pages

INFOR Training Guide - Creating Reports With Mongoose Reporting (v9.01.00) 1

The document is a training workbook for creating reports using Mongoose Reporting in CloudSuite Business and CloudSuite Industrial. It covers various lessons on DataViews, Report Type forms, FlexLayout components, and Sub-Reports, along with practical exercises and objectives for learners. The course is designed for different audiences including customers, consultants, and system administrators, and requires prior knowledge of related topics.

Uploaded by

Alessandro Zaino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
403 views142 pages

INFOR Training Guide - Creating Reports With Mongoose Reporting (v9.01.00) 1

The document is a training workbook for creating reports using Mongoose Reporting in CloudSuite Business and CloudSuite Industrial. It covers various lessons on DataViews, Report Type forms, FlexLayout components, and Sub-Reports, along with practical exercises and objectives for learners. The course is designed for different audiences including customers, consultants, and system administrators, and requires prior knowledge of related topics.

Uploaded by

Alessandro Zaino
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CloudSuite Business / CloudSuite

Industrial: Creating Reports Using


Mongoose Reporting Training Workbook
(9.01.00)

CloudSuite Business / CloudSuite Industrial


May 8, 2017
Course code: 11_0010901_IEN3347_SYT
Legal Notice
Copyright © 2017 Infor. All rights reserved.

Important Notices
The material contained in this publication (including any supplementary information) constitutes and
contains confidential and proprietary information of Infor.
By gaining access to the attached, you acknowledge and agree that the material (including any
modification, translation or adaptation of the material) and all copyright, trade secrets and all other right,
title and interest therein, are the sole property of Infor and that you shall not gain right, title or interest in
the material (including any modification, translation or adaptation of the material) by virtue of your review
thereof other than the non-exclusive right to use the material solely in connection with and the furtherance
of your license and use of software made available to your company from Infor pursuant to a separate
agreement, the terms of which separate agreement shall govern your use of this material and all
supplemental related materials ("Purpose").
In addition, by accessing the enclosed material, you acknowledge and agree that you are required to
maintain such material in strict confidence and that your use of such material is limited to the Purpose
described above. Although Infor has taken due care to ensure that the material included in this publication
is accurate and complete, Infor cannot warrant that the information contained in this publication is
complete, does not contain typographical or other errors, or will meet your specific requirements. As such,
Infor does not assume and hereby disclaims all liability, consequential or otherwise, for any loss or
damage to any person or entity which is caused by or relates to errors or omissions in this publication
(including any supplementary information), whether such errors or omissions result from negligence,
accident or any other cause.
Without limitation, U.S. export control laws and other applicable export and import laws govern your use
of this material and you will neither export or re-export, directly or indirectly, this material nor any related
materials or supplemental information in violation of such laws, or use such materials for any purpose
prohibited by such laws.

Trademark Acknowledgements
The word and design marks set forth herein are trademarks and/or registered trademarks of Infor and/or
related affiliates and subsidiaries. All rights reserved. All other company, product, trade, or service names
referenced may be registered trademarks or trademarks of their respective owners.
Table of contents
About this workbook............................................................................................................................. 5
Course overview .................................................................................................................................... 7
Course description and agenda............................................................................................................ 8
User interface .................................................................................................................................... 12
Lesson 1: Using IDO Methods with DataViews .................................................................................. 18
The benefits of using IDO methods .................................................................................................... 19
Using the DataViews Setup form........................................................................................................ 20
DataViews Setup information - General tab ........................................................................................ 21
DataViews Setup Information - Input Parameters tab ......................................................................... 23
DataViews Setup Information - User Permissions tab ......................................................................... 25
DataViews Setup Information – Layouts tab ....................................................................................... 26
Creating a DataView report ................................................................................................................ 28
Check your understanding ................................................................................................................. 35
Lesson 2: Creating a Report Type form ............................................................................................. 36
Report Type forms ............................................................................................................................. 37
Collections on report-template type forms .......................................................................................... 39
Selecting report properties on the New Forms Wizard ........................................................................ 42
Specifying report containers ............................................................................................................... 44
Check your understanding ................................................................................................................. 47
Lesson 3: Adding FlexLayout components........................................................................................ 48
Why do I need to know about FlexLayout components? ..................................................................... 49
FlexLayout regions ............................................................................................................................ 50
About the orientation, pack, and align attributes ................................................................................. 52
Edit FlexLayout Attributes dialog box ................................................................................................. 55
FlexLayout properties specific to Report Type forms .......................................................................... 58
What are character units? .................................................................................................................. 60
Check your understanding ................................................................................................................. 67
Lesson 4: Adding components ........................................................................................................... 68
Component types............................................................................................................................... 69
Check your understanding ................................................................................................................. 77
Lesson 5: Using Secondary Collections ............................................................................................ 78
What is a Secondary Collection and why would you need to use one? ............................................... 79
Understanding collection hierarchies in Report Type forms................................................................. 80
Check your understanding ............................................................................................................... 105
Lesson 6: Adding a Sub-Report........................................................................................................ 106
What is a Sub-Report and why use one? ......................................................................................... 107
Check your understanding ............................................................................................................... 112
Lesson 7: Creating a Report Criteria form ....................................................................................... 113
Understanding bound and unbound forms........................................................................................ 114
Creating a Report Criteria form ........................................................................................................ 115
Check your understanding ............................................................................................................... 133
Course summary ............................................................................................................................... 134
Course review.................................................................................................................................. 135
Appendices ........................................................................................................................................ 136
Appendix A: Learner user accounts.................................................................................................. 137
Appendix B: Stored procedure (Rpt_MRCExercise1Sp) ................................................................... 138
Appendix C: Stored procedure (Rpt_MRCExercise51Sp) ................................................................. 140

3
4
About this workbook
Welcome to this Infor Education course! We hope you will find this learning experience enjoyable and
instructive. This Training Workbook is designed to support the following forms of learning:
• Classroom instructor-led training
• Virtual instructor-led training
• Self-directed learning
This Training Workbook is not intended for use as a product user guide.

Activity data
You will be asked to complete some practice exercises during this course. Step-by-step instructions are
provided in this guide to assist you with completing the exercises. Where necessary, data columns are
included for your reference.
Your instructor will provide more information on systems used in class, including server addresses, login
IDs, and passwords.

Self-directed learning
If you are taking this course as self-directed learning, there may be instructor-recorded presentations
and/or simulations available to assist you.
If instructor-recorded presentations are available, a hyperlink to the recording will be included on the first
page of each corresponding Lesson.
If simulations are available, the demos and exercises throughout this Training Workbook will include
hyperlinks that allow you to view and/or practice the execution of the demo or exercise in a simulated
training environment.

Learning Libraries
Learning Libraries in Infor Campus include learning materials that are available to you online, anytime,
anywhere. These materials can supplement instructor-led training, providing you with additional learning
resources to support your day-to-day business tasks and activities.
Please note that if you accessed this Training Workbook directly via a Learning Library, you will not have
access to the Infor Education Training Environment that is provided with all instructor-led and most self-
directed learning course versions, as referenced above. Therefore, you will not be able to practice the
exercises in the specific Training Environment for which the exercises in this Training Workbook were
written.

Creating Reports Using Mongoose Reporting 5


© 2017 Infor Education
Symbols used in this workbook

Hands-on exercise
For your reference Question
(“Exercise”)

Instructor demonstration
Your notes Answer
(“Demo”)

Can be used for either


Important note Task simulation
(“Scenario” or “Discussion”)

6 Course introduction
© 2017 Infor Education
Course overview
Estimated time
.25 hours

Learning objectives
Upon completion of this course, you will be able to:
• What a DataView is.
• Why you would want to use an IDO Method.
• What DataView reports are and when they should be used
• The workings of a Report Type form.
• The reason for using Report Type forms.
• What FlexLayout components are and their purpose.
• What a Secondary Collection is and how to incorporate these onto reports.
• What a Sub-Report is.
• Why and when you should use a Sub-Report.
• How to create a Report Criteria form.
• How to set up your input parameters.
• How to create an Event Handler to run the form.
• How to create Event Handlers and Background Task Definitions.

Topics
• Course description and agenda

Creating Reports Using Mongoose Reporting 7


© 2017 Infor Education
Course description and agenda
This course covers the Mongoose Reporting methodology which includes FlexForm components, Report
Type forms, how to create a stored procedure-based DataView, passing of starting and ending
parameters to a DataView, adding images to a Report Type form, adding a Secondary Collection to a
Report Type form, adding a Sub-Report to a Report Type form, creating Report Criteria forms and
creating Fixed form forward-facing reports.

Course duration
14 hours

Prerequisite knowledge
Before taking this course, you must have either taken or have a hands-on knowledge of the topics in the
following courses.
• CloudSuite Business / CloudSuite Industrial: v9 Navigating the User Interface
• CloudSuite Business / CloudSuite Industrial: v9 Using the Workbench Suite
• CloudSuite Business / CloudSuite Industrial: v9 Creating Form Personalization’s
• CloudSuite Business / CloudSuite Industrial: v9 Extending the Application with Mongoose

Audience
• Customer User
• Pre-Sales Consultant
• Business Consultant
• Technical Consultant
• Support
• System Administrator

System requirements
• CloudSuite Business / CloudSuite Industrial 9.01.00 Training Environment

Reference materials
Reference materials are available from the following locations:
• Help menu
• Infor Xtreme®

Lesson Lesson title Learning objectives Day

Course overview Review course expectations. 1

1 Using IDO Methods • What is a DataView? Why would I use a DataView? 1


with DataViews

8 Course overview
© 2017 Infor Education
Lesson Lesson title Learning objectives Day

• What can you do with an IDO Method that you could


not do before?
• Explain how IDO Methods are used within DataViews.
• Describe how to incorporate an IDO Method into a
DataView and how to assign input parameters.
• What is a DataView Report.
• Creating a DataView Report.

2 Creating a Report Type • What is Report Type form? 1


form
• The Reason for using Report Type forms.
• Show a Report.
• Demonstrate how to create a quick Report Type form.
• Describe the steps in creating a Report Type form.

3 Adding FlexLayout • What is a FlexLayout Component 1


components
• Why do I need to know about FlexLayout
Components?
• Explain how to add FlexLayout components to a
Report Type form.
• Explain how to add Regions to a FlexLayout
Component.
• Explain how to set FlexLayout and Region properties.
• Identify Fixed Layout Report Type form and what it
looks like.

4 Adding components • Identify the different types of components that can be 1


used in a Report Type form.
• Explain how to add components to a FlexLayout
Region.
• Explain how to add images to a Report Type form.
• Explain how to add Sub totals and Grand Totals to a
Report Type form.
• Explain the Report Type form properties.

Creating Reports Using Mongoose Reporting 9


© 2017 Infor Education
Lesson Lesson title Learning objectives Day

5 Using Secondary • What is a Secondary Collection? Why do we need 1


Collections one?
• Explain how to add a Secondary Collection to a
Report Type form.
• Explain how to link a Secondary Collection to the
parent collection.
• Explain how to layout components from the
Secondary Collection onto the Report Type form.

6 Adding a Sub-Report • What is a Sub-Report? Why do we need Sub- 2


Reports?
• Explain how to add a Sub-Report to a Report Type
form.
• Describe how to link a Sub-Report.
• Explain how to format a Sub-Report on a Report Type
form.

7 Creating a Report • How do we run a Report Type form? 2


Criteria form
• Explain how to create a Report Criteria form.
• Explain how to set input parameters.
• Describe how to create an Event Handler to run the
form.
• Explain how to create a Background Task Definition
for the Report Type form.
• Describe the running and final result of the Report
Type form.

Course summary Course debrief. 2

Appendices
This section contains information that is not part of the instructional content of this course, but provides
additional related reference information.

Appendix Appendix title Content description

Appendix Learner user accounts This appendix provides a reference for student
A login credentials.

Appendix Stored procedure This is the stored procedure used in the


B (Rpt_MRCExercise1Sp) DataView report created in exercise 1.1.

10 Course overview
© 2017 Infor Education
Appendix Stored procedure This is the stored procedure used in the Report
C (Rpt_MRCExercise51Sp) Type form created in exercise 5.1.

Creating Reports Using Mongoose Reporting 11


© 2017 Infor Education
User interface
Standard user interface elements include the navigation pane menus and the main toolbar.

Navigation pane menus and main toolbar

Navigation pane menus


You can browse all available folders through the navigation pane menus and submenus. Click the down
arrow for each of the navigation pane menus, this allows you to explore the submenus contained
beneath.

Navigation pane menus and submenus


For information on how to pin submenus to the navigation pane, please refer to the Creating Form
Personalizations workbook or ILT. For example, if you know that you will be using the Customer Service
submenus frequently, you can display the menus at the top level, by pinning them to the navigation pane.

Main toolbar
The main toolbar contains icons that allow you to quickly complete commonly used tasks, such as saving
data or closing a form. You can position your mouse pointer over an icon on the toolbar to reveal its
description and functionality.
To view a list of all toolbar icons and for steps on how to add/remove icons from the default toolbar, See
Appendix B. Note: Availability to make hiding buttons visible is not available for Web users.

Keyboard shortcuts
Some navigation pane submenus display available keyboard shortcuts that can be used to save multiple
steps when completing certain tasks.

12 Course overview
© 2017 Infor Education
The following tables display the available shortcut keys and their actions.

Navigating forms

Action Menu Path Smart Client Web Client Icon Button


Shortcut Shortcut Default

Close current Form > Close and Ctrl + F4 N/A Hidden


form Cancel Changes

Open Select Form > Open Ctrl + O Ctrl + O Visible


Form

Open Form > Ctrl + W N/A


workspaces Workspaces

Switch view to Ctrl + Tab N/A


next open form

Navigating records

Action Menu Path Smart Web Icon Button


Client Client Default
Shortcut Shortcut

Move to first editable field of View > Home Ctrl + Ctrl +


form Cursor Home Home

Move to the next field Tab Tab

Move to the previous field Shift + Tab Shift + Tab

Move to the next record Actions > Next F8 F8 Hidden

Move to the previous record Actions > F7 F7 Hidden


Previous

Switch the next collection on View > Ctrl + F8 N/A Visible


the form to become the Activate Next
current collection in a form Collection
that contains multiple
collections.

Hide/Show 1st Splitter Pane. View > Ctrl + 1 N/A


Toggles back and forth Hide/Show 1st
between form and dual view. Splitter Pane

Hide/Show 2nd Splitter Pane. View > Ctrl + 2 N/A


Toggles back and forth Hide/Show 2nd
between grid and dual view. Splitter Pane

Creating Reports Using Mongoose Reporting 13


© 2017 Infor Education
Editing records

Action Menu Path Smart Web Icon Button


Client Client Default
Shortcut Shortcut

Activate the drop-down list with F2 F2


an implied asterisk (i.e. wildcard)
after the entered text in the field
to then populate the list with data
entries that begin with the
entered text.

Add a new record Actions > Ctrl + N N/A Visible


Note: The Actions menu is only New
available when a form is open.

Add value for current field Edit > Add Ctrl + A N/A Hidden

Copy (only works to copy a Actions > Ctrl + C Ctrl + C


record with web client) Copy

Cut Ctrl + X Ctrl + X

Paste Ctrl + V N/A

Undo Edit > Ctrl + Z N/A


Undo

Delete record Actions > Ctrl + D Ctrl + D Visible


Delete

Find value for current field (only Edit > Find Ctrl + F N/A Hidden
available for certain drop-down Value for
fields) Current
Field

Display details for current field Edit > Ctrl + L N/A Hidden
drill-down (only available for Details for
certain drop-down fields) Current
Field

Save changes (only available Actions > Ctrl + S Ctrl + S Visible


when a form is open) Save

14 Course overview
© 2017 Infor Education
Filtering records

Action Menu Path Smart Web Client Icon Button


Client Shortcut Default
Shortcut

In Filter Place mode, cancel Actions > F3 F3


the filter in place and return to Filter >
the collection previously Cancel in
displayed Place

In Refresh/Run mode, begin Actions F4 F4 Visible


filter in place (i.e. clear the >Filter >
collection and go back to Begin in
Filter In Place mode) Place
In Filter In Place Mode,
execute in place (i.e. run the Actions >
filter) Filter >
Execute in
Place

In Refresh/Run mode, refresh Actions > F5 F5 Visible


the current collection. Refresh
In Filter In Place Mode, clear Actions >
the filter in place. Filter > Clear
in Place

In Refresh/Run mode, refresh Actions > Ctrl + F5 Ctrl + F5 Visible


the current record. Refresh
current

In Refresh/Run mode, repeat Edit > Ctrl + F2 Ctrl + F2


Find Value in Collection Repeat Find

In Refresh/Run or New mode, Actions > Ctrl + Q N/A


open associated query form Filter > By
to specify filter criteria. Query

Open field level help topic Help > F1 N/A


Current Field

Toggle design mode on and Edit > Ctrl + E N/A Visible


off. Design Mode

Print Print Ctrl + P N/A

Creating Reports Using Mongoose Reporting 15


© 2017 Infor Education
Field types
The following tables display the field types available with a brief description:

Field type Description

Required, system-generated, and read-only fields

• Any field that is required will have a red star


• A system-generated field will have a green star
• A field with no border around the data is read-only

Standard GUI fields

Check box indicating Yes or No

Radio button to select one option from multiple choices

Drop-down list to select one option from multiple choices

Icon name differences


Here are the names of the different icons in the smart client and web client.

Smart Client Web Client

Open a form Open

Save Save

Create a new object in the current collection New

Delete an object in the current collection Delete

Refresh the current collection Refresh

Filter in Place Filter in Place

Get more rows in the current collection Get more rows

Display notes for the current object Notes

Display documents for the current object Documents

Send email for the current object Send email for the current object

Export the data in the current collection to excel Export to excel

Enter or exit design mode on this form Open designer in a new window

Translate Translate

16 Course overview
© 2017 Infor Education
Smart Client Web Client

Get help on the current form Help Current Form

Creating Reports Using Mongoose Reporting 17


© 2017 Infor Education
Lesson 1: Using IDO Methods with
DataViews
Estimated time
1 hour

Learning objectives
In this lesson, you will:
• Describe a DataView and why you should use one.
• Describe what you can do with an IDO Method that you could not do before?
• Explain how IDO Methods are used within DataViews.
• Describe how to incorporate an IDO Method into a DataView and how to assign input parameters.
• Describe a DataView Report.

Topics
• The benefits of using IDO Methods
• Using the DataViews Setup form
• DataViews Setup information – General tab
• DataViews Setup information – Input Parameters tab
• DataViews Setup information – User Permissions tab
• DataViews Setup information – Layouts tab
• Creating a DataView report

18 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
The benefits of using IDO methods
Prior to version 9.01, users could only use IDO Collections as a source for extracting data for a DataView.
In version 9.01, this functionality has been enhanced where in addition to IDO Collections you can now
use existing stored procedures as a source for extracting data as well. These methods are referred to as
Standard and Custom methods.

Standard methods
All IDOs implement the methods LoadCollection, UpdateCollection, GetPropertyInfo, and Invoke.
• LoadCollection retrieves a collection of rows from the database.
• UpdateCollection takes a set of rows marked for insert, update, or delete, and executes the
appropriate Structured Query Language (SQL) code against the database.
• GetPropertyInfo returns detailed information about the properties supported by the IDO.
• Invoke allows users to execute a custom method.

Custom methods
Custom methods are defined by the developer. You can define custom methods implemented in
Transact-SQL. Transact-SQL is the preferred programming language for two reasons; one, because it is
easier to use for most of these tasks and two, because the IDO forms provide useful facilities for defining
methods based on these procedures.
There are two methods based on Transact-SQL stored procedures:
• Methods based on stored procedures without a result set
• Methods based on stored procedures with a result set
A stored procedure that does not return a result set may have input and output parameters, but it does
not select data to be returned to the caller.
A method that returns a result set (a list of values) to the caller may be used to populate collections. A
typical use is to populate drop-down list fields in forms. You can also bind forms to these returned sets.

To use a custom load method in a DataView or Report Type form, you must associate that
custom load method, (i.e. stored procedure) with an IDO.

Creating Reports Using Mongoose Reporting 19


© 2017 Infor Education
Using the DataViews Setup form
Use this form to set up "predefined" DataViews. This form has tabs that correspond to basic functions of
the form:
• Use the General tab to create and maintain predefined DataViews.
• Use the Input Parameters tab to specify input parameters for DataView queries.
• Use the User Permissions tab to set user and group permissions for DataViews.
• Use the Layouts tab to view and copy layouts for DataViews.

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

20 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
DataViews Setup information - General tab
When you set up a predefined DataView, specify this information on the General tab of the DataViews
Setup form:

You can specify multiple data sources to be queried in the DataView. For each data
source, you must specify this information.

Optionally, you can use the IDO Setup button to launch the DataView IDO Setup form and specify the
data you want to use from a specified IDO. Use this button after specifying each IDO for a DataView to
define and limit the data from that IDO to be queried.

DataViews Setup form – General tab

The table below lists the fields/options on the General tab of the DataViews Setup form:

Field/Option Description

This field is required. Specify whether the data source is to be an IDO


Source Type
Collection or a custom load method (IDO Method).

Creating Reports Using Mongoose Reporting 21


© 2017 Infor Education
Field/Option Description

This field is required. Specify what IDO is to be the source for the data to be
IDO
returned.

This field is required. This value is normally generated automatically. You can
IDO Alias
optionally modify the recommended alias.

This field is required when enabled. This field is enabled only if IDO Method is
Source Name selected as the Source Type. Specify the name of the custom load method
being used as the data source.

This field is enabled only if IDO Collection is selected as the Source Type and
required only if the specified IDO collection is a sub-collection. This field is
Parent IDO
used to indicate the IDO collection that is considered the "parent" of the sub-
collection.

Use this field to specify the maximum number of records to return when the
Record Cap
DataView query is performed.

The system record cap setting determines the maximum number of records
that can be returned.
Use Specified Max: This option allows you to set your own maximum for the
Use System Setting number of records to be returned. When selected, this option makes visible
and enables the Record Cap Value field.
Retrieve All: This option instructs the system to retrieve all available records,
regardless of any record cap settings elsewhere on the system.

This column is visible and enabled only when the Record Cap setting is Use
Record Cap Value Specified Max. By default, this field contains the system setting for the record
cap. You can change it to whatever value you choose.

Optionally, specify a filter for the system to use when performing the query.
This option is enabled only when Source Type is IDO Collection. To filter data
Filter
when Source Type is IDO Method, you must specify the filter parameters
within the custom load method.

Order By Optionally, specify which property is to be used to sort the retrieved results.

Specify whether the link is to be a multi-level or single-level link:


Multi-level nests the child IDO information under the parent information.
Link Type
Single-level links and presents the parent and child IDO information at the
same level.

Link By Specify how the sub-collection is linked to the parent IDO collection.

22 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
DataViews Setup Information - Input Parameters tab
When you set up a predefined DataView, specify this information on the Input Parameters tab of the
DataViews Setup form:

The options on this tab can be especially helpful when setting up a DataView to be used to
create reports.

Sequence
Use integers to indicate the order in which the specified input parameters are applied to the data being
queried.

Operator
When used, this value specifies an operation to use in setting a range for the data to be retrieved. When
two such operators are used in tandem, you can set an upper range limit and a lower range limit.
For example, suppose you want to retrieve the values of all customers whose names begin with the letter
“C.” You could create one parameter using the operator Greater Than Or Equal To with a Description
value of C. You could then create a second parameter using the operator Less Than, with a Description
value of D. By applying both parameters to the Property Name of CustName, you effectively set a range
for customers whose names begin with the letter “C.”

If the Source Type on the General tab is set to IDO Method, this field is disabled.

Property name
Use the drop-down list to specify the IDO property to be used as the input parameter.
When you select a property in this field, the Description field is automatically populated with the default
value for the property, if one exists. You can modify the value in the Description field, if desired.

If the Source Type on the General tab is set to IDO Method, this field is disabled.

Description
Specify the value to be used as the input parameter. If a Property Name is specified, this value is
specified automatically but can be changed. This is the value on which the Operator, if any, performs.

Creating Reports Using Mongoose Reporting 23


© 2017 Infor Education
End of day
This option is enabled only when the specified property is a date/time property. When selected, this
option causes the time on a Date/Time property value to be set to the "end of day," which is defined in the
system as [Link].99 PM. When cleared, the system uses the system date/time that the user performed
the query. The use of this option allows you to set very precise date/time ranges.

If the Source Type on the General tab is set to IDO Method, this field is disabled.

Save your changes and continue.

DataViews Setup form – Input Parameters tab

24 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
DataViews Setup Information - User Permissions tab
Use the User Permissions tab on the DataViews Setup form to specify who can access the DataView
being created or modified. Permissions can be specified at the user level, the group level, or a
combination of the two.

User name
Specify a user who will have access to the DataView. The list is populated from the list of users in the
system.

Description
This field displays the description associated with the specified user.

Group name
Specify a user group who will have access to the DataView. The list is populated from the list of user
groups in the system.

Description
This field displays the description associated with the specified user group.

Save
Save your changes and continue.

DataViews Setup form – User Permissions tab

Creating Reports Using Mongoose Reporting 25


© 2017 Infor Education
DataViews Setup Information – Layouts tab
To organize and present data included in a DataView, you can create layouts. Layouts can eliminate the
redundancy of grouping and sorting the results every time you want to view the data.
These layouts are created by employing several options. Perform these actions by:
• Defining data groupings
• Creating custom columns which can include calculations
• Displaying or hide selected columns
• Merging different levels of data
• Defining summaries
Once the DataView layout is organized and the data is presented the way you want it, you can save these
layouts for future use and reference. These layouts can also be used to create custom reports.
As with form customization, DataViews support user-level, group-level, and site-level layouts. Access to
these layouts can be controlled using filters and user permission settings.
When setting up a predefined DataView, specify this information on the Layouts tab of the DataViews
Setup form.

Use this tab to create copies of layouts. These duplicate layouts can have a different scope
and can be designated as the default version of the layout if desired.

Layout
This field shows the name of the layout as it was originally saved.

Scope type
When you create a copy of a layout, specify a scope type of Site, Group, or User. Layouts created by
vendor developers have a scope type of Vendor.

Scope name
This field is only enabled if the Scope Type is either Group or User. When that is the case, then use this
field to specify the name of the group or user.

Default
When there are multiple layouts with the same Scope Type and Scope Name, this option specifies the
default layout.
The default layout option is set using the DataView Layouts form. On this form, the option is read-only.

Save
Save the changes and continue.

26 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
DataViews Setup form – Layouts tab

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

Creating Reports Using Mongoose Reporting 27


© 2017 Infor Education
Creating a DataView report
DataView reports must be based on predefined DataViews. The DataView defined for report output is
much like any other predefined DataView but with a few specific requirements for the output.
To create a DataView report, you must create a predefined DataView containing all data fields/columns
you want to display on the report output.
When creating the predefined DataView, make sure to include these specifications in addition to whatever
other specifications you want to make on the DataViews Setup form such as:
• The IDO properties to include in the output.
This is done by clicking the IDO Setup button on the General tab and then selecting the desired
properties in the Properties section of the DataView IDO Setup form.
Optionally, create input parameters for the DataView to use when creating the output display.

Although this is optional, when using the CloudSuite application, it is recommended that
you create input parameters, especially for the starting and ending values of ranges.
This is done by selecting the Input Parameters tab on the DataViews Setup form and
then creating the necessary parameters. These input parameters require an IDO property
name, an operator, and optionally, a description consisting of a string.

Demo: Creating a new DataView report


Your instructor will demonstrate how to create a new DataView report.

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

Exercise 1.1: Create a new DataView report


In this exercise, you will create a new IDO project, new IDO, new DataView report from
scratch, use an IDO Method (i.e. stored procedure) as a data source, add IDO properties,
assign input parameters, and save the DataView layout.

Exercise steps

Part 1: Create the Rpt_MRCExercise1Sp and Rpt_MRCExercise51Sp stored procedures

28 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
1. Select Start > All Programs > Microsoft SQL Server 2014 > SQL Server 2014 Management
Studio. The Microsoft SQL Server Management Studio opens and displays the Connect to
Server dialog box.
2. Type CSGDE90100BE in the Server name field.
3. Select SQL Server Authentication in the Authentication field.
4. Type sa in the Login field.
5. Type 1nf0r!!! in the Password field.
6. Click Connect. The Object Explorer opens in the left pane in Microsoft SQL Server
Management Studio and displays the list of nodes for the CSGDE90100BE database.
7. Expand the Databases node in the Object Explorer on the left side of the screen.
8. Select the CSI_Demo_App database.
9. Open Windows Explorer.
10. Go to Desktop in the left pane.
11. Open the MGCExercises folder.
12. Double-click the Rpt_MRCExercise1Sp.sql file displayed in the right pane. This opens a query
window and display the stored procedure on the right pane in Microsoft SQL Server Management
Studio.
13. Click Execute.

14. You should see a Command(s) completed successfully message. If not, inform your instructor.
15. Go to the Desktop
16. Make sure the MGCExercises folder is open.
17. Double-click the Rpt_MRCExercise51Sp.sql file displayed in the right pane. This opens a query
window and display the stored procedure on the right pane in Microsoft SQL Server Management
Studio.
18. Click Execute.
You should see a Command(s) completed successfully message. If not, inform your instructor.
19. Select File > Exit.
20. Select No on the Save changes to the following items? message.
21. The Microsoft SQL Server Management Studio application closes.

Part 2: Set User Preferences


1. Log in to CloudSuite using sa as the User ID, 1nf0r!!! as the Password and select
CSI_Demo_DALS as the configuration.
2. Select System > View > User Preferences.
3. Click the Runtime Behaviors tab.

Creating Reports Using Mongoose Reporting 29


© 2017 Infor Education
4. Select the Unload IDO Metadata with Forms check box.
5. Click OK.
6. Sign-out and sign back in to CloudSuite.

Part 3: Create a new IDO project


1. Open the IDO Projects form.
2. Click Filter In Place. A list of IDO projects displays in the left pane.
Note: The keyboard shortcut for this command is F4 and you will use that for the remaining
exercises in this course.
3. Click Create a new object in the current collection.
4. Type <initials>+Reports in the Project Name field. (Note: Project Name cannot have spaces.)
5. Press Tab to move the focus to the next field.
6. Type <initials>+Reports Project in the Description field.
7. Click Save on the toolbar.
8. Keep the IDO Projects form open.

Part 4: Create a new IDO


1. Click the New IDO button.
2. Type SLReportDataViews in the Extends field.
3. Press Tab.
4. Type <initial>CustomerOrders in the IDO Name field. You may choose to enter a description.
5. Click Finish.
The record is saved and the IDO’s form displays.
6. Confirm you can see ReportDataView under the Table Name column.

Part 5: Add an IDO Method as a data source


1. Click the New Method button.
2. Select Stored Procedure – Custom Load Method from the Method Type drop-down list.
3. Select the Stored Procedure you would like to use as a Data Source. In this case, type
Rpt_MRCExercise1Sp in the Stored Procedure field.
Note: See Appendix A for a copy of this stored procedure.
4. Select the Transactional check box.
5. Click OK.
The record is saved and the IDO’s form displays.

Part 6: Define the properties for the IDO


1. Click the New Property button.
2. Select the Unbound radio button.

30 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
3. Click Next.
4. Type CustNum in the Property Name field.
5. Type CustNum in the Property Class field.
6. Click Finish.
7. Enter the following properties by repeating the sequence of steps 1 through 6 while substituting
the data as per the table below.

Binding of the new Action Property Property Action


property Name Class

Unbound Click Price Amount Click


Next. Finish.

Unbound Click CoNum CoNumBase Click


Next. Finish.

Unbound Click Stat CoStatus Click


Next. Finish.

Unbound Click OrderDate DateTime Click


Next. Finish.

The IDOs form displays.

Part 7: Define the Custom Load Method Output Properties


1. Click the Methods button on the IDO’s form.
2. Click row 1 under the Property Name column and create the following rows by selecting from the
drop-down list and entering the sequence.

Property Name Sequence

CustNum 1

Price 2

CoNum 3

Stat 4

OrderDate 5

3. Click Save.
Creating Reports Using Mongoose Reporting 31
© 2017 Infor Education
4. Close the IDO Methods (Linked) form.
5. Close the IDOs form.
6. Close the IDO Projects form.
7. Log out of CloudSuite to discard the cache or press Ctrl+U and log back in.

Part 8: Create the DataView


1. Open the DataViews Setup form.
2. Click Filter In Place. A list of DataViews displays in the left pane.
Note: The keyboard shortcut for this command is F4 and you will use that for the remaining
exercises in this course.
3. Click Create a new object in the current collection.
4. Type <initials> Orders by Customer in the DataView field.
5. Set the Report Orientation to either Landscape or Portrait
6. Select row 1 of the General tab and overwrite the Source Type to IDO Method.
7. Select <initial>CustomerOrders from the IDO drop-down list.
8. Select Rpt_MRCExercise1Sp from the Source Name drop-down list.
9. Select Retrieve All from the Record Cap drop-down list.
10. Click Save on the toolbar.

Part 9: Create the input parameters


1. Click the Input Parameters tab on the DataViews Setup form.
2. Type 1 in row 1 under the Sequence column.
3. Type sStartingCustomer in row 1 under the Description column.
4. Type 2 in row 2 under the Sequence column.
5. Type sEndingCustomer in row 2 under the Description column.
6. Type 3 in row 3 under the Sequence column.
7. Type sStartingOrder in row 3 under the Description column.
8. Type 4 in row 4 under the Sequence column.
9. Type sEndingOrder in row 4 under the Description column.
10. Click Save on the toolbar.
11. Close the DataViews Setup form.

Part 10: Check-in the IDO


1. Open the IDO’s form.
2. Type your <initials>* in the IDO Name field.
3. Click Filter In Place and then select your IDO.
4. Click the Check In button.

32 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
5. Type <a reason> of your choice if prompted.
6. Click OK.
7. Click OK again in the message that displays.
8. Close the IDO’s form.

Part 11: Select the Output Properties you want to print on the DataView
1. Open the DataViews Setup form.
2. Click Filter In Place. A list of DataViews displays in the left pane.
3. Select the DataView you created which starts with your initials.
4. Select the Source Type for which you want to define Output Properties.
5. Click IDO Setup.
6. Select the properties you want to output on your DataView by checking off the corresponding
Selected field to the left of the property under the Properties section.
7. Select the following for this exercise:
o CoNum
o CustNum
o OrderDate
o Price
o Stat
8. Click OK on the DataView IDO Setup (Modal) form.
9. Click Save on the DataViews Setup form.

Part 12: Launch the DataView and save the layout


1. Click Launch.
2. Enter your input parameter values if you know them or go to the next step.
3. Click Finish.
The DataView Results form opens with the results of the DataView.

Creating Reports Using Mongoose Reporting 33


© 2017 Infor Education
4. Select Save As from the Layout drop-down list. The Save As form opens.
5. Type ReportOutput in the Layout field.
6. Select the Default check box.
7. Click OK. A message appears.
8. Click OK again.
9. Close the DataView Results form.
10. Refresh the collections in the DataViews Setup form.
11. Click the Layouts tab on the DataViews Setup form and confirm the layout you saved is listed
under the Layout column.
12. Close the DataViews Setup form.
13. Close all other open forms.

34 Lesson 1: Using IDO Methods with DataViews


© 2017 Infor Education
Check your understanding

DataViews are advanced data grids that you can create to query a custom set of data.
a) True
b) False

When data is returned from a DataView query, the results are typically displayed in a basic
_____ on the appropriate DataView results form.
a) Grid
b) Stored procedure
c) Report type
d) None of the above

Which of the following tabs comprise the DataViews Setup Form? Select all that apply.
a) General
b) Input Parameters
c) User Permission
d) Layouts
e) None of the above

Select the two IDO methods from the list below.


a) Standard Method
b) Custom Method
c) IDO Method
d) IDO Collection

DataView reports can be produced from any type of DataView result.


a) True
b) False

Creating Reports Using Mongoose Reporting 35


© 2017 Infor Education
Lesson 2: Creating a Report Type form
Estimated time
1 hour

Learning objectives
In this lesson, you will:
• Describe what a Report Type form is.
• The Reason for using Report Type forms.
• Create a quick Report Type form.

Topics
• Report Type forms
• Collections on report-template Report Type forms
• Selecting report properties on the New Forms Wizard
• Specifying report containers

36 Lesson 2: Creating a Report Type form


© 2017 Infor Education
Report Type forms
Why has CloudSuite changed the reporting mechanism?
The key reasons for changing the reporting mechanism in the application are as follows:
• Multi-tenant cloud - Allows separate custom reports for multiple tenants
• Mongoose integration - Common security, development environment, data sourcing, theming,
etc.
• Abstraction - Detach report definition from rendering technology
• Upgradable extensibility - Personalize reports without breaking future compatibility
• Eliminate third-party dependencies
The benefits of migrating the reporting mechanism to Mongoose Reporting not only helps our customers
when it comes to support but also have the benefit of seamless migration between system upgrades and
the provisioning of Workbench licenses as part of the core implementation.

Report Type form


Report Type forms are specialized Mongoose forms you can create to produce templates for your own
custom reports. Although they are true Mongoose forms, they behave a little differently than the more
common types of forms.
A report-template type of form contains only the layout and definition of a report. While it is possible to run
a report from this form, the normal practice is to create an associated Report Criteria form, similar to
those used to generate other types of reports.
As with other types of reports, you can generate this report on a regular basis, as a background task in
Mongoose, manually, or on demand.
Note: In the web client, you can view a report-template type form as a template, but you cannot use the
runtime preview function or generate a report from it.
The report type of form is designed to make it possible to create your own custom report-template forms
that you can then use to generate your custom reports. Create the report form using the New Form
Wizard.

The structure of a report-template type form


The basic report-template type form has two panes, the second of which is subdivided into five basic
regions, as in this example.

Creating Reports Using Mongoose Reporting 37


© 2017 Infor Education
Report Type form template

38 Lesson 2: Creating a Report Type form


© 2017 Infor Education
Collections on report-template type forms
Report-template forms support the use of both Primary Collections and Secondary Collections, but not
sub- collections. This is because the detail sections are designed to be repeatable sections and are
designed to handle only one row (record) of data at a time.
This means you cannot use components displaying more than one row of data at a time. This includes
grids, DataViews, list boxes, trees, and so on. Because sub-collections require the use of a grid to display
their data, this also means sub-collections cannot be used in report-template type forms.
You can, however, use multiple Secondary Collections to access and display the data you want for your
report. You can also establish multiple parent/child (/grandchild, /sibling, etc.) relationships between
collections.
The hierarchy between collections is established by means of a Parent Collection property. Available for
Secondary Collections only, this property allows users to specify a parent collection for each Secondary
Collection. This hierarchy is used when processing rows for the report to determine when each
Secondary Collection is to be processed.

Creating Reports Using Mongoose Reporting 39


© 2017 Infor Education
Example of a report
Here’s another example of what an actual finished report looks like.

Finished report

40 Lesson 2: Creating a Report Type form


© 2017 Infor Education
Using the New Form Wizard (NFW)
The process of creating a Report Type form is the same as when creating standard Mongoose forms.
The New Form Wizard (NFW) guides users through the necessary steps in the process of creating a
form based on existing IDOs and tables.
You can choose between the following types of forms:
• Multi View
• Grid only
• Query
• Build from Scratch
• Tile
• Detail Only
• Report
To use the wizard, you must be in Design Mode and select Form > Definition > New. You can also click
New Form Wizard on the toolbar to open the New Form Wizard.
You can create new forms or forms based on an existing form.

Creating Reports Using Mongoose Reporting 41


© 2017 Infor Education
Selecting report properties on the New Forms
Wizard
Use the Select Report Properties page of the New Form Wizard to:
• Define what regions and sub regions the wizard is to create for the new Report Type form.
• Specify whether the report form should use a portrait orientation or a landscape orientation.
• Select properties by which to order, group, and display the report data.
This page displays only if you are creating a report type of form.

New Form Wizard, Properties page


Use this page of the wizard to specify attributes for each IDO property to be represented on the newly
created form.
At the same time, on some form types (Multiview forms and Detail Only forms, for example), you can use
this page to define form pages and/or a notebook, if the property is intended to operate within one of
those container types.

Basic property specifications

Above the top right of the Properties grid, the wizard indicates whether you are working
with the properties of the Primary Collection or a sub-collection.

On this page, you can specify the order in which the properties are listed.
To adjust the order, select a property and then use the appropriate buttons to the right of the Properties
grid.

This specification determines the original order in which the components


display on the newly created form. You can also rearrange things to your
liking after the basic form is created.

This order is also the default tab order.

A caption for each component


The Caption property specifies the label for a component on the resulting form.
To specify a caption, enter a string of text or select an existing string from the Caption drop-down list. If
the string label does not already exist, the wizard provides the opportunity to create it here. For more
information, see About Strings.

Containment for each component


Use the Containment option to have the component display on a form page or a notebook tab.

42 Lesson 2: Creating a Report Type form


© 2017 Infor Education
Before you can use this option, you must first define the container in which you want the
component to appear.
These options are not available for Grid Only forms or Query forms.

Whether to include the property in the Grid View (Include in Grid)


Note: This is for Multiview forms only. To have the selected property represented by a column in the Grid
View as well as by a component in the Detail View, select this option. To have the property represented in
the Detail View but not in the Grid View, clear this option.

A component class for each component.


If a Component Class is specified for the property, the component class is applied to the property's
component in the resulting form. If the component class requires or accepts parameters, specify those
parameters in the Component Class Parameters field.

This option is not available for Query forms.

Where the properties will be used:


Properties selected to Include in Primary appear on the Primary Criteria tab.
Properties selected to Include in Additional are available for queries specified using the Additional
Criteria tab.
Values for properties selected to Include in Results are returned with the query results and display in the
Results grid.

These options are available only for Query forms.

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

Creating Reports Using Mongoose Reporting 43


© 2017 Infor Education
Specifying report containers
Before you can specify containment for any property, you must first specify at least one container. You
have two options for containers in the wizard:
To create the form as a multi-page form, specify one or more Form Page components.
To create the form with a notebook and tabs, you can specify only one notebook.
• Create as many tabs for the notebook as you would like, but if you want multiple notebooks, all
other notebooks must be created after the initial form creation.
• For each tab of the notebook, you have the option to specify a Notebook Tab Caption here. If the
string for the caption does not already exist, you have the option to create it here. If you do not
specify a caption, the wizard uses a default caption (Tab1, Tab2, etc.), which you can later
change.

Demo: Creating a simple Report Type form


Your instructor will demonstrate how to create a simple Report Type form.

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

Exercise 2.1: Create a simple Report Type form


In this exercise, you will create a simple Report Type form called <initial> Orders by
Customer Viewer Report as per the image below.

44 Lesson 2: Creating a Report Type form


© 2017 Infor Education
Exercise steps

Part 1: Sign in to CloudSuite


1. Sign in to CloudSuite with the credentials given to you by your instructor.
2. Click OK. The CloudSuite application opens displaying the toolbar and menus.

Part 2: Create the Orders by Customer Viewer Report Type form using the New Form Wizard
1. Set Name, Report Type, and Data Source.
2. Press Ctrl+E. The Design Mode opens.
Note: If the Identify Your Editing Scope dialog box appears, select Site Default from the
Scope drop-down list and then click OK.
3. Select Form > Definition > New. The New Form Wizard opens and the Create a new form
radio button is selected by default.
4. Click Next.
5. Type <initial> + Orders by Customer Viewer in the Name field.
6. Select Report from the Form Type drop-down list.
7. Type SLCos in the Data Source field.
8. Click Next.
9. Select OK if the Infor CloudSuite dialog box opens with the message, “Form <initial> + Orders
by Customer’ already exists—replace it?”

Part 3: Select properties


1. Select the << arrow to clear the Primary Collection properties.
2. Select the following properties and click the > arrow to move it under the Primary Collection
property window.
o CoNum
o CustNum
o DerCustName
o OrderDate
o Price
o Stat
3. Click Next.
Note: On the next page, you may choose to rearrange your properties in the manner you would
like them to appear on the report.

Part 4: Rearrange properties


1. Select the CustNum property from the Properties drop-down list and move it to the top of the
list.
2. Select the DerCustName property and move it up so that it is under the CustNum Property.
3. Click Next.

Creating Reports Using Mongoose Reporting 45


© 2017 Infor Education
Note: On the next page, you may choose which Regions you would like to see on your report, set
your Page Orientation and group the report based on selected properties. For this exercise, you
will group the records by CustNum property.

Part 5: Set grouping


1. Select CustNum from the Select Group Properties window.
2. Click the > arrow to select it.
3. Click Next.
4. Click Finish.
You should see your report in Design Mode. It will look similar to the illustration below.

Part 6: Test form


1. Press Ctrl+E. The Design Mode closes and the <initial> Orders By Customer Viewer form
displays.
2. Click Run to execute the report. The listings are ordered by customer.
3. Close the <initial> + Orders By Customer Viewer form.

46 Lesson 2: Creating a Report Type form


© 2017 Infor Education
Check your understanding

Report Type forms are specialized Mongoose forms that you can create to produce
templates for your own custom reports.
a) True
b) False

What type of collections do report-template forms support? Select all that apply.
a) Primary collections
b) Secondary collections
c) Sub-collections
d) None of the above

To create a Report Type form, you need to be in Design Mode.


a) True
b) False

To create a Report Type form, you need to use the following.


a) New Data Maintenance Wizard
b) New Form Wizard
c) Configuration Manager
d) Configuration Wizard
e) None of the above

Before you can specify containment for any property, you must first specify at least one
container.
a) True
b) False

Creating Reports Using Mongoose Reporting 47


© 2017 Infor Education
Lesson 3: Adding FlexLayout
components
Estimated time
2 hours

Learning objectives
In this lesson, you will:
• Describe what a FlexLayout Component is.
• Why you would need to know about FlexLayout Components?
• Explain how to add FlexLayout components to a Report Type form.
• Explain how to add Regions to a FlexLayout Component.
• Explain how to set FlexLayout and Region properties.
• Identify a Fixed Layout Report Type form and what it looks like

Topics
• Why do I need to know about FlexLayout components?
• FlexLayout regions
• About the orientation, pack and align attributes
• Edit FlexLayout Attributes dialog box
• FlexLayout properties specific to Report Type forms.
• What are character units?

48 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
Why do I need to know about FlexLayout
components?
Before now the only way to dynamically scale and move components on a form was by using the Glue
property. While Glue alone was powerful, it had its limitations. For example, if you wanted a component to
stay to the right of the form when it was resized, you could do that with Glue. The component will stretch
without leaving a lot of white space on your form.
But, what if we wanted to keep the user interface (UI) centered regardless of the size of the form,
essentially have the form react as most web sites do, where certain elements stay centered and the
margins expand and contract based on the application window size? This is where a FlexLayout paired
with Glue really shines.
The FlexLayout component is key when it comes to designing Report Type forms.
Without the knowledge of FlexLayout components and how they behave, you will not be able to
understand and create Report Type forms.

Understanding FlexLayout components


A FlexLayout component is a container component which is used to flexibly house other components.
Each FlexLayout component can be divided into different horizontal or vertical regions, and each region
can contain multiple child components. The overall positioning of those child components is specified by
the FlexLayout region attributes, and their order is specified by the Sequence property.
You can nest FlexLayout components inside regions of other FlexLayout components. You can nest
these components as many levels deep as you need to accomplish your form design.
A FlexLayout component can be customized by using the properties that are described in this topic.

FlexLayout container types


When using multiple regions, the FlexLayout component can group the regions horizontally or vertically.

Horizontal box

Vertical box

Creating Reports Using Mongoose Reporting 49


© 2017 Infor Education
FlexLayout regions
One specialized aspect of the Report type of form is that it is comprised entirely of FlexLayout regions
and subregions. We will discuss FlexLayouts in Lesson 4. This gives you a great deal of flexibility when
designing and laying out your Report form.
At the most basic level, the entire Report form is contained within two FlexLayout regions, by default
named NavigationFlexLayout and MainFlexLayout.

The Navigation FlexLayout region


The NavigationFlexLayout region hosts the various buttons used during runtime, when you are testing
and preparing the report for publishing. This part of the form does not print or publish when you generate
and publish the report.
The buttons, which are created by default as part of the Report form creation, include these:
• Run - This button allows you to run the report in a kind of "preview" mode. When you click this
button, the system displays the report exactly as it will appear in the published output.
• Design - This button allows you to view the basic "template" design on which the report output is
built. This can be useful especially when you are designing the report, as it shows you how each
region and subregion in the report is designed to display.
• Previous - When active, this button displays the page of the report that comes before the
currently displayed page.
• Next - When active, this button displays the page of the report that comes after the currently
displayed page.
• Export - This button publishes the report to a PDF file, after prompting you for the location to
which it should be created.

The Main FlexLayout region


The MainFlexLayout region contains all the content that is published when the report is generated. This
region itself contains these basic sets of subregions used to control the way the report information
displays:
• Report subregions - These include the Report Header and Report Footer subregions. The
Report Header subregion typically displays on just the first page of the report, before any records
are processed. It is typically used to show report options.
• Page subregions - These include the Page Header and Page Footer subregions. These
subregions display on each page and are configured on a page-by-page basis. Examples can
include page numbers, site information, user information, company logo, report title, and so on.
• Group subregions - These include the Group Header and Group Footer subregions. These are
included only if you specified at least one group property in the New Form Wizard. They are used
to order and group together data per the property they are grouped by.
• Detail subregions - These include the Detail Header, Detail, and Detail Footer subregions.
These subregions are generated repeatedly. The Detail Header displays before the first record in
the Detail collection. Then the Detail sub region displays once for each record in the collection.
Finally, the Detail Footer displays once after the last Detail record in the collection.
Each of these basic subregions can itself be a container for whatever additional subregions are required
to display the information on the report as desired.

50 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
Any FlexLayout components you add to the Report Type form are normal FlexLayout
components and do not include the special attributes built into the FlexLayout regions that
were created as part of the original form.
These basic subregions must specify a character-based length (height). The heights of
these subregions must be a fixed value, as opposed to a flexible value, so that the system
can accurately determine which regions can fit on each page as the report is generated.

Region length
The Length and Units attributes control the individual length of each region of a FlexLayout component.
Length is expressed as a number of characters, equal portions of the total available width (Flex units), or
as a combination of both.

Char units only

Flex units only

Combination of Char and Flex units

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

Creating Reports Using Mongoose Reporting 51


© 2017 Infor Education
About the orientation, pack, and align attributes
The orientation attribute specifies whether child components are arranged vertically or horizontally within
each region.
The pack and align attributes work together to position the child components within the region.

Vertical orientation
When the FlexLayout region is vertically oriented, use Align to position the child components at the left,
center, right, or to stretch them to fill the entire width of the region. Use Pack to position the child
components at the start (top), center (middle), or end (bottom) of the region.

Horizontal orientation
When the FlexLayout region is horizontally oriented, use Align to position the child components at the top,
middle, bottom, or to stretch them to fill the entire height of the region. Use Pack to position the child
components at the start (left), center (middle), or end (right) of the region.

52 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
Bottom alignment (when vertically oriented) and Right alignment (when horizontally
oriented) are not supported by the web client.

VisibleWhen
The VisibleWhen attribute specifies the conditions under which the component is visible or hidden.

VISIBLEWHEN keyword
The VISIBLEWHEN keyword specifies the conditions under which this component is visible. If you
reference variables, other components, or properties on collections on the form, WinStudio creates
dependencies so that when those values change, the condition is automatically executed.
The keyword is stored in the format specification and is not normally directly visible, because the
keyword's contents are placed into the Visible When field in the Component properties sheet. However, if
you are using the Use Free Form option, you must manually enter this keyword and its values in the free
form Data Type field.

Use the Edit Set of Conditional Actions dialog box from the Visible When field in the
properties dialog to build the appropriate expression when creating an Event Handler of
type Conditional Action.
This keyword is used in expressions stored in the forms database. However, in most
cases, you define the conditions for requiring the component by using the dialog box
described above.

Animation
The animation attribute is used to add a sliding and/or bouncing effect to a region when it is opened or
closed. Leave the field blank to disable animation, or select from these options:
• FromRight
• FromLeft
• FromTop
• FromBottom
• FromCenter
• FromRightWithBounce
• FromLeftWithBounce
• FromTopWithBounce
• FromBottomWithBounce
• FromCenterWithBounce

Background image
The Background Image attribute is used to add an image to the background of a region.

Creating Reports Using Mongoose Reporting 53


© 2017 Infor Education
Minimum/Maximum length
When a region size is defined as several flex units, use the Min/Max attribute to specify the maximum and
minimum possible size of that flex region.

Region margins
The Default Margin property specifies the margin, measured in WinStudio characters, that defaults for
any child components added to the current FlexLayout region.
The Margin property is used to override, if necessary, the Default Margin property for components
contained in the FlexLayout region.

54 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
Edit FlexLayout Attributes dialog box
Use the Edit FlexLayout Attributes dialog box to set the attributes and properties for FlexLayout
regions.
This dialog box is accessed by clicking Edit FlexLayout in the upper-left corner of any FlexLayout
component or component contained within a FlexLayout component.

FlexLayout properties and attributes


This topic lists and describes the properties and attributes you can set for FlexLayout components, using
the Edit FlexLayout Attributes dialog box.

Field/Option Description

Index column This field indicates the zero-based identification number of each region in the
FlexLayout component. These index numbers are assigned automatically when
the region is created.

Length This field indicates the number of units, either Flex or Char, that defines the width
or height of the flex region.
Note: The list on the left is read-only. You can enter the number of units in the
property sheet on the right.

Unit Use this field to specify the units used to calculate the Length of the region. This
drop-down list has these options:
• Char - Indicates the number of characters that fit in the region. This setting is
fixed and not affected by the length of other regions in the component.
• Flex - Indicates the relative portion occupied by the region. The absolute
length of the region varies, based on the Length of each Flex region, the total
number of regions, and the Minimum Length and Maximum Length property
specifications.

Orientation This option specifies how the components in this region are to be oriented:
• Fill - When using a single component for the region, selecting this option
causes the child to expand to fill the entire region. This option does not work if
there is more than one component in the region.
• Horizontal - This option causes components in the region to display in a single
horizontal row.
• Vertical - This option causes components in the region to display in a single
stacked (vertical) column.

Alignment The options available in this field depend on what option is selected for the
Orientation. If Orientation is set to:
• Fill, then this option is not available.
• Horizontal, then this field offers these options:
o Top - Aligns each component in the region to the top of the region.
o Middle - Aligns each component in the vertical middle of the space.

Creating Reports Using Mongoose Reporting 55


© 2017 Infor Education
Field/Option Description
o Stretch - Expands or contracts the component vertically to fill the available
space.
• Vertical, then this field offers these options:
o Left - Aligns each component in the region to the left side of the region.
o Center - Aligns each component in the horizontal center of the space.
o Stretch - Expands or contracts the component horizontally to fill the available
space.

Pack The options available in this field depend on what option is selected for the
Orientation. If Orientation is set to:
• Fill, then this option is not available.
• Horizontal, then this field offers these options:
o Start - Arranges the components sequentially, starting at the left edge of the
region.
o Center - Arranges the components in a group at the horizontal center of the
region.
o End - Arranges the components sequentially, with the last component
aligned with the right side of the region.
• Vertical, then this field offers these options:
o Start - Arranges the components sequentially, starting at the top of the
region.
o Center - Arranges the components in a group at the vertical center of the
region.
o End - Arranges the components sequentially, with the last component
aligned with the bottom of the region.

Minimum Length This field specifies the minimum allowable height or width of the region.
The Orientation option determines whether this applies to the height or the width.

Maximum Length This property specifies the maximum allowable height or width of the region.
The Orientation option determines whether this applies to the height or the width.

Default Margin This option establishes a default margin for all child components in this region,
calculated in WinStudio character units.

Background This option causes an image to display in the background of this region. You can
Image use only images that have been imported into the system.

VisibleWhen This option specifies the conditions in which this region is visible.
Clicking the ellipsis (…) opens the Edit Condition dialog box, which you can use
to set the conditions under which the region displays.

Animation This option specifies an animation effect that is used to display the region when it
becomes visible.

Contained Clicking this button launches the Edit Contained Components dialog box, which
Components is used to view and modify any components that are contained within this
FlexLayout component.

56 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
Field/Option Description
Note: The Edit Contained Components dialog box displays ALL components
contained within the FlexLayout component, regardless of which region contains
each contained component.

Region control Use this set of buttons, located in the lower-left corner of the Edit FlexLayout
buttons Attributes dialog box to add, delete, and rearrange the order of the regions in the
FlexLayout component.

Additional contained components


When adding contained components (other than a FlexLayout component) to a FlexLayout component,
these options can be specified:

These options are available in the Edit FlexLayout Attributes dialog box only for non-
FlexLayout contained components. To set them, click Edit FlexLayout in the upper-left
corner of the non-FlexLayout contained component.

Field/Option Description

Region Use this option to specify the index number of the region in which the child is placed.
Index Regions are numbered in the order in which they appear in the Edit Flex Layout
Attributes dialog box.
For example, to add a child component to the second region listed, specify 2 in the
Index column.
You can also use this option to move a component from one region of the FlexLayout
component to a different region.

Margin To use the Default Margin setting, leave this field blank.
To override the Default Margin property setting for this contained component, specify
new margins, using WinStudio characters units.
Note: You can have different left, top, right, and bottom margins by specifying four
numbers separated by commas.
For example, suppose you want to increase only the top margin. In this case, you would
specify 0,3,0,0 in this field.

Creating Reports Using Mongoose Reporting 57


© 2017 Infor Education
FlexLayout properties specific to Report Type forms
The properties and attributes listed and described in this section are used only for Report Type forms.
They are available only in the MainFlexLayout component on forms created by the New Form Wizard.

Other than Region Type, these attributes are not available with all regions of the main
FlexLayout component (MainFlexLayout). The additional properties and attributes available
depend on what Region Type is selected.

You can add FlexLayout components to a Report Type form after it has been created, but those
FlexLayout components will not have these properties and attributes.

Field/Option Description

Region Type This field names the type of region that the FlexLayout region is being used for.
Whatever is specified in this field determines other available Report properties.

Collection For detail-related regions, this field specifies what collection is the data source for
the detail.
Optionally, multiple regions can be specified for the same section, using
VisibleWhen expressions to show/hide regions.

Group Property For group-related regions, this field specifies the property used to group other
properties.

Repeat on New When a new page is created, this option causes the Detail Header (and Group
Page Header, if applicable) to be shown on the new page.
This option is used only for Detail Header and Group Header regions.

Repeat on When the last record for a collection has been displayed and the next record is
Collection from a different collection, this option causes the Detail Header (and Group
Change Header, if applicable) for the new collection to display before the first record for that
collection.
This option is used only for Detail Header and Group Header regions.

Insert Page This option causes a page break to be inserted before the region where this is set
Break Before to True.

Insert Page This option causes a page break to be inserted after the region where this is set to
Break After True.

Reset Page This option causes the page number (in the region this is set to True) to be reset to
Number 1. It also starts a new count for the total pages starting with that page.
For example, this can be useful on reports like invoices, where each invoice has
separate page numbering.

58 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
Field/Option Description

Can Grow When this option is set to True, all components of the region are checked to see
how much space they need based on the data of the current row. The region height
is then changed to allow for enough space to contain the components.
When this option is set to True, it forces the Orientation setting to Fill and makes
it read-only.

Sub-Report Form If you have another Report Type form that you want to use as a Sub-Report,
select the report from the drop-down list.

Sub-Report Use this field to supply any parameters required by the Sub-Report form specified
Parameters in the previous field.
To specify parameters, either enter them into this field or click the ellipsis (…) and
use the Specify Form Run Options dialog box to provide the parameters.
Values from any collection in the current context on the parent report form can be
used when calling the Sub-Report. This might include things like using
P(RowPointer) when calling a Sub-Report for related notes.

Accessing the Edit FlexLayout Attributes dialog box


The Edit FlexLayout Attributes dialog box is accessed by clicking Edit FlexLayout in the upper-left
corner of a FlexLayout component or any of its contained components.

Creating Reports Using Mongoose Reporting 59


© 2017 Infor Education
What are character units?
In WinStudio Design Mode, nearly all size and location measurements are calculated in terms of what we
call Mongoose "character units." This can be confusing to developers used to calculating sizes and
locations of objects in terms of pixels, ems, or other, more absolute units of measure.
Mongoose character units are calculated in terms relative to the size of the base font designated for the
Mongoose-based application, similar to percent measurement designations. These facts--that character
units are relative measurements and that their reference point is the base font size—are the two most
helpful things to keep in mind when trying to size or position components or other aspects of Mongoose
forms.

How are character units calculated?


To calculate the size of the character unit, you must:
Measure the combined width of eight different alpha characters (ABCMabcm) using the default font and
font size applied to the form. Calculate the average width of these eight characters as one-character unit.
Multiply the height of the characters by 1.2. This allows for characters extending below the baseline.

Demo: Creating a simple form using FlexLayout components


Your instructor will demonstrate how to create a simple form using FlexLayout components.

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

60 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
Exercise 3.1: Creating a simple form using FlexLayout components
In this exercise, you will create a form containing FlexLayout components which will look like
the picture below.

Exercise steps

Part 1: Import images to apply to the FlexLayout form


1. Press Ctrl+E. The Design Mode opens.
Note: If the Identify Your Editing Scope dialog box appears, select Site Default from the
Scope drop-down list and then click OK.
2. Select Edit > Image. The Images dialog box opens.
3. Click New. The Get image for [Link] dialog box opens.
4. Double-click the MRC_Images folder on the desktop (look for the folder called “MRC_Images”).
5. Select FF_Background.jpg in the list.
6. Click Open. The FF_Background.jpg file is listed in the Images dialog box list.
7. Repeat steps 3 – 6 to import the following images:
o FF_Demo.png
o FF_Notes.png
o FF_Reference.png
o FF_Slider.png
8. Click Done.

Creating Reports Using Mongoose Reporting 61


© 2017 Infor Education
9. Click Save.

Part 2: Create the <initial> Simple FlexLayout Form using the New Form Wizard
1. Press Ctrl+E. The Design Mode opens.
Note: If the Identify Your Editing Scope dialog box appears, select Site Default from the
Scope drop-down list and then click OK.
2. Select Form > Definition > New. The New Form Wizard opens and the Create a new form
radio button is selected by default.
3. Click Next.
4. Type <initial> + Simple FlexLayout Form in the Name field.
5. Select Build From Scratch from the Form Type drop-down list.
6. Click Next.
7. Click Finish. The new form opens in Design Mode.
8. Click the bottom end of the form and drag to make the form area larger.

Part 3: Add the Main FlexLayout component to the form and add regions
1. Click the Toolbox tab at the bottom left of the design pane.
2. Click the FlexLayout component and draw a rectangle to cover the full design area of the form.
3. Type MainFlexLaout in the Name field under the Design node of the Component Properties
tab.

4. Click anywhere inside the form design pane. The Edit FlexLayout icon displays on the top-
left corner of the form.
5. Click the Edit FlexLayout icon. The Edit FlexLayout Attributes form opens.
6. Click the first row under the Regions window.
7. Click Insert twice to create two (2) new regions. Three (3) regions with an index of 0, 1 and 2
appear under the Regions field.
8. Select the second row with the index of 1.
9. Select Char from the Unit drop-down list on the right pane of the Regions area.
10. Type 100 in the Length field.
11. Click OK.

Part 4: Set a background color to the left- and right-most regions


1. Click the Edit FlexLayout icon. The Edit FlexLayout Attributes form opens.
2. Select the first row with the index of 0.
3. Use the scroll bar on the right pane of the Regions area to scroll down until you locate the
Appearance node.
4. Select the FF_slider.png image from the Background Image drop-down list.
Note: To use any image, you need to import the image prior to using it.

62 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
5. Select the third row with the index of 2.
6. Use the scroll bar on the right pane of the Regions area to scroll down until you locate the
Appearance node.
7. Select the FF_slider.png image from the Background Image drop-down list.
8. Click OK.

Part 5: Glue the right and bottom of the form


1. Click the Components tab located under the Properties area to the right of your screen.
2. Expand the Layout > Glue nodes.
3. Select True for the Bottom and Right values from their respective drop-down lists.
4. Save the form changes and exit the Design Mode.
5. Click and hold the right border of the form and drag the cursor to the right to make the form
larger.
Note: Notice the form expands and increases the size of the Left and Right regions while the
center region’s size maintains the set character spacing of 100 you set previously.

Part 6: Add a FlexLayout into the center region of the Main FlexLayout
1. Press Ctrl+E. The Design Mode opens.
Note: If the Identify Your Editing Scope dialog box appears, select Site Default from the
Scope drop-down list and then click OK.
2. Click the FlexLayout component from the Toolbox tab and then click in the center region.
3. Select the bottom of the added FlexLayout and make it the same size as the center region.
4. Click in the center region and then click the Edit FlexLayout icon at the top-left corner of the
newly added FlexLayout component. The Edit FlexLayout Attributes form opens.
5. Select VerticalBox from the Type drop-down list.
6. Click the first row under the Regions window.
7. Click Insert six (6) times to insert six (6) VerticalBox regions.
8. Change the length of the following index regions as per the values below.

Index Length

0 3

1 1

2 15

3 1

Creating Reports Using Mongoose Reporting 63


© 2017 Infor Education
Index Length

4 16

5 1

6 10

9. Click OK.

Part 7: Add a banner, buttons, and text into the center region of the Main FlexLayout
1. Click in the center region and then click the Edit FlexLayout icon that appears at the top-left
corner of the FlexLayout component. The Edit FlexLayout Attributes form opens.
2. Select the row for index 2.
3. Use the scroll bar on the right pane of the Regions area to scroll down until you locate the
Appearance node.
4. Select the FF_Background.png image from the Background Image drop-down list.
5. Click OK.
6. Save the form changes.

Part 8: Add a FlexLayout component to region 4 of the Main FlexLayout


1. Click in the center region of the Main FlexLayout.
2. Click the FlexLayout component in the Toolbox tab and then click in the index 4 of the center
region which is the 5th region of the center region of the Main FlexLayout.
3. Select the bottom of the added FlexLayout and make it the same size as the index 4 regions.

Part 9: Insert three regions to the FlexLayout component added to region 4 of the Main FlexLayout
1. Click the Edit FlexLayout icon that appears at the top-left corner of the newly added FlexLayout
component. The Edit FlexLayout Attributes form opens.
2. Click the first row under the Regions window.
3. Click Insert twice to create two (2) new HorizontalBox regions.

Part 10: Set Background for index 0


1. Select the row for index 0.
2. Use the scroll bar on the right pane of the Regions area to scroll down until you locate the
Appearance node.
3. Select the FF_Demo.png image from the Background Image drop-down list.

Part 11: Set Background for index 1


1. Select the row for index 1.

64 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
2. Use the scroll bar on the right pane of the Regions area to scroll down until you locate the
Appearance node.
3. Select the FF_Notes.png image from the Background Image drop-down list.

Part 12: Set Background for index 2


1. Select the row for index 2.
2. Use the scroll bar on the right pane of the Regions area to scroll down until you locate the
Appearance node.
3. Select the FF_Reference.png image from the Background Image drop-down list.
4. Click OK.

Part 13: Add a FlexLayout component to region 6 of the MainFlexLayout


1. Click in the center region of the Main FlexLayout.
2. Click the FlexLayout component in the Toolbox tab and then click in the index 6 of the center
region.
3. Select the bottom of the added FlexLayout and make it the same size as the index 6 region.
4. Click the Edit FlexLayout icon that appears at the top-left corner of the newly added FlexLayout
component. The Edit FlexLayout Attributes form opens.
5. Click the first row under the Regions window.
6. Click Insert to create a new HorizontalBox regions.
7. Select the row for index 0.
8. Type 15 in the Length field.
9. Select the row for index 1.
10. Type 15 in the Length field.
11. Click OK.

Part 14: Add text to the two regions


1. Add static component to region index 0
2. Click the Static component in the Toolbox tab and then click in the index 0 of the embedded
FlexLayout component.
3. Select the bottom of the added Static component and make it the same size as the region.
4. Type sText1 in the Caption field of the static1 component property.
5. Click the ellipsis in the Caption field and create the string value for sText1.
6. Select Left from the Justification drop-down list under the Appearance node.
7. Select Miscellaneous > Specific Attributes field from the component property window and
select No Colon = True.
8. Add static component to region index 1
9. Click the Static component in the Toolbox tab and then click in the index 1 of the embedded
FlexLayout component.

Creating Reports Using Mongoose Reporting 65


© 2017 Infor Education
10. Select the bottom of the added Static component and make it the same size as the region.
11. Type sText2 in the Caption field of the static2 component property.
12. Click the ellipsis in the Caption field and create the string value for sText2.
13. Select Left from the Justification field drop-down list under the Appearance node.
14. Select the Miscellaneous > Specific Attributes field from the component property window and
select No Colon = True.
15. Save the form changes.
16. Exit the Design Mode.
17. Press Ctrl+U to unload the global object.
18. Test the form.

66 Lesson 3: Adding FlexLayout components


© 2017 Infor Education
Check your understanding

A FlexLayout component is not a container component which is used to flexibly house


other components.
a) True
b) False

When using multiple regions, the FlexLayout component can be grouped as follows:
a) Horizontally
b) Vertically
c) Diagonally
d) None of the above

FlexLayout components can be embedded with regions of another FlexLayout component.


a) True
b) False

Other than Region Type, certain attributes are not available with all regions of the Main
FlexLayout component (MainFlexLayout). The additional properties and attributes available
depend on what Region Type is selected.
a) True
b) False

Mongoose character units are calculated in terms relative to the size of the base font
designated for the Mongoose-based application.
a) True
b) False

Creating Reports Using Mongoose Reporting 67


© 2017 Infor Education
Lesson 4: Adding components
Estimated time
1 hour

Learning objectives
After completing this lesson, you will be able to:
• Identify the different types of components that can be used in a Report Type form.
• Explain how to add components to a FlexLayout Region.
• Explain how to add images to a Report Type form.
• Explain how to add Sub totals and Grand Totals to a Report Type form.
• Know how to set Report Type form properties.

Topics
• Component types

68 Lesson 4: Adding components


© 2017 Infor Education
Component types
WinStudio supports a wide variety of components for the presentation and manipulation of data in forms.
These components are available for selection both in the Design Mode Toolbox and in the Component
property sheet, Type property.

To deselect all component types in the Toolbox tab, select the Pointer option.

This table names and describes each of the currently supported component types.

Component
Description
type
Browser This component type points to a URL or displays an HTML code.

Button This component type creates a button image that a user can click to do something.
(Push button) It’s generally used to initiate an action, such as running a procedure or launching
another form.

Calendar This component type creates a calendar similar to the Outlook® calendar.
See About calendar components.

Chart This is a component used to define a chart.

Check box This is a component with two states: Selected (checked) and cleared (unchecked).
This component is used for making choices where there are only two options, such
as Yes and No.

Combo box The "combo box," or "combination box," is a combination of editable fields and drop-
down lists. The combo box allows users to either type text directly into the
component or to select from a drop-down list of values. Like the drop-down list, the
combo box displays the list only when a drop-down arrow is clicked. Otherwise, it
displays the currently selected item in the edit-box portion of the control.

DataView This component type displays queried data in a layout similar to an Excel®
spreadsheet.

Date combo This is a special kind of combo box for entering dates. When a drop-down arrow is
clicked, an interactive calendar displays, allowing the user to select a date. The user
can also enter the date in the field, using the format mm/dd/yyyy.

Diagram This is a component allowing Event Handler diagrams to be displayed.

Drop list This is a component allowing data to be displayed and selected from a drop-down
list of values. Unlike the list field, the drop-down list displays the list only when a
drop-down arrow is clicked. Otherwise, it displays the currently selected item.

Creating Reports Using Mongoose Reporting 69


© 2017 Infor Education
Component
Description
type
Edit This is a component used for displaying and inputting text by means of standard
keyboards.

FlexLayout This is a container type of component allowing flexible positioning of the components
within it.

Form page This is a container component used as an individual page of a for. It is often used to
implement wizard-style user interfaces.

Gauge This is a component used to define a FusionCharts gauge.

Grid This is a container component allowing data to be displayed and maintained in a


tabular format.

Grid column This is a component that creates a column in a grid component.


Note: This component is not available from the Toolbox.
• It can only be created using the Edit Contained Components dialog box.
• It can be edited in the Edit Contained Components dialog box or, after selecting
it in the Type property field, in the component property sheet.

Group box This is a labeled box used to frame a group of related components. This is a
container component.

Hyper Link This is a specialized button component allowing users to create a button that looks
button and behaves like standard hyperlinked text.

Infocon This is a container component used to display tile forms in a variety of


configurations.

List This is a component allowing data to be displayed and selected from a list of values.

Menu item This is a specialized component that places an entry on the Actions menu.
(Obj Menu
Item)
Multi Line Edit This component type is used for displaying and inputting of large blocks of text. The
component wraps the text at word boundaries. Vertical scrolling is supported.

Notebook This is a container component allowing other components to be grouped together on


tabs. Only the components on the currently selected tab are visible to the user.
Notebooks are useful for grouping components and managing screen space.

Notebook tab This is a container component that creates an individual tab of a notebook
component. This component can contain any number of other components and
component types.
Note: This component is not available from the Toolbox.
• It can only be created using the Edit Contained Components dialog box.
• It can be edited in the Edit Contained Components dialog box or, after selecting
it in the Type property field, in the component property sheet.

70 Lesson 4: Adding components


© 2017 Infor Education
Component
Description
type
Radio button Radio (option) buttons are implemented in groups with each button representing a
member of a set of mutually exclusive options. The user can select only one option
in the group.

Static This is a component used for displaying read-only text, such as component labels. It
can also be used for displaying graphics images.

Toolbar This is a specialized component that creates a button intended to appear on the
button toolbar.

Tree This component type allows data to be displayed and selected in a tree structure
built on parent-child relationships between properties in collections.

User Control This is a component that acts as a container for a .NET user-created control.

Vertical Grid This is a container component that formats a collection data in a two-column grid
displaying property names in the left column and the property values in the right
column.

Vertical Grid This is a specialized component that creates a single element for a vertical grid
Element component. Each element represents a name-value pair for a single property of a
collection record.
Note: This component is not available from the Toolbox.
• It can only be created using the Edit Contained Components dialog box.
• It can be edited in the Edit Contained Components dialog box or, after selecting
it in the Type property field, in the component property sheet.

Demo: Adding components to a Report Type form


Your instructor will demonstrate how to add components to a Report Type form.

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

Creating Reports Using Mongoose Reporting 71


© 2017 Infor Education
Exercise 4.1: Add components to a Report Type form
In this exercise, you will add some components to a form. Then, you will arrange and align
them with each other or existing form components.

Exercise steps

Part 1: Open form and enter Design Mode


1. Open the <Initials> + Orders by Customer Viewer Report Type form you created in lesson 2.
2. Press Ctrl+E. The Design Mode opens.
Note: If the Identify Your Editing Scope dialog box appears, select Site Default from the
Scope drop-down list and then click OK.

Part 2: Delete region and add regions to the CustNumGroupFooterFlexLayout


3. Click the Components tab in the properties pane on the right side of the edit screen.
4. Select the MainFlexLayout component property from the Component drop-down list on top of
the properties pane.
Note: The Main FlexLayout is highlighted on the design pane.
5. Click the Edit FlexLayout icon on the Main FlexLayout.
6. Scroll through the Regions until you locate the DetailFooter region and delete it by clicking X at
the bottom of the Region window. It should be Region Index 5.
7. Click OK.
8. Select CustNumGroupFooterFlexLayout from the component property on the right of your
screen.
9. Expand the Layout node and then click the ellipsis next to the Flex Attributes field. The Edit
FlexLayout Attributes for the CustNumGroupFooterFlexLayout opens.
10. Insert 4 Regions by clicking Insert.
Note: You should see five regions 0-4 displayed under the Regions pane.
11. Click OK.

Part 3: Delete the ‘Status’ header and detail properties that have already been added to the Report
Type form
1. Select the DetailHeaderLayout component property from the Component drop-down list on top
of the properties pane.
Note: The DetailHeaderLayout is highlighted on the design pane.
2. Click the Edit FlexLayout icon on the DetailHeaderLayout.
3. Scroll through the Regions until you locate the Status region and delete it by clicking X at the
bottom of the Region window. It should be Region Index 5.
4. Click OK.
Note: Ignore the message that is displayed.

72 Lesson 4: Adding components


© 2017 Infor Education
5. Select the DetailFlexLayout component property from the Component drop-down list on top of
the properties pane.
Note: The DetailFlexLayout is highlighted on the design pane.
6. Click the Edit FlexLayout icon on the DetailFlexLayout.
7. Scroll through the Regions until you locate the Status region and delete it by clicking X at the
bottom of the Region window. It should be Region Index 5.
8. Click OK.
Note: Ignore the message that is displayed.
9. Save the form changes.
10. Click anywhere in the MainFlexLayout and the message disappears.

Part 4: Add regions to the Group Footer regions of the MainFlexLayout for the customer totals
1. Click the Component tab on the right of the design window.
2. Select CustNumGroupFooterFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.
5. Click Insert four (4) times. You should see five regions. (0-4) displayed under the
CustNumGroupFooterFlexLayout.
6. Click OK. This closes the Edit FlexLayout Attributes form.

Part 5: Add a total to the CustNumGroupFooterFlexLayout


1. Add static component for the customer total
2. Select the Static component from the ToolBox on the left of the design window.
3. Click in the Region under the Total Price property to add the static component.
4. Confirm the static component’s property is selected.
5. Type CustTotal in the Name field.
6. Click the ellipsis next to the Binding field under the Data Source node.
7. Select Aggregate from the Type drop-down list.
8. Click Edit.
9. Select Summary from the Function drop-down list.
10. Select Object from the Collection drop-down list.
11. Select Price from the Property drop-down list.
12. Set the condition for the customer total
13. Select the CustNum property under the Group By field.
14. Select Add > Button.
15. Click OK.
Creating Reports Using Mongoose Reporting 73
© 2017 Infor Education
16. Click OK again on the Edit Component Data Binding form.
17. Expand the Inheritance node.
18. Type AmountVar in the Component Class field.
19. Expand the Miscellaneous node.
20. Expand the Specific Attributes node.
21. Change the value in the No Colon field to True.

Part 6: Add a label for the total field added to the CustNumGroupFooterFlexLayout
1. Select a Static component from the ToolBox and then click under the Order Date field on the
report. This inserts the static component in the respective region.
2. Click the Component tab for the static component you just added.
3. Type Total in the Name field.
4. Type sCustTotal in the Caption field.
5. Create the string if it’s not already created.
6. Save the form changes.

Part 7: Add regions to the Report Footer regions of the MainFlexLayout for the report totals
1. Click the Component tab on the right of the design window.
2. Select ReportFooterFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.
5. Click Insert four (4) times. You should see five regions (0-4) displayed under the
ReportFooterFlexLayout.
6. Click OK. This closes the Edit FlexLayout Attributes form.

Part 8: Add a report total


1. Add static component for the report total
2. Select the Static component from the ToolBox on the left of the design window.
3. Click in the Region under the Total Price property to add the static component.
Note: This should be the second cell below the Total Price property.
4. Confirm the static component’s property is selected.
5. Type ReportTotal in the Name field.
6. Click the ellipsis next to the Binding field.
7. Select Aggregate from the Type drop-down list.
8. Click Edit.
9. Select Summary from the Function drop-down list.

74 Lesson 4: Adding components


© 2017 Infor Education
10. Select Object from the Collection drop-down list.
11. Select Price from the Property drop-down list.
12. Click OK.
13. Click OK again on the Edit Component Data Binding form.
14. Set display properties
15. Expand the Miscellaneous node.
16. Expand the Specific Attribute node.
17. Select True in the No Colon field.

Part 9: Add a label for the report total


1. Select a Static component from the ToolBox and then click under the Customer Total field on
the report. This inserts the static component in its respective region.
2. Click the Component tab for the static component you just added.
3. Type ReportTot in the Name field.
4. Type sReportTotal in the Caption field.
5. Create the string if it’s not already created.
6. Select the Inheritance node.
7. Type AmountVar in the Component Class field.
8. Expand the Miscellaneous node.
9. Expand the Specific Attribute node.
10. Select True in the No Colon field.
11. Save the form changes.

Part 10: Set page breaks, can grow and repeat column heading attributes
1. Click the Components tab in the Properties pane on the right side of the edit screen.
2. Select the MainFlexLayout component property from the Components drop-down list.
3. Expand the Layout node and then click the ellipsis next to the Flex Attributes field. The Edit
FlexLayout Attributes for the MainFlexLayout opens.
4. Select Region Index 2. This is the GroupHeader region for customer.
5. Type True in the Repeat on New Page field.
6. Select Region Index 3. This is the DetailHeader region for customer.
7. Type True in the Repeat on New Page field.
8. Select Region Index 4. This is the Detail region for customer.
9. Type True in the Can Grow field.
10. Click OK.
11. Save the form changes.
12. Exit the Design Mode by pressing CTRL+E.
Creating Reports Using Mongoose Reporting 75
© 2017 Infor Education
13. Click Run to test the report.

Part 11: Drawing a line within a FlexLayout component


1. Click the Components tab in the Properties pane on the right side of the edit screen.
2. Select the MainFlexLayout component property from the Components drop down list.
3. Expand the Layout node and then click the ellipsis next to the Flex Attributes field. The Edit
FlexLayout Attributes for the MainFlexLayout opens.
4. Select Region Index 5. This is the CustNumGroupFooterFlexLayout.
5. Click Insert to insert a region above the CustNumGroupFooterFlexLayout.
6. Click OK.
7. Select a Static component from the ToolBox and then click in the newly created region.
8. Click the Components tab in the Properties pane on the right side of the edit screen.
9. Expand the Miscellaneous node.
10. Expand the Specific Attributes node.
11. Select True in the Solid field.
12. Select the newly inserted region from the Edit FlexLayout Attributes form of the
MainFlexLayout.
13. Type 0.15 in the Length field.
14. Type GroupFooter in the Region Type field.
15. Type CustNum in the Group Property field.
16. Click OK.
17. Save the form changes.
18. Exit the Design Mode by pressing CTRL+E.
19. Click Run to test the report.

76 Lesson 4: Adding components


© 2017 Infor Education
Check your understanding

WinStudio supports a wide variety of components for the presentation and manipulation of
data in forms. These components are available for selection both in the Design Mode
Toolbox and in the Component property sheet, Type property.
a) True
b) False

What are some of the valid components that can be added to a form?
a) Combo Box
b) Edit
c) Notebook
d) Grid
e) All the above

You can add a component that is not on the Toolbox to a form.


a) True
b) False

Creating Reports Using Mongoose Reporting 77


© 2017 Infor Education
Lesson 5: Using Secondary Collections
Estimated time
2.5 hours

Learning objectives
In this lesson, you will:
• Explain what a Secondary Collection is and why you would want to use one.
• Explain how to add a Secondary Collection to a Report Type form.
• Explain how to link a Secondary Collection to the parent collection.
• Explain how to layout components from a Secondary Collection onto a Report Type form.

Topics
• What is a Secondary Collection and why would you need to use one?
• Understanding collection hierarchy in Report Type forms

78 Lesson 5: Using Secondary Collections


© 2017 Infor Education
What is a Secondary Collection and why would you
need to use one?
A Secondary Collection is an additional IDO collection associated with, and bound to a form to extract
data from different tables without having to write code.
A Secondary Collection may or may not be directly related to the Primary Collection on a form. With the
proper settings, a Secondary Collection is used as a sub-collection.
For example, if you select the IDO “SLCos,” this makes the properties bound within that IDO, which is
primarily customer order header information available to the user. However, if you want to see the
customer order line details, you can add the IDO called “SLCoitems” and by linking the two IDOs, the
user now has access to the customer order line details as well.

Secondary collection on the DataViews Setup form – General tab

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

Creating Reports Using Mongoose Reporting 79


© 2017 Infor Education
Understanding collection hierarchies in Report Type
forms
Report Type forms can include data from several different IDO collections in a single report. This is done
by adding Secondary Collections to the Report Type form and then retrieving specific data from each
collection.
This Secondary Collection data can also be retrieved in a hierarchical fashion, by specifying the Primary
Collection or another Secondary Collection as the "parent" of a given collection. This is done by setting
the Parent Collection property of a Secondary Collection to specify the collection you want as the "parent"
collection. The parent collection might or might not be the Primary Collection.
This hierarchy determines the order in which each collection's data is processed in the report output.
For example, suppose you wanted to produce a report of customer orders that includes any notes, order
lines, and shipment information, similar to this:

Order
Order Notes
Order Lines

Order Line Notes


Order Shipments
Order Shipment Notes

In this example, the Order IDO collection is the Primary Collection. There are five Secondary Collections,
one for each "descendant" of order.
As we have set it up, two of these Secondary Collections--Order Notes and Order Lines--are set up to
use the Primary Collection, Order, as the "parent" collection. The Order Line Notes collection and Order
Shipment collection are set up with the Order Lines collection as their parent collections. The Order
Shipment Notes collection is set up with Order Shipments as its parent collection.

Order
Order Notes (Parent collection: Order)
Order Lines (Parent collection: Order)
Order Line Notes (Parent collection: Order Lines)
Order Shipments (Parent collection: Order Lines)
Order Shipment Notes (Parent collection: Order Shipments)

80 Lesson 5: Using Secondary Collections


© 2017 Infor Education
Demo: Create a Report Type form using a stored procedure
Your instructor will demonstrate how to create a Report Type form using a stored procedur.

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

Exercise 5.1: Create a Report Type form using a stored procedure


In this exercise, you will create a new IDO, use a stored procedure as the data source, add
IDO properties, assign input parameters, assign output properties, and create a Report Type
form as shown below.

Order Details Report

Exercise steps

Part 1: Open existing IDO project


1. Verify you are logged in to CloudSuite. If not, log in to the system.
2. Open the IDO Projects form.

Creating Reports Using Mongoose Reporting 81


© 2017 Infor Education
3. Type <initials>+Reports in the Project Name field.
4. Click Filter In Place.

Part 2: Create a new IDO


1. Click New IDO.
2. Type SLReportDataViews. in the Extends field and then press Tab.
3. Type <initial>CustomerOrderDetails in the IDO Name field. You may choose to type a
description.
4. Click Finish. The record saves and the IDO’s form displays.
5. Confirm you see ReportDataView under the Table Name column.

Part 3: Add an IDO Method as a data source


1. Click New Method.
2. Select Stored Procedure – Custom Load Method from the Method Type drop-down list.
3. Select Rpt_MRCExercise51Sp from the Stored Procedure drop-down list.
Note: See Appendix B for a copy of this stored procedure.
4. Select the Transactional check box.
5. Click OK. The record saves and the IDO’s form displays

Part 4: Define the properties for the IDO


1. Click New Property. The New Property (Modal) form opens.
2. Select the Unbound radio button.
3. Click Next.
4. Type CustNum in the Property Name field.
5. Type CustNumBase in the Property Class field.
6. Click Finish.
7. Enter the following properties by repeating the sequence of steps 1 through 6 while substituting
the data as per the table below.

Binding Action Property Name Property Class Action

Unbound Click Next Price Amount Click Finish

Unbound Click Next CoNum CoNumBase Click Finish

Unbound Click Next Stat CoStatus Click Finish

Unbound Click Next OrderDate DateTime Click Finish

82 Lesson 5: Using Secondary Collections


© 2017 Infor Education
Binding Action Property Name Property Class Action

Unbound Click Next CurrCode CurrCodeBase Click Finish

Unbound Click Next Item ItemBase Click Finish

Unbound Click Next QtyOrd QtyPerNoNeg Click Finish

Unbound Click Next CoLine CoLineBase Click Finish

Unbound Click Next DueDate DateTime Click Finish

Unbound Click Next UM UMBase Click Finish

Unbound Click Next PriceConv Amount Click Finish

Unbound Click Next ItemDesc ItemDescription Click Finish

Unbound Click Next ExtendedPrice Amount Click Finish

Unbound Click Next coiNoteExistsFlag Boolean Query Click Finish

Unbound Click Next coiRowPointer RowPointer Click Finish

Part 5: Define the Custom Load Method Output properties


1. Click Methods on the IDO’s form.
You should see five (5) parameters already populated. These are the input parameters coming
through from the stored procedure. Note: The number of parameters depends on each stored
procedure.
2. Click row 1 under the Property Name column and create the following rows by selecting the
drop-down list and entering the sequence.

Property Name Sequence

CustNum 1

Price 2

CoNum 3

Creating Reports Using Mongoose Reporting 83


© 2017 Infor Education
Property Name Sequence

Stat 4

OrderDate 5

CurrCode 6

Item 7

QtyOrd 8

CoLine 9

DueDate 10

UM 11

PriceConv 12

ItemDesc 13

ExtendedPrice 14

coiNoteExistsFlag 15

coiRowPointer 16

The sequence of these properties should match the sequence of the return properties on the
stored procedure. If not, you will have errors.
3. Click Save.
4. Close the IDO Methods (Linked) form.
5. Close the IDOs form.
6. Close the IDO Projects form.

Part 6: Create the Order Details Viewer Report Type form using the New Form Wizard

Set Name, Report Type, and Data Source


1. Press Ctrl+E. The Design Mode opens.
Note: If the Identify Your Editing Scope dialog box appears, select Site Default from the
Scope drop-down list and then click OK.

84 Lesson 5: Using Secondary Collections


© 2017 Infor Education
2. Press CTRL+U to unload global form objects.
3. Select Form > Definition > New. The New Form Wizard opens and the Create a new form
radio button is selected by default.
4. Click Next.
5. Type <initial>OrderDetailsReportViewer in the Name field.
6. Select Report from the Form Type drop-down list.
7. Type <initials>CustomerOrderDetails in the Data Source field.
8. Click Next.
9. Click OK if the Infor CloudSuite dialog box opens with the message, “Form <initial> + Orders by
Customer’ already exists—replace it?”

Select properties
1. Select the << arrow to clear the Primary Collection properties.
2. Select the following properties and click the > arrow to move them under the Primary Collection
Property window.
o CoNum
o CustNum
o CoLine
o CurrCode
o DueDate
o ExtendedPrice
o Item
o ItemDesc
o PriceConv
o QtyOrd
o UM
o coiNoteExistsFlag
o coiRowPointer
3. Click Next.

Rearrange properties
Note: Rearrange the properties so they’re in the following sequence. Use the <up arrow> and <down
arrow> to achieve the desired position.
• CustNum
• CoNum
• CoLine
• Item
• ItemDesc
• DueDate
• QtyOrd
• UM
• PriceConv
• CurrCode
• ExtendedPrice

Creating Reports Using Mongoose Reporting 85


© 2017 Infor Education
• coiNoteExistsFlag
• coiRowPointer

Set captions where required


1. Type sUnitPrice under the Caption field for the PriceConv property.
2. Click Add next to the field you just entered.
If there is no response, this means the string value exists in the Strings Table. If not, a message
displays asking whether you want to create the string.
3. Click OK to create the string.
4. Type sExtendedPrice under the Caption field for the ExtendedPrice property.
5. Click Add next to the field you just entered.
If there is no response, this means the string value exists in the Strings Table. If not, a message
displays asking whether you want to create the string.
6. Click OK to create the string.
7. Click Next.

Select regions and orientation


1. Clear the Report Header and Report Footer check boxes.
2. Select the Landscape radio button within the Orientation field.

Set grouping
1. Select CustNum from the Select Group Properties window.
2. Click the > arrow to select it.
3. Select CoNum from the Select Group Properties window.
4. Click the > arrow to select it.
5. Click Next.
6. Click Finish. You should see the report in Design Mode.
It should look similar to the illustration below:

86 Lesson 5: Using Secondary Collections


© 2017 Infor Education
Part 7: Attaching the load method and defining input parameters
1. Select the Form tab from the right of the design window.
2. Click the Collections tab.
3. Select Rpt_MRCExercise51Sp from the Custom Load Method drop-down list.
4. Click the ellipsis in the Method Parameters field. The Edit Method Parameters form opens.
5. Click New. You will enter five (5) input parameters
6. Enter the values on the table below into the respective fields.

Type Value Type Value < Action when completed >

Variant Variable ExOptBegCust_num OK, New

Variant Variable ExOptEndCust_num OK, New

Variant Variable ExOptBegCo_num OK, New

Variant Variable ExOptEndCo_num OK, New

Variant Variable pSite OK

7. Click OK to close the Edit Method Parameters form.


8. Click Save to save the form.

Creating Reports Using Mongoose Reporting 87


© 2017 Infor Education
Part 8: Hide the Customer and Order fields from the header row and format fields in the
DetailHeaderFlexLayout
1. Click the Component tab on the right of the design window.
2. Select DetailHeaderFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens,
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.
You will see 11 regions (0-10). These are the regions within the DetailHeaderFlexLayout. If you
click any of these regions, it highlights the said region on the report.

Hide region index 0


1. Click the first region which is index 0.
2. Type 0 in the Length field.
Note: As you lose focus on the field, the Customer field disappears from the report.
3. Hide region index 1
4. Click Region 1. This is the second flex region within the DetailHeaderFlexLayout.
5. Type 0 in the Length field.
Note: As you lose focus on the field, the Order field disappears from the report.

Set length for region index 4


1. Click Region Index 4. This is the Item Description field on the FlexLayout.
2. Type 20 in the Length field.

88 Lesson 5: Using Secondary Collections


© 2017 Infor Education
3. Select Char from the Unit drop-down list.
This extends the Item Description field and locks it at 20 Flex Characters.

Set length for region index 7


1. Click Region Index 7. This is the UM field on the FlexLayout.
2. Type 5 in the Length field.
3. Select Char from the Unit drop-down list.
This makes the UM field smaller and locks it at five (5) Flex Characters.

Set length for region index 9


1. Click Region Index 9. This is the Currency field on the FlexLayout.
2. Type 8 in the Length field.
3. Select Char from the Unit drop-down list.
This makes the Currency field smaller and locks it at eight (8) Flex Characters.
4. Repeat the relevant steps to hide the coiNoteExistsFlag and coiRowPointer properties.
5. Click OK to finish making changes to the DetailHeaderFlexlayout.

Part 9: Hide the Customer and Order fields from the detail row and format fields in the
DetailFlexLayout
1. Click the Component tab on the right of the design window.
2. Select DetailFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.
You will see 11 regions (0-10). These are the regions within the DetailFlexLayout. If you click
any of these regions, it highlights the said region on the report.

Creating Reports Using Mongoose Reporting 89


© 2017 Infor Education
Hide region index 0
1. Click the first region which is index 0.
2. Type 0 in the Length field.
Note: As you lose focus on the field, the Customer field disappears from the report.

Hide region index 1


1. Click Region 1. This is the second flex region within the DetailFlexLayout.
2. Type 0 in the Length field.
Note: As you lose focus on the field, the Order field disappears from the report.

Set length for region index 4


1. Click Region Index 4. This is the Item Description field on the FlexLayout.
2. Type 20 in the Length field.
3. Select Char from the Unit drop-down list.
This extends the Item Description field and locks it at 20 Flex Characters.

Set length for region index 7


1. Click Region Index 7. This is the UM field on the FlexLayout.
2. Type 5 in the Length field.
3. Select Char from the Unit drop-down list.
This makes the UM field smaller and locks it at 5 Flex Characters.
90 Lesson 5: Using Secondary Collections
© 2017 Infor Education
Set length for region index 9
1. Click Region Index 9. This is the Currency field on the FlexLayout.
2. Type 8 in the Length field.
3. Select Char from the Unit drop-down list.
This makes the Currency field smaller and locks it at 8 Flex Characters.
4. Repeat the relevant steps to hide the coiNoteExistsFlag and coiRowPointer properties.
5. Click OK to finish making changes to the DetailFlexlayout.

Part 10: Format the Header and Detail fields


1. Click the Line field on the report under the header region.
The property window for the selected field comes into focus on the right side of the design
window.

2. Expand the Appearance node.


3. Select Right from the Justification drop-down list.
4. Click the Quantity field on the report under the header region.
The property window for the selected field comes into focus on the right side of the design
window.

Creating Reports Using Mongoose Reporting 91


© 2017 Infor Education
5. Expand the Appearance node.
6. Select Right from the Justification drop-down list.
7. Click the Unit Price field on the report under the header region.
The property window for the selected field comes into focus on the right side of the design
window.

8. Expand the Appearance node.


9. Select Right from the Justification drop-down list.
10. Click the Extended Price field on the report under the header region. The property window for
the selected field comes into focus on the right side of the design window.

92 Lesson 5: Using Secondary Collections


© 2017 Infor Education
11. Expand the Appearance node.
12. Select Right from the Justification drop-down list.
13. Click the Date field on the DetailFexLayout.

14. Expand the Inheritance node.


15. Type DateVar in the Component Class field.
16. Save the form changes.

Part 11: Delete the Detail Footer region and add regions to the MainFlexLayout

Delete detail footer


1. Click the Component tab on the right of the design window.
2. Select MainFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus the
Container tab on the form.

Creating Reports Using Mongoose Reporting 93


© 2017 Infor Education
You will see 9 regions (0-8). These are regions within the MainFlexLayout. If you click any of
these regions, it highlights the said region on the report.

5. Click Region Index 5. This is the DetailFooterFlexLayout.


6. Click X below the Regions window.

Add regions for totals


1. Click Region Index 5 to insert a region above Region Index 5.
2. Click Insert.
3. Confirm the field next to Insert is set to Above.
4. Select GroupFooter from the Region Type drop-down list on the region you just inserted.
5. Type CoNum in the Group property field.
6. Click Region Index 7 to insert a region above Region Index 7.
7. Click Insert. Confirm the field next to Insert is set to Above.
8. Select GroupFooter from the Region Type drop-down list on the region you just inserted.

94 Lesson 5: Using Secondary Collections


© 2017 Infor Education
9. Type CustNum in the Group property field.
10. Click OK. The Edit FlexLayout Attributes form for the MainFlexLayout closes.

Part 12: Add FlexLayout components to the newly created regions of the MainFlexLayout
1. Click the Toolbox tab on the bottom left of the design window.
2. Click the FlexLayout component.
3. Move the cursor and click inside the first new region inserted for the MainFlexLayout.
4. Click the Toolbox tab on the bottom left of the design window.
5. Click the FlexLayout component.
6. Move the cursor and click inside the second new region inserted for the MainFlexLayout.
Note: You have added a FlexLayout component into each of these new regions.

Part 13: Add regions and static components to the newly created FlexLayouts
1. Click the first FlexLayout component you added. The Edit FlexLayout Attributes window
opens.

2. Click Insert to add two (2) new region, for a total of three (3) regions for this FlexLayout.
3. Click OK. This closes the Edit FlexLayout Attributes window.
4. Click the second FlexLayout component you added. This opens the Edit FlexLayout Attributes
window.

5. Click Insert to add two (2) new regions for a total of three (3) regions for this FlexLayout.

Creating Reports Using Mongoose Reporting 95


© 2017 Infor Education
6. Click OK. This closes the Edit FlexLayout Attributes window.
7. Select the first FlexLayout you added.
8. Click the Toolbox tab on the bottom left of the design window.
9. Click the Static component.
10. Move the cursor to add the static component as per the diagram below:

11. Expand the Miscellaneous node and the Specific Attributes node on the property window of
the newly added static component.
12. Type True in the Solid field.
13. Select the second FlexLayout you added.
14. Click the Toolbox tab on the bottom left of the design window.
15. Click the Static component.
16. Move the cursor to add the static component as per the diagram below:

17. Expand the Miscellaneous node and the Specific Attributes node on the property window of
the newly added static component.
18. Type True in the Solid field.

Part 14: Resize the newly added regions to display separation lines
1. Click the Component tab on the right of the design window.
2. Select MainFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.

96 Lesson 5: Using Secondary Collections


© 2017 Infor Education
5. Select Region Index 5.
6. Type 0.1 in the Length field.
7. Select Region Index 7.
8. Type 0.1 in the Length field.
9. Click OK. This closes the Edit FlexLayout Attributes form.

Part 15: Add regions to the Group Footer regions of the MainFlexLayout for the order total

Add regions
1. Click the Component tab on the right of the design window.
2. Select CoNumGroupFooterFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.
5. Click Insert eight (8) times.
This adds eight (8) new regions to the CoNumGroupFooterFlexLayout.

Set region lengths


1. Select Region Index 2.
2. Type 20 in the Length field.
3. Type Char in the Unit field.
4. Select Region Index 5.
5. Type 5 in the Length field.
6. Type Char in the Unit field.
7. Select Region Index 7.
8. Type 8 in the Length field.
9. Type Char in the Unit field.
10. Click OK. This closes the Edit FlexLayout Attributes form.

Part 16: Add regions to the Group Footer regions of the MainFlexLayout for the customer totals

Add regions
1. Click the Component tab on the right of the design window.
2. Select CustNumGroupFooterFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.

Creating Reports Using Mongoose Reporting 97


© 2017 Infor Education
5. Click Insert eight (8) times.
This adds eight (8) new regions to the CustNumGroupFooterFlexLayout.

Set region lengths


1. Select Region Index 2.
2. Type 20 in the Length field.
3. Type Char in the Unit field.
4. Select Region Index 5.
5. Type 5 in the Length field.
6. Type Char in the Unit field.
7. Select Region Index 7.
8. Type 8 in the Length field.
9. Type Char in the Unit field.
10. Click OK. This closes the Edit FlexLayout Attributes form.

Part 17: Add an order total to the CoNumGroupFooterFlexLayout

Add static component for order total


1. Click the Toolbox tab on the bottom left of the design window.
2. Click the Static component.
3. Move the cursor to add the static component under the Extended column for the
CoNumGroupFooterFlexLayout as per the diagram below.

4. Expand the Data Source node for the Static field you just added.
5. Click the ellipsis next to the Binding field. The Edit Component Data Binding form opens.
6. Select Aggregate from the Type drop-down list.
7. Click Edit. The Edit Aggregate Binding form opens.
8. Type Summary in the Function field.
9. Select Object from the Collection drop-down list.
10. Select ExtendedPrice from the Property drop-down list.

98 Lesson 5: Using Secondary Collections


© 2017 Infor Education
Set grouping
1. Select CoNum from the Group By properties drop-down list.
2. Click Add >>.
3. Click OK. The Edit Aggregate Binding form closes.
4. Click OK again. The Edit Component Data Binding form closes.

Set additional properties


1. Expand the Inheritance node.
2. Type AmountVar in the Component Class field.
3. Expand the Miscellaneous and Specific Attributes nodes.
4. Type True in the No Colon field.

Part 18: Add a customer total to the CustNumGroupFooterFlexLayout

Add static component for order total


1. Click the Toolbox tab on the bottom left of the design window.
2. Click the Static component.
3. Move the cursor to add the static component under the Extended column for the
CustNumGroupFooterFlexLayout as per the diagram below:

4. Expand the Data Source node for the Static field you just added.
5. Click the ellipsis next to the Binding field. The Edit Component Data Binding form opens.
6. Select Aggregate from the Type drop-down list.
7. Click Edit. The Edit Aggregate Binding form opens.
8. Type Summary in the Function field.
9. Select Object from the Collection drop-down list.
10. Select ExtendedPrice from the Property drop-down list.

Set grouping
1. Select CustNum from the Group By properties drop-down list.
2. Click Add >>.
3. Click OK. The Edit Aggregate Binding form closes.

Creating Reports Using Mongoose Reporting 99


© 2017 Infor Education
4. Click OK again. The Edit Component Data Binding form closes.

Set additional properties


1. Expand the Inheritance node.
2. Type AmountVar in the Component Class field.
3. Expand the Miscellaneous and Specific Attributes nodes.
4. Type True in the No Colon field.

Part 19: Add an order total static to the CoNumGroupFooterFlexLayout total


1. Click the Toolbox tab on the bottom left of the design window.
2. Click the Static component.
3. Move the cursor to add the static component under the Currency column for the
CoNumGroupFooterFlexLayout as per the diagram below:

4. Expand the Design node for the Static field you just added.
5. Type Order Total in the Caption field.

Part 20: Add a customer total static to the CustNumGroupFooterFlexLayout total


1. Click the Toolbox tab on the bottom left of the design window.
2. Click the Static component.
3. Move the cursor to add the static component under the Currency column for the
CustNumGroupFooterFlexLayout as per the diagram below;

4. Expand the Design node for the Static field you just added.
5. Type Cust. Total in the Caption field.

100 Lesson 5: Using Secondary Collections


© 2017 Infor Education
Part 21: Add the “Can Grow” functionality to the MainFlexLayout for item description
1. Click the Component tab on the right of the design window.
2. Select MainFlexLayout from the Component drop-down list.
3. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
4. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.
5. Select Region Index 4.

6. Scroll the property window to locate the Can Grow attribute.


7. Type True in the Can Grow field.

Part 22: Add a region to the MainFlexLayout for a header separation line
1. Add region for separation line
2. Select Region Index 4.
3. Click Insert to insert a region above.
4. Click OK to close the Edit FlexLayout Attributes window.
5. Click the Toolbox tab on the bottom left of the design window.
6. Click the FlexLayout component.
7. Move the cursor and add the FlexLayout component to the newly created region.
8. Click the Component tab on the right of the design window.
9. Select FlexLayout3 from the Component drop-down list.
10. Expand the Layout node on the Properties tab for the FlexLayout you selected above.

Creating Reports Using Mongoose Reporting 101


© 2017 Infor Education
11. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.
12. Click Insert to insert a new region.

Set region length


1. Select Region Index 0.
2. Type 10 in the Length field.
3. Type Char in the Unit field.
4. Click OK. This closes the Edit FlexLayout Attributes form.

Part 23: Add a static component to the newly created region of the MainFlexLayout

Add static component


1. Click the Toolbox tab on the bottom left of the design window.
2. Click the Static component.
3. Move the cursor and add the Static component to Region 2 of the newly created FlexLayout.
This would-be Region Index 1.
4. Expand the Miscellaneous and Specific Attributes nodes on the Property window of the newly
added static component.
5. Type True in the Solid field.
6. Click the Component tab on the right of the design window.
7. Select MainFlexLayout from the Component drop-down list.
8. Expand the Layout node on the Properties tab for the FlexLayout you selected above.
9. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form opens
showing you the different regions within the selected FlexLayout and sets the focus on the
Container tab within the form.

Set length
1. Select Region Index 4.
2. Type 0.1 in the Length field.
3. Select DetailHeader from the Region Type drop-down list. You may have to scroll down to see
this field.
4. Select Object from the Collection drop-down list.
5. Click OK. This closes the Edit FlexLayout Attributes form.

Part 24: Enter a caption for the report header

Set report caption


1. Click inside the sCaption field in the page header section. Once you have made the selection,
you should see the following:

102 Lesson 5: Using Secondary Collections


© 2017 Infor Education
2. Click the Component tab to the right of the design window.
3. Scroll up until you locate the Caption field.
4. Type sReportCaption in the Caption field.
5. Click the ellipsis next to the Caption field.
6. Type sReportCaption in the Name field if it’s not already created.
7. Type <initial> Order Details Report in the String Value field.
8. Click OK.

Set additional properties


1. Expand the Appearance node.
2. Click the ellipsis next to the Font field.
3. Select 18 from the Size window.
4. Click OK.
5. Save the form changes.
6. Exit the Design Mode by pressing Ctrl+E.
7. Close the <initial> Order Details Report Viewer form.

Part 25: Set page breaks and repeat column heading attributes
1. Click the Components tab in the Properties pane on the right side of the edit screen.
2. Select the MainFlexLayout component property from the Components drop-down list.
3. Expand the Layout node and then click the ellipsis next to the Flex Attributes field. The Edit
FlexLayout Attributes for the MainFlexLayout opens.
4. Select Region Index 1. This is the Group Header region for customer.
5. Type True in the Repeat on New Page field.
6. Select Region Index 2. This is the Group Header region for the order.
7. Type True in the Repeat on New Page field.
8. Select Region Index 3. This is the DetailHeader region.

Creating Reports Using Mongoose Reporting 103


© 2017 Infor Education
9. Type True in the Repeat on New Page field.
10. Select Region Index 4. This is the line after the headers.
11. Type True in the Repeat on New Page field.
12. Select Region Index 10. This is the GroupFooter for the customer.
13. Type True in the Insert Page Break After field.
14. Click OK.
15. Save the form changes.
16. Exit the Design Mode by pressing CTRL+E.
17. Click Run to test the report.

Part 26: Test the <initial> order Details Report Viewer form
1. Open the <initial> Order Details Report Viewer form.
2. Click Run.

The result should look as follows:

3. Close all open forms.

104 Lesson 5: Using Secondary Collections


© 2017 Infor Education
Check your understanding

A Secondary Collection can be used as a sub-collection.


a) True
b) False

The collection hierarchy determines the order in which each collection's data is processed
in the report output
a) True
b) False

Which of the following statements are true?


a) A Secondary Collection is an additional IDO collection associated with, and
bound to a form to extract data from different tables without having to write
code.
b) A Secondary Collection is an additional IDO collection associated with, and
bound to a form to extract data from different tables and needs to be achieved
by always writing code.
c) You cannot link a secondary collection.
d) None of the above is true.

Creating Reports Using Mongoose Reporting 105


© 2017 Infor Education
Lesson 6: Adding a Sub-Report
Estimated time
1.5 hours

Learning objectives
In this lesson, you will:
• Explain what a Sub-Report is and why you would need to use one.
• Explain how to add a Sub-Report to a Report Type form.
• Describe how to link a Sub-Report.
• Describe how to format a Sub-Report on a Report Type form.

Topics
• What is a Sub-Report and why use one?

106 Lesson 6: Adding a Sub-Report


© 2017 Infor Education
What is a Sub-Report and why use one?
Sub-Reports are reports referenced from within other reports. During execution of the parent report, the
Sub-Report is run and its results are merged into the parent report output. This allows for repetitive
regions like notes to be easily added to parent reports.
Any Report Type form can be used as a Sub-Report. There are no special requirements that make a
Report Type form eligible for use as a Sub-Report. Sub-Reports can only be referenced by parent reports
from regions in the MainFlexLayout component.
When a region is specified to contain a Sub-Report, the entire region becomes a placeholder for the Sub-
Report and cannot contain any additional components. The Sub-Report region holds the Sub-Report
name and parameters. The Sub-Report region displays the Sub-Report name and is shaded as disabled,
to visually set it apart from other regions.
Although any Report Type form can technically be used as a Sub-Report, the typical Sub-Report only has
Detail regions and possibly Detail Header regions. This is because all rendered regions of the Sub-Report
are copied in sequence into the parent report wherever they fall within the parent report. This means that
regions like Page Header and Page Footer are not typically applicable in Sub-Reports, even though they
are not specifically excluded.
Paging in the Sub-Report is ignored. The regions in the parent report number as needed, based on the
layout of the parent report.
Sub-Reports are called in a fashion similar to other Report Type forms, using phrases from a Run Form
Event Handler, such as SETVARVALUES.
When called in runtime, the Sub-Report region in the parent form is copied one time for each region
rendered in the Sub-Report. Components are copied from the Sub-Report into the parent report one
region at a time.

Sub-Report results

Creating Reports Using Mongoose Reporting 107


© 2017 Infor Education
Demo: Adding a Sub-Report to a Report Type form
Your instructor will demonstrate how to add a Sub-Report to a Report Type form.

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

Exercise 6.1: Adding a Sub-Report to a Report Type form


In this exercise, you will copy the ReportNotesViewer out-of-box sub report, make some
changes and attach it to the <initial> Order Details Report Viewer form you created in a
previous exercise.

Order Details report with notes

Exercise steps

Part 1: Copy the ReportNotesViewer form to <initial>ReportNotesViewer


1. Confirm you are logged in to CloudSuite. If not, log in to the system.
2. Enter the Design Mode by clicking the Design icon or by pressing Ctrl+E.
108 Lesson 6: Adding a Sub-Report
© 2017 Infor Education
3. Select Form > Definition > Copy from the menu. The Copy Form Definition window opens.
4. Type ReportNotesViewer in the Source Form field.
5. Type <initial>ReportNotesViewer in the Target Form field.
6. Click OK.
Note: If you get the Form <initial>ReportNotesViewer already exists—replace it? message, click
OK.

Part 2: Delete the stdpreload Event Handler from the <initial>ReportNotesViewer form
1. Confirm you are in the Design Mode.
2. Select Form >Design > <initial>ReportNotesViewer. This is the form you copied in Part 1.
3. Select Edit > Event Handlers. The Event Handlers window opens and you see a
StdFormPredisplay event.
4. Select <this event> and then click Delete.
5. Select Yes from the message window confirming you want to delete this event.
Note: This Event Handler is present on all the Out-of-Box Report Type forms to prevent users
from opening these forms directly.
6. Click Done to close the Event Handler window.
7. Click the Form Property tab on the right of the screen.
8. Type f<initial>ReportNotesViewer in the Caption field.
9. Click the ellipsis next to the Caption field to create the string.
10. Click OK on the String Properties window.
11. Save the form changes.
12. Close the <initial>ReportNotesViewer form.
13. Click OK. The <initial>ReportNotesViewer form opens in the Design Mode.

Part 3: Add a Sub-Report to the <initial> Order Details Report Viewer


1. Confirm you are in the Design Mode.
2. Select Form > Definition > Design. The Select Form window opens.
3. Click the <initial> Order Details Report Viewer form.
4. Click the Components tab on the right of the screen.
5. Select MainFlexLayout from the Component drop-down list.
6. Click the Properties tab under the MainFlexLayout of the Components tab.
7. Expand the Layout node.
8. Click the ellipsis next to the Flex Attributes field. The Edit FlexLayout Attributes form for the
MainFlexLayout opens.
9. Select Region Index 6.
10. Click Insert.

Creating Reports Using Mongoose Reporting 109


© 2017 Infor Education
11. Confirm the field next to the button reads Above.
Note: You have inserted a region into the MainFlexLayout into which you will add a Sub-Report
that will call the <initial>ReportNotesViewer form you created in Part 2 of this exercise.

Part 4: Set the RowPointer property value for the Sub-Report


1. Select <initial>ReportNotesViewer from the Sub-Report Form drop-down list.
2. Click the ellipsis next to the Sub-Report Parameters field. This opens the Specify Form Run
Options window.
3. Click Set Variables. This opens the Edit Set Variable Values window.
4. Click New.
5. Type RowPointer in the Target field.
6. Type P(coiRowPointer) in the Value field.
7. Click OK.

Part 5: Set the ShowExternal and ShowInternal property values for the Sub-Report
1. Click New.
2. Type ShowExternal in the Target field.
3. Type 1 in the Value field.
4. Click OK.
5. Click New.
6. Type ShowInternal in the Target field.
7. Type 1 in the Value field.
8. Click OK.
9. Click OK again. This closes the Specify Form Run Options window.
10. Type True in the Can Grow field.
11. Type Detail in the Region Type field.
12. Type object in the Collection field.
13. Scroll up and click the ellipsis next to the VisibleWhen field. This opens the Edit Conditions
window.

Part 6: Set the coiNoteExistsFlag Condition for the Sub-Report

Set condition
1. Click Edit Left Value.
2. Select Property Value from the Value Type drop-down list.
3. Select <initial> Order Details Report Viewer from the Collection drop-down list.
4. Select coiNoteExistsFlag from the Value drop-down list.
5. Click OK.

110 Lesson 6: Adding a Sub-Report


© 2017 Infor Education
6. Confirm the Operator shows the = operator.
7. Click Edit Right Value.
8. Select Literal from the Value Type drop-down list.
9. Type 1 in the Value field.
10. Click OK.
11. Click OK again. This closes the Edit Condition window.

Set additional properties


1. Select True in the Visible in Design Mode drop-down list.
2. Click OK. This closes the Edit FlexLayout Attributes window for the MainFlexLayout.
3. Save the changes.
4. Close the <initial> Order Details Report Viewer form and exit the Design Mode.
5. Press Ctrl+U to unload global form objects.

Part 7: Test the <initial> Order Details Report Viewer form and confirm the customer order line
notes are printed under the respective customer order line
1. Open the <initial> Order Details Report Viewer form.
2. Click Run.
3. Click Next until you see the following result:

You have successfully added a Sub-Report to a Report Type form.


4. Close all forms.

Creating Reports Using Mongoose Reporting 111


© 2017 Infor Education
Check your understanding

Which of the following are true statements? Select all that apply.
a) Sub-Reports are reports that can be referenced from within other reports.
b) Any Report Type form can be used as a Sub-Report.
c) When a region is specified to contain a Sub-Report, the entire region becomes
a placeholder for the Sub-Report and cannot contain any additional
components.
d) All the above

Paging in a Sub-Report is ignored.


a) True
b) False

112 Lesson 6: Adding a Sub-Report


© 2017 Infor Education
Lesson 7: Creating a Report Criteria
form
Estimated time
2 hours

Learning objectives
In this lesson, you will:
• Run a Report Type form.
• Explain how to create a Report Criteria form.
• Explain how to set input parameters.
• Describe how to create an Event Handler to run the form.
• Explain how to create a Background Task Definition for the Report Type form

Topics
• Understanding bound and unbound forms
• Creating a Report Criteria form

Creating Reports Using Mongoose Reporting 113


© 2017 Infor Education
Understanding bound and unbound forms
Before creating a new form, it is important to understand the difference between bound and unbound
forms.
A bound form is used to retrieve and manipulate one or more collections. (A collection is the result set
returned by an IDO.) The relationship between the form and an IDO is determined by specifying the
collection to which the form is bound. In other words, a form is associated with the result set returned by a
particular IDO.
An unbound form is not tied to a particular IDO. It may be used to simply gather data to pass to a method
or procedure, such as a report generating form.

114 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
Creating a Report Criteria form
Once you have the report definition file and the background task created for your report, you must make
the report available to users before they can use it.
Most reports are launched from criteria forms. Criteria forms typically have several interactive fields and
options allowing a user to set parameters (or criteria) which filter the report output. These fields and
options can include criteria, such as date ranges, ranges of users, customers, ID numbers, and more that
filter the data included in the report output. Other options might control the information included or not
included in the report output, depending on the user’s selections.
Criteria forms also typically have two buttons:
• A Preview button allowing you to preview the report output before committing it to a more
permanent output.
• A Print button that sends the command to generate the report using the designated print options.
Typically, when creating a new Report Criteria form, you will perform the following tasks:
Add components - The most commonly used components for creating a Report Criteria form are:
• ComboBox
• CheckBox
• DateCombo
• Button
• RadioButton
• Static
Bind components to variables used in the report:
• Add labels to identify parts of the form
• Add an “Increment Date” check box for reports that allow filtering on a range of dates
• Add an option to display the report header
• Add preview and print buttons
• Add report variables
• Add Event Handlers

Demo: Create a Report Criteria form for a DataView report


Your instructor will demonstrate how to create a Report Criteria form in order to run a
DataView report.

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

Creating Reports Using Mongoose Reporting 115


© 2017 Infor Education
Exercise 7.1: Create a Report Criteria form for a DataView report
In this exercise, you will create a Report Criteria form to run the <initials> Orders By
Customer DataView you created in a previous exercise.

Exercise steps

Part 1: Create the <initial> Orders By Customer Report Criteria form


1. Verify you are still signed in to the application with the “sa” user account.
2. Press Enter or exit the Design Mode on this form. The Identify Your Editing Scope dialog box
opens.
3. Select Site Default from the Scope drop-down list.
4. Click OK. The Design Mode opens.

Create new form


1. Select System > Form > Definition > New. The New Form Wizard opens.
2. Select the Create a new form radio button under the New Form Wizard Type heading.
3. Click Next.
4. Type <initial> Orders By Customer Report in the Name field.
5. Select Build from Scratch from the Form Type drop-down list.
6. Click Yes in the message box asking if want to use defaults for grid/primary/additional inclusion
settings.
7. Click Next.
8. Clear the Save Template check box
9. Click Finish. A new blank form opens in the Design Mode.

Set caption
1. Click the field to the right of the Caption property within the Form properties sheet to prepare for
text entry.

116 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
2. Type f<initial>OrdersByCustomer in the Caption field.
3. Click the ellipses next to the Caption field. The String Properties dialog box opens.
Note: You created this string earlier in a previous exercise.
4. Click OK.
5. Click Save.

Part 2: Add and lay out the report dynamic components


1. Select the ComboBox component in the Toolbox window on the left side of the form.
2. Move the cursor over the blank form.
Note: The cursor changes to a large plus [+] symbol as you move the pointer over the form.
3. Click anywhere on the form to place the component on the form.
4. Type StartingCust in the Name field on the Component property sheet for the new component.
Note: Overwrite the default value in the field.
5. Click the plus (+) symbol to the left of the Data Source node on the property sheet to expand the
node.
6. Click the ellipsis next to the Binding field. The Edit Component Data Binding dialog box
opens.
7. Select Variable from the Type drop-down list.
8. Click Edit. The Edit Variable Binding dialog box opens.
9. Type CustStarting in the Variable field.
10. Click OK. The Edit Variable Binding dialog box closes.
11. Click OK again. The Edit Component Data Binding dialog box closes and you are back in the
User Task Report [Design Mode] form.
12. Click the plus (+) symbol to the left of the Inheritance node on the Component properties sheet
to expand the node.
13. Select CustNum from the Component Class drop-down list.
14. Click Save.
You are now going to add additional combo boxes to the form and will lay them out similar to the
image below by placing each component on the form in relation to each other. Add labels as
Static components in the next part.

Creating Reports Using Mongoose Reporting 117


© 2017 Infor Education
15. Use the image above as a guide to add the following components and set their properties as
indicated in the table below.

Component Component Variable Inheritance component


type name binding class

ComboBox EndingCust CustEnding CustNum

ComboBox StartingCo CoStarting CoNum

ComboBox EndingCo CoEnding CoNum

16. Arrange the components on the form by clicking each one and pressing the arrow keys until the
component is in the desired position. Use the image on the previous page as a guide.

Part 3: Add and lay out the static report components


1. Select the Static component in the Toolbox window on the left side of the form.
2. Move the cursor over the blank form.
Note: The cursor changes to a large plus [+] symbol as you move the pointer over the form.
3. Click anywhere on the form to place the static component on the form. The default value in the
Name field listed under the Design section in the Component property sheet is static1.
4. Type sStarting in the Caption field on the Component property sheet for the new component.
5. Click and drag the bottom right box (handle) on the component towards the right until you can
read the entire caption.
6. Place the Starting: component above the set of fields on the left based on the image above.
Note: Arrange the static component on the form by clicking it and pressing the arrow keys until
the component is in the desired position. Refer to the above diagram for placement.
7. Click Save.

118 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
8. Repeat steps 1 – 7 to add the following static text labels to the form as indicated in the table
below.

Static component Caption Location

static2 sEnding Above the set of fields on the right

static3 sCustomer Left of the Customer Number fields

static4 sOrder Left of the CO Number fields

Part 4: Add the print button to run the report


1. Select the Button control in the Toolbox window on the left side of the form.
2. Move the cursor over the blank form.
Note: The cursor changes to a large plus [+] symbol as you move the pointer over the form.
3. Click in the lower-right section of the form to place the button.
4. Type PrintButton in the Name field on the Component property sheet for the new component.
Note: Overwrite the existing value in the field.
5. Select sPrint from the Caption drop-down list.
6. Select Button from the Component Class drop-down list field in the Inheritance section of the
Properties sheet.

Part 5: Add the print Event Handler


1. Click the Events tab of the Component property sheet.
2. Click the ellipsis to the right of the Primary field. The Event Handlers dialog box opens.
3. Click New. The Event Handler Properties dialog box opens.
4. Type GenerateReport in the Event field.
5. Select Run Background Task from the Type drop-down list in the Response section.
6. Click the ellipsis to the right of the Parameters field. The Event Handler Parms dialog box
opens.
7. Type mBackEndMessage in the Error Message field.
8. Click Type Specific Parameters. The Edit Background Task Name and Parms dialog box
opens.
9. Type V(BGTaskName) in the Task Name field.
10. Type V(BGTaskParms) in the Task Parms field.
11. Click OK. The Edit Background Task Name and Parms dialog box closes.
12. Click OK again. The Event Handler Parms dialog box closes.

Creating Reports Using Mongoose Reporting 119


© 2017 Infor Education
13. Click OK again. The Event Handler Properties dialog box closes and two events are listed in the
Event Handlers dialog box. They should appear similar to the screenshot below:

14. Click OK again. The Event Handlers dialog box closes and you return to the form window.
15. Click Save.

Part 6: Create variables for background tasking


1. Right-click the form background. A menu displays.
2. Select Variable. The Variables dialog box opens.
3. Click New. The Variable Properties dialog box opens.
4. Type BGTaskName in the Name field.
5. Type <initial>OrdersByCustomer in the Value field.
6. Confirm True is selected in the Persistent field. If not, select it.
7. Click OK.
The BGTaskName variable is listed in the Variables dialog box under the Form – Persistent
section.
8. Click New. The Variable Properties dialog box opens.
9. Type BGTaskParms in the Name field.
10. Type V(CustStarting),V(CustEnding),V(CoStarting),V(CoEnding) in the Value field.
11. Verify True is selected in the Persistent field. If not, select it.
12. Click OK.
The two new variables are listed: BGTaskParms is listed below BGTaskName in the Form –
Persistent section on the Variables dialog box.
13. Click Done.
14. Click Save.

Part 7: Add the ReportSubmitted Event Handler


1. Click the Print component on the form.
2. Click the Events tab of the Component property sheet.
3. Click the ellipsis to the right of the Primary field. The Event Handlers window opens.
4. Click New. The Event Handler Properties dialog box opens.
5. Select Run Script from the Type drop-down list in the Response section.
6. Click the ellipsis to the right of the Parameters field. The Event Handler Parms dialog box
opens.
7. Click Type Specific Parameters. The Script Name and Parameters dialog box opens.
8. Type ReportSubmitted in the Name field.

120 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
9. Click OK. The Script Name and Parameters dialog box closes.
10. Click OK again. The Event Handler Parms dialog box closes.
11. Click OK again. The Event Handler Properties dialog box closes and a third event is listed on
the Event Handlers (filtered for event GenerateReport) dialog box.
12. Click OK again. The Event Handlers (filtered for event GenerateReport) dialog box closes and
you return to the form window.
13. Click Save.

Part 8: Add the preview capability to the report


1. Press Enter or exit the Design Mode on this form. The User Task Report form displays in Design
Mode.
2. Select the Button control in the Toolbox window on the left side of the form.
3. Move the cursor over the blank form.
Note: The cursor changes to a large plus [+] symbol as you move the pointer over the form.
4. Click to the left of the Print button to place the new button.
5. Type PreviewButton in the Name field on the Component property sheet for the new component.
Note: Overwrite the existing value in the field.
6. Select sPreview from the Caption drop-down list.
7. Select Button from the Component Class drop-down list in the Inheritance section of the
Properties sheet.

Part 9: Add the preview Event Handler


1. Click the Events tab of the Component property sheet.
2. Click the ellipsis to the right of the Primary field. The Event Handlers window opens displaying
three GenerateReport events.
3. Click New. The Event Handler Properties dialog box opens.
4. Type PreviewReport in the Event field.
5. Select Run Form from the Type drop-down list field in the Response section.
6. Click the ellipsis to the right of the Parameters field. The Event Handler Parms dialog box
opens.
7. Type mPrintPreviewError in the Error Message field.
8. Click Type Specific Parameters. The Edit Background Task and Parms dialog box opens.
9. Select WBDataViewResults from the drop-down list in the Form field.

Part 10: Set the Preview variables

Create the DataView name variable


1. Click Set Variables.
2. Click New.

Creating Reports Using Mongoose Reporting 121


© 2017 Infor Education
3. Type DataViewName in the Target field.
4. Type <initial> Orders By Customer in the Value field.
5. Click OK.

Create the InputParameter1 variable


1. Click New.
2. Type InputParameter1 in the Target field.
3. Type V(CustStarting) in the Value field.
4. Click OK.

Create the InputParameter2 variable


1. Click New.
2. Type InputParameter2 in the Target field.
3. Type V(CustEnding) in the Value field.
4. Click OK.

Create the InputParameter3 variable


1. Click New.
2. Type InputParameter3 in the Target field.
3. Type V(CoStarting) in the Value field.
4. Click OK.

Create the InputParameter4 variable


1. Click New.
2. Type InputParameter4 in the Target field.
3. Type V(CoEnding) in the Value field.
4. Click OK.

Part 11: Close all windows


1. Click OK. This closes the Edit Set Variable Values window.
2. Click OK. This closes the Specify Form Run Options window.
3. Click OK. This closes the Event Handler Parms window.
4. Click OK. This closes the Event Handler Properties window.
5. Click OK again. This closes the Event Handlers window.
6. Click Save.
7. Press Enter or exit the Design Mode on this form. The Orders By Customer form displays in
Run mode and should appear similar to the image below.

122 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
8. Press Ctrl+U to unload global form objects.

Part 12: Add a Background Task Definition to run the report


1. Open the Background Task Definition form.
2. Create a new object.
3. Type <initial>OrdersByCustomer in the Task Name field.
4. Type <initial> Orders By Customer-ReportOutput in the Executable Name field.
5. Select RPT from the Executable Type drop-down list.
6. Select DATAVIEW from the Report Type drop-down list.
7. Save the Background Task Definition.

Part 13: Run the <initial> Orders By Customer DataView report


1. Open the <initial> Orders By Customer Report form.
2. Enter report criteria.
3. Click Preview. You should see the following results:

Creating Reports Using Mongoose Reporting 123


© 2017 Infor Education
4. Click Print. You should see the following results:

5. Close the Results window.


6. Click OK on the Report Submitted message.
7. Leave CloudSuite open for the next exercise.

124 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
Demo: Create a Report Criteria form for a Report Type form
Your instructor will demonstrate how to create a Report Criteria form in order to run a Report
Type form.

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

Exercise 7.2: Create a Report Criteria form for a Report Type form
In this exercise, you will create a Report Criteria form to run the <initials> Order Details
Report Viewer form you created in a previous exercise.

Exercise steps

Part 1: Create the <initial> Order Details Report Criteria form


1. Confirm you are still signed in to CloudSuite with the “sa” user account.
2. Press Enter or exit the Design Mode on this form. The Identify Your Editing Scope dialog box
opens.
3. Select Site Default from the Scope drop-down list.
4. Click OK. The Design Mode opens.

Creating Reports Using Mongoose Reporting 125


© 2017 Infor Education
Create new form
1. Select System > Form > Definition > New. The New Form Wizard opens.
2. Select the Create a new form radio button under the New Form Wizard Type heading.
3. Click Next.
4. Type <initial> Order Details Report in the Name field.
5. Select Build from Scratch from the Form Type drop-down list.
6. Click Yes in the message box asking if want to use defaults for grid/primary/additional inclusion
settings.
7. Click Next.
8. Clear the Save Template check box
9. Click Finish. A new blank form opens in the Design Mode.

Set caption
1. Click the field to the right of the Caption property in the Form properties sheet to prepare for text
entry.
2. Type f<initial>OrderDetailsReport in the Caption field.
3. Click the ellipses next to the Caption field. The String Properties dialog box opens.
Note: You created this string earlier in a previous exercise.
4. Click OK.
5. Click Save.

Part 2: Add and lay out the report dynamic components


1. Select the ComboBox component in the Toolbox window on the left side of the form.
2. Move the cursor over the blank form.
Note: The cursor changes to a large plus [+] symbol as you move the pointer over the form.
3. Click anywhere on the form to place the component on the form.
4. Type StartingCust in the Name field on the Component property sheet for the new component.
Note: Overwrite the default value in the field.
5. Click the plus (+) symbol to the left of the Data Source node on the property sheet to expand the
node.
6. Click the ellipsis next to the Binding field. The Edit Component Data Binding dialog box
opens.
7. Select Variable from the Type drop-down list.
8. Click Edit. The Edit Variable Binding dialog box opens.
9. Type CustStarting in the Variable field.
10. Click OK. The Edit Variable Binding dialog box closes.
11. Click OK again. The Edit Component Data Binding dialog box closes and you are back in the
User Task Report [Design Mode] form.
126 Lesson 7: Creating a Report Criteria form
© 2017 Infor Education
12. Click the plus (+) symbol to the left of the Inheritance node on the Component properties sheet
to expand the node.
13. Select CustNum from the Component Class drop-down list.
14. Click Save.
You are now going to add additional combo boxes to the form and will lay them out similar to the
image below by placing each component on the form in relation to each other. Add the labels as
Static components in the next part.

15. Use the image above as a guide to add the following components and set their properties as
indicated in the table below.

Component Component Variable Inheritance component


type name binding class

ComboBox EndingCust CustEnding CustNum

ComboBox StartingCo CoStarting CoNum

ComboBox EndingCo CoEnding CoNum

ComboBox pSite Site SiteVar

16. Type [Link](INITIALVALUE(DALS)) in the Binding field for the pSite component.
17. Arrange the components on the form by clicking each one and pressing the arrow keys until the
component is in the desired position as per the image above.

Part 3: Add and lay out the static report components


1. Select the Static component in the Toolbox window on the left side of the form.
2. Move the cursor over the blank form.

Creating Reports Using Mongoose Reporting 127


© 2017 Infor Education
Note: The cursor changes to a large plus [+] symbol as you move the pointer over the form.
3. Click anywhere on the form to place the static component on the form. The default value in the
Name field listed under the Design section in the Component property sheet is static1.
4. Type sStarting in the Caption field on the Component property sheet for the new component.
5. Click and drag the bottom right box (handle) on the component towards the right until you can
read the entire caption.
6. Place the Starting: component above the set of fields on the left based on the image.
Note: Arrange the static component on the form by clicking it and pressing the arrow keys until
the component is in the desired position. Refer to the above diagram for placement.
7. Click Save.
8. Repeat steps 1 – 7 to add the following static text labels to the form as indicated in the table
below.

Static component Caption Location

static2 sEnding Above the set of fields on the right

static3 sCustomer Left of the Customer fields

static4 sOrder Left of the Order fields

static5 sSite Left of the Site field

Part 4: Add the print button to run the report


1. Select the Button control in the Toolbox window on the left side of the form.
2. Move the cursor over the blank form.
Note: The cursor changes to a large plus [+] symbol as you move the pointer over the form.
3. Click in the lower-right section of the form to place the button.
4. Type PrintButton in the Name field on the Component property sheet for the new component.
Note: Overwrite the existing value in the field.
5. Select sPrint from the Caption drop-down list.
6. Select Button from the Component Class drop-down list field in the Inheritance section of the
Properties sheet.

Part 5: Add the print Event Handler


1. Click the Events tab of the Component property sheet.
2. Click the ellipsis to the right of the Primary field. The Event Handlers dialog box opens.
3. Click New. The Event Handler Properties dialog box opens.

128 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
4. Type GenerateReport in the Event field.
5. Select Run Background Task from the Type drop-down list in the Response section.
6. Click the ellipsis to the right of the Parameters field. The Event Handler Parms dialog box
opens.
7. Type mBackEndMessage in the Error Message field.
8. Click Type Specific Parameters. The Edit Background Task Name and Parms dialog box
opens.
9. Type V(BGTaskName) in the Task Name field.
10. Type V(BGTaskParms) in the Task Parms field.
11. Click OK. The Edit Background Task Name and Parms dialog box closes.
12. Click OK again. The Event Handler Parms dialog box closes.
13. Click OK again. The Event Handler Properties dialog box closes and two events are listed in the
Event Handlers dialog box. They should appear similar to the screenshot below:

14. Click OK. The Event Handlers dialog box closes and you return to the form window.
15. Click Save.

Part 6: Create variables for background tasking


1. Right-click the form background. A menu displays.
2. Select Variable. The Variables dialog box opens.
3. Click New. The Variable Properties dialog box opens.
4. Type BGTaskName in the Name field.
5. Type <Initial>OrderDetailsByCustomerReport in the Value field.
6. Confirm True is selected in the Persistent drop-down list. If not, select it.
7. Click OK.
The BGTaskName variable is listed in the Variables dialog box under the Form – Persistent
section.
8. Click New. The Variable Properties dialog box opens.
9. Type BGTaskParms in the Name field.
10. Type SETVARVALUES(ExOptBegCust_num=V(CustStarting),
ExOptEndCust_num=V(CustEnding), ExOptBegCo_num=V(CoStarting),
ExOptEndCo_num=V(CoEnding),pSite=V(Site)) in the Value field as per the screenshot below.

Creating Reports Using Mongoose Reporting 129


© 2017 Infor Education
11. Verify True is selected in the Persistent field. If not, select it.
12. Click OK.
The two new variables are listed: BGTaskParms is listed below BGTaskName in the Form –
Persistent section on the Variables dialog box.
13. Click Done.
14. Click Save.

Part 7: Add the ReportSubmitted Event Handler


1. Click the Print component on the form.
2. Click the Events tab of the Component property sheet.
3. Click the ellipsis to the right of the Primary field. The Event Handlers window opens.
4. Click New. The Event Handler Properties dialog box opens.
5. Select Run Script from the Type drop-down list in the Response section.
6. Click the ellipsis to the right of the Parameters field. The Event Handler Parms dialog box
opens.
7. Click Type Specific Parameters. The Script Name and Parameters dialog box opens.
8. Type ReportSubmitted in the Name field.
9. Click OK. The Script Name and Parameters dialog box closes.
10. Click OK again. The Event Handler Parms dialog box closes.
11. Click OK again. The Event Handler Properties dialog box closes and a third event is listed on
the Event Handlers (filtered for event GenerateReport) dialog box.
12. Click OK. The Event Handlers (filtered for event GenerateReport) dialog box closes and you
return to the form window.
13. Click Save.

Part 8: Add the preview capability to the report


1. Press Enter or exit the Design Mode on this form. The User Task Report form displays in the
Design Mode.
2. Select the Button control in the Toolbox window on the left side of the form.
3. Move the cursor over the blank form.
Note: The cursor changes to a large plus [+] symbol as you move the pointer over the form.
4. Click to the left of the Print button to place the new button.

130 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
5. Type PreviewButton in the Name field on the Component property sheet for the new component.
Note: Overwrite the existing value in the field.
6. Select sPreview from the Caption drop-down list.
7. Select Button from the Component Class drop-down list in the Inheritance section of the
Properties sheet.

Part 9: Add the preview Event Handler


1. Click the Events tab of the Component property sheet.
2. Click the ellipsis to the right of the Primary field. The Event Handlers window opens displaying
three GenerateReport events.
3. Click New. The Event Handler Properties dialog box opens.
4. Type PreviewReport in the Event field.
5. Select Print Preview from the Type drop-down list field in the Response section.
6. Click the ellipsis to the right of the Parameters field. The Event Handler Parms dialog box
opens.
7. Type mPrintPreviewError in the Error Message field.
8. Click Type Specific Parameters. The Edit Background Task and Parms dialog box opens.
9. Type V(BGTaskName) in the Task Name field.
10. Type V(BGTaskParms) in the Task Parms field.
11. Click OK four times to close all forms.
12. Click Save.
13. Press Ctrl+U to unload global objects.
14. Press Enter or exit the Design Mode on this form.

Part 10: Add a Background Task Definition to run the report


1. Open the Background Task Definition form.
2. Create a new object.
3. Type <initial>OrderDetailsByCustomerReport in the Task Name field.
4. Type <initial>OrderDetailsReportViewer in the Executable Name field.
5. Select RPT from the drop-down list of the Executable Type field.
6. Select FORM from the drop-down list of the Report Type field.
7. Save the Background Task Definition.

Part 11: Test the <initial> Order Details Report form


8. Open the <initial> Order Details Report form.
9. Enter your report criteria.
10. Click Preview. You should see the following results:

Creating Reports Using Mongoose Reporting 131


© 2017 Infor Education
11. Click Print. You should see the following results:

12. Close the Results window.

132 Lesson 7: Creating a Report Criteria form


© 2017 Infor Education
Check your understanding

A bound form is one that is used to retrieve and manipulate one or more collections.
a) True
b) False

The relationship between the form and an IDO is determined by specifying the collection to
which the form is bound.
a) True
b) False

An unbound form is one that is not tied to a particular IDO.


a) True
b) False

Once you have the report definition file and the background task created for your report,
you must make the report available to users before they can actually use it. To do this, you
must create or modify a form in CloudSuite.
a) True
b) False

Typically, when creating a new Report Criteria form, you will perform the following tasks.
Select all that apply.
a) Add components
b) Bind components to variables
c) Add labels
d) Add preview and print buttons
e) Add Event Handlers
f) All the above

Creating Reports Using Mongoose Reporting 133


© 2017 Infor Education
Course summary
Estimated time
30 minutes

Learning objectives
Now that you have completed this course, you should be able to:
• What a DataView is.
• Why you would want to use an IDO Method.
• What DataView Report are and when they should be used
• The workings of a Report Type form.
• The Reason for using Report Type forms.
• What FlexLayout components are and their purpose.
• What a secondary collection is and how to incorporate these onto reports.
• What a Sub-Report is.
• Why and When you should use a sSub-Report.
• How to create a Report Criteria form.
• How to set up your input parameters.
• How to create an Event Handler to run the form.
• How to create Event Handlers and Background Task Definitions.

Topics
• Course review

134 Course summary


© 2017 Infor Education
Course review

What outstanding questions regarding upgrade implications do you have?

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

What questions regarding the content covered in the course do you have?

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

_______________________________________________________________________

Creating Reports Using Mongoose Reporting 135


© 2017 Infor Education
Appendices
The following are included in this section:
• Appendix A: Learner user accounts
• Appendix B: Stored procedure (Rpt_MRCExercise1Sp)
• Appendix C: Stored procedure (Rpt_MRCExercise51Sp)

136 Appendices
© 2017 Infor Education
Appendix A: Learner user accounts
Your instructor will assign you a student user ID from the table listed below to use for class exercises.
Note: If you are taking this course as self-directed learning, refer to the Training Desktop Login
Instructions on the Lab On Demand page.

Application User ID User name Password

CSI WebClient Train 01 train01@[Link] train01

CSI sa sa 1nf0r!!!

Creating Reports Using Mongoose Reporting 137


© 2017 Infor Education
Appendix B: Stored procedure
(Rpt_MRCExercise1Sp)

USE [CSI_Demo_App]
GO
/****** Object: StoredProcedure [dbo].[Rpt_MRCExercise1Sp] Script Date: 3/9/2017
[Link] PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Rpt_MRCExercise1Sp]
(
@ExOptBegCust_num CustNumType = NULL,
@ExOptEndCust_num CustNumType = NULL,
@ExOptBegCo_num CoNumType = NULL,
@ExOptEndCo_num CoNumType = NULL
) AS
-- Transaction management.
BEGIN TRANSACTION
SET XACT_ABORT ON
-- Set the isolation level specified for the background task
-- or use the system default.
IF [Link](N'MRPExercise1') = N'COMMITTED'
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
ELSE
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
DECLARE
@RptSessionID RowPointerType
, @LowDate DateType
, @LowCharacter HighLowCharType
, @HighCharacter HighLowCharType;
-- Set DALS as site if null
Declare @pSite SiteType
SET @pSite = ISNULL(@pSite, 'DALS');
-- A session context is created so session variables can be used.
EXEC InitSessionContextSp
@ContextName = 'Rpt_MRCExercise1Sp'
, @SessionID = @RptSessionID OUTPUT
, @Site = @pSite;
-- Set the low and high values used for defaulting.
SET @LowDate = [Link]();
SET @LowCharacter = [Link]();
SET @HighCharacter = [Link]();
-- Replace NULL input parameters with Min or Max values.
SET @ExOptBegCust_num = CASE WHEN @ExOptBegCust_num IS NULL THEN
[Link]() ELSE [Link]('CustNumType',@ExOptBegCust_num) END
SET @ExOptEndCust_num = CASE WHEN @ExOptEndCust_num IS NULL THEN
[Link]() ELSE [Link]('CustNumType',@ExOptEndCust_num) END

138 Appendices
© 2017 Infor Education
SET @ExOptBegCo_num = CASE WHEN @ExOptBegCo_num IS NULL THEN
[Link]() ELSE [Link]('CoNumType',@ExOptBegCo_num) END
SET @ExOptEndCo_num = CASE WHEN @ExOptEndCo_num IS NULL THEN
[Link]() ELSE [Link]('CoNumType',@ExOptEndCo_num) END

-- Declare variables used to create the temp table.


DECLARE
@cust_num CustNumType
, @price AmountType
, @co_num CoNumType
, @stat CoStatusType
, @order_date DateType

-- Create an empty temp table for the report output.


SELECT
@cust_num AS cust_num
, @price AS price
, @co_num AS co_num
, @stat AS stat
, @order_date AS order_date
INTO #ReportOutput
WHERE 1=0;
-- Insert data into the temp table.
INSERT INTO #ReportOutput
SELECT
co.cust_num,
[Link],
co.co_num,
[Link],
co.order_date
FROM co_mst as co
WHERE co.cust_num IS NOT NULL
AND ISNULL(co.cust_num,@LowCharacter) BETWEEN @ExOptBegCust_num
AND @ExOptEndCust_num
AND co.co_num BETWEEN @ExOptBegCo_num AND @ExOptEndCo_num
ORDER BY co.cust_num, co.co_num;
-- Return the report data.
SELECT
cust_num,
price,
co_num,
stat,
order_date
FROM #ReportOutput
ORDER BY cust_num, co_num;
COMMIT TRANSACTION
EXEC CloseSessionContextSp @SessionID = @RptSessionID;

Creating Reports Using Mongoose Reporting 139


© 2017 Infor Education
Appendix C: Stored procedure
(Rpt_MRCExercise51Sp)
USE [CSI_Demo_App]
GO
/****** Object: StoredProcedure [dbo].[Rpt_MRCExercise51Sp] Script Date: 3/9/2017
[Link] PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Rpt_MRCExercise51Sp]
(
@ExOptBegCust_num CustNumType = NULL,
@ExOptEndCust_num CustNumType = NULL,
@ExOptBegCo_num CoNumType = NULL,
@ExOptEndCo_num CoNumType = NULL,
@pSite SiteType = NULL
) AS
-- Transaction management.
BEGIN TRANSACTION
SET XACT_ABORT ON
-- Set the isolation level specified for the background task
-- or use the system default.
IF [Link](N'MRPExercise51') = N'COMMITTED'
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
ELSE
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
DECLARE
@RptSessionID RowPointerType
, @LowDate DateType
, @LowCharacter HighLowCharType
, @HighCharacter HighLowCharType;
-- Set DALS as site if null
SET @pSite = ISNULL(@pSite, 'DALS');
-- A session context is created so session variables can be used.
EXEC InitSessionContextSp
@ContextName = 'Rpt_MRCExercise51Sp'
, @SessionID = @RptSessionID OUTPUT
, @Site = @pSite;
-- Set the low and high values used for defaulting.
SET @LowDate = [Link]();
SET @LowCharacter = [Link]();
SET @HighCharacter = [Link]();
-- Replace NULL input parameters with Min or Max values.
SET @ExOptBegCust_num = CASE WHEN @ExOptBegCust_num IS NULL THEN
[Link]() ELSE [Link]('CustNumType',@ExOptBegCust_num) END
SET @ExOptEndCust_num = CASE WHEN @ExOptEndCust_num IS NULL THEN
[Link]() ELSE [Link]('CustNumType',@ExOptEndCust_num) END
SET @ExOptBegCo_num = CASE WHEN @ExOptBegCo_num IS NULL THEN
[Link]() ELSE [Link]('CoNumType',@ExOptBegCo_num) END

140 Appendices
© 2017 Infor Education
SET @ExOptEndCo_num = CASE WHEN @ExOptEndCo_num IS NULL THEN
[Link]() ELSE [Link]('CoNumType',@ExOptEndCo_num) END

-- Declare variables used to create the temp table.


DECLARE
@cust_num CustNumType
, @price AmountType
, @co_num CoNumType
, @stat CoStatusType
, @order_date DateType
, @curr_code CurrCodeType
, @item ItemType
, @qty_ordered QtyUnitNoNegType
, @co_line CoLineType
, @due_date DateType
, @u_m UMType
, @price_conv CostPrcType
, @Description DescriptionType
, @ExtendedPrice CostPrcType
, @NoteExistsFlag FlagNyType
, @coiRowPointer RowPointerType

-- Create an empty temp table for the report output.


SELECT
@cust_num AS cust_num
, @price AS price
, @co_num AS co_num
, @stat AS stat
, @order_date AS order_date
, @curr_code AS curr_code
, @item AS item
, @qty_ordered AS qty_ordered
, @co_line AS co_line
, @due_date AS due_date
, @u_m AS u_m
, @price_conv AS price_conv
, @Description AS Description
, @ExtendedPrice AS ExtendedPrice
, @NoteExistsFlag AS NoteExistsFlag
, @coiRowPointer AS coiRowPointer
INTO #ReportOutput
WHERE 1=0;
-- Insert data into the temp table.
INSERT INTO #ReportOutput
SELECT
co.cust_num,
[Link],
co.co_num,
[Link],
co.order_date,
co.curr_code,
[Link],

Creating Reports Using Mongoose Reporting 141


© 2017 Infor Education
coi.qty_ordered,
coi.co_line,
coi.due_date,
coi.u_m,
coi.price_conv,
(select top 1 description from item_all where item_all.item = [Link]) as
Description,
(coi.qty_ordered * coi.price_conv) as ExtendedPrice,
[Link],
[Link] as coiRowPointer
FROM co_mst co
Join coitem_mst coi ON co.co_num = coi.co_num
WHERE ISNULL(co.cust_num,@LowCharacter) BETWEEN @ExOptBegCust_num AND
@ExOptEndCust_num
AND co.co_num BETWEEN @ExOptBegCo_num AND @ExOptEndCo_num
AND co.site_ref = @pSite
AND co.cust_num is not null;
-- Return the report data.
SELECT
cust_num,
price,
co_num,
stat,
order_date,
curr_code,
item,
qty_ordered,
co_line,
due_date,
u_m,
price_conv,
Description,
ExtendedPrice,
NoteExistsFlag,
coiRowPointer
FROM #ReportOutput
ORDER BY cust_num, co_num;
COMMIT TRANSACTION
EXEC CloseSessionContextSp @SessionID = @RptSessionID;

142 Appendices
© 2017 Infor Education

You might also like