0% found this document useful (0 votes)
76 views50 pages

Stationery Customisation

Uploaded by

Vila
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)
76 views50 pages

Stationery Customisation

Uploaded by

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

Opera Hotel Edition

Property Management, Sales and Catering and Quality Management System

Oracle Report Builder


Stationery Customisation User Guide V2.6
November 29, 2004
Copyright
© 2004 Micros Systems, Inc. All rights reserved. No part of this publication may be reproduced,
photocopied, stored on a retrieval system, or transmitted without the express prior written consent of
the publisher Micros Systems, Inc. retains the right to update or change the contents of this document
without prior notice. Micros Systems, Inc. assumes no responsibility for the contents of this document.

Opera is a trademark of Micros Systems, Inc. On Oracle and the On Oracle logo are trademarks of
Oracle Corporation.

Information in this document is subject to change without notice.

Micros Systems, Inc. makes no warranty of any kind with regard to this material, including but not
limited to the implied warranties of marketability and fitness for a particular purpose.

Micros Systems, Inc. shall not be liable for errors contained herein or for incidental or consequential
damages in connection with the furnishing, performance, or use of this material.

David Arland
Micros-Fidelio Asia Pacific
13 Narabang Way
Belrose NSW 2084
Voice: +61294851000 Fax: +61294851099

MICROS-Fidelio
2640 Golden Gate Parkway, Suite 211
Naples, FL 34105
Voice: (941) 643-7999 / Fax: (941) 643-7911
Oracle Report Writer User Guide

Table of Contents
Property Management System and Quality Management System ........................................ 1
Introduction ............................................................................................................... 4
Editing Text Files ......................................................................................................... 5
Report Groups ............................................................................................................ 6
Report Writer Interface ................................................................................................ 7
Data Model.............................................................................................................. 8
Stationery Views .................................................................................................... 10
Layout Model ......................................................................................................... 11
Object Properties.................................................................................................... 12
Adding an Object.................................................................................................... 13
Object Alignment ................................................................................................... 13
Framing ................................................................................................................ 15
Two Methods for Adding a Field ................................................................................ 16
General Layout ...................................................................................................... 17
Moving Objects ...................................................................................................... 18
Layout Options....................................................................................................... 18
Conditional Formatting ............................................................................................... 19
Format Trigger....................................................................................................... 22
Formula Columns ...................................................................................................... 24
Column Size .......................................................................................................... 26
Exception handling in Formula Columns ..................................................................... 27
Promotional Text – Dynamic Read from External Files..................................................... 29
Dynamic File Name for Promotional Text.................................................................... 31
Inserting the Hotel Logo ............................................................................................. 33
HTML Confirmations................................................................................................... 35
Scrolling Text ........................................................................................................ 35
Compiling a Report to a Runtime File............................................................................ 36
Multiple Application Servers ..................................................................................... 36
REP_GEN Library ....................................................................................................... 37
Registration Card Configuration ................................................................................... 38
Sample Registration Card Format ............................................................................. 39
Confirmation Letter Configuration ................................................................................ 41
Using a Calculated Field (Formula Column) ........................................................ 44
Guest Folio ............................................................................................................... 47
On Line Help............................................................................................................. 50

CONFIDENTIAL PAGE 3 11/29/2004


Oracle Report Writer User Guide

Introduction
Opera stationery items, such as guest folio and registration cards are created using the Oracle
Report Writer tool. In principle, all stationery items produced by Opera are a report generated
from within the application.

In order to be able to create or modify stationery you need to have the Oracle Developer 2000
Reports Builder application installed on your PC. Most commonly, only Oracle Developer 2000
reports runtime files would be installed on a client, enabling an end-user to run existing
reports and stationery items.

The report builder application file is RWBLD60.EXE and would usually reside in a folder similar
to D:\oracle\dev6i\bin

Oracle report files have one of two file extensions that identify them:
RDF: Report Definition File
REP: Report Runtime File

The RDF file contains the source and definition of the report format and can be accessed using
Report Builder and modified as required. Once finalized, it is compiled into an REP for runtime
use by the application. A REP is a read only, compiled file that cannot be modified.

All RDF files for Opera stationery will reside in the


\Micros\Opera\Production\Customizable_Reports folder. This path is configured in the
Opera application parameter setting GENERAL>CUST_REPORTS. A compiled report is then
made resident in the \Micros\Opera\Production\Runtimes folder for use by the
application.

If local runtimes are used, a copy of the updated REP file must be copied to the local
\micros\opera\production\runtimes folder.

Note: When creating and modify RDFs for OPMS stationery, it is


important that both the RDF and REP files are copied to all
application servers installed onsite.

CONFIDENTIAL PAGE 4 11/29/2004


Editing Text Files
From within Opera, all stationery and reports can be accessed through system configuration.
Select Setup>System Configuration>Setup>Report Setup.

Stationery items will be assigned to various report groups. To locate or create a stationery
item you need to select the application report group from the list of values on the form.

To modify the definition of a stationery item, select the Edit button and then the Layout
button. (Via thick client only)

This will launch Oracle Report Builder and open the associated RDF for the REP referenced.
Report Groups
Opera requires that the stationery items be located in specific reporting groups, in order for
the application to select the correct file to use for the stationery item.

It is not necessary for the file to have a specific name, only that it exist in the correct report
group.

Group Name Content


Accounts Receivable Folio AR Folio Single Entry
Accounts Receivable AR Reminder Letters Multiple List
Reminders
Accounts Receivable AR Statements Multiple List
Statements
Commission Check Format TA Commission Check Format Multiple List
Commission Reports TA Commission Reports Multiple List
Confirmation Letter Reservation Confirmation Letters Multiple List
Currency Exchange Receipt Currency Exchange Receipt Single Entry
Deposit Receipt Deposit Receipt Single Entry
Expense Folio Expense Folio Single Entry
Folios Guest Folio Single Entry
Group Folio Group Folio Single Entry
Labels Mailing Labels Multiple List
Mailings Mailing Letters Multiple List
Messages Guest Message Single Entry
Paid-Out Receipt Paid-Out Receipt Single Entry
Passerby Folio Passerby Folio Single Entry
Registration Card Registration Cards Multiple List -
Parameter for
default

Note: If working with multi-lingual stationery, a single entry group


will contain one entry per language.

These groups should not be deleted or renamed and should be marked No for the Can be
Run Separately setting, as they are not a standard report that can be run from the
application

In all cases, besides labels, the report group type is Report.


Report Writer Interface

Figure 1 Object Navigator and Layout Model windows

The Oracle Report Writer uses a multiple window interface, allowing more than one window to
be open and overlapped within the application. The interface consists of two primary windows:
the Object Navigator window and the Report Layout window as shown in Figure 1. The Object
Navigator uses an Explorer tree-like interface which can expand and contract to display or hide
sub options; if not displayed it can be tiled in the window by pressing [F3].

Other windows or views are also available. These allow access to the Data Model Definition or
Live Preview window. These can be selected from either the Object Navigator as shown in
Figure 2 or the Toolbar as shown in Figure 3.

Figure 3 Data Model/Layout Model Toggle


Figure 2 Object Navigator [F3]
Data Model
The Data Model defines the source of the report data and the selection criteria or report filter.
For all stationery items the data source will be predefined.

To access the Data Model window, select it from the Object Navigator, or from the Toolbar as
shown in Figure 4.

Figure 4 Data Model Icon


The Data Model window will contain one or more query objects. Each object contains the
definition for a data source.

Figure 5 Data Model Window


A data source can be either a table or a view from the database. Most stationery items will
make use of views. In some cases, more than the one view is used on a single stationery
item.

A view can be defined as a combination of several tables made to appear as a single table for
ease of reference; the internal relationships, which define the joins betweens the tables, are
hidden from the user.
To view the definition of a query block, double click with the mouse over the query object as in
Figure 6.

Figure 6 Query Object Q_HEADER

This will display the query statement for the data object.

Figure 7 Query Statement Editor

In this example, the statement is selecting all fields in the FOLIO_HEADER view, indicated by
the asterix. These fields are then displayed in the Data Model window shown in Figure 8.

With each major release, changes to specific views may occur, such as the addition of a
standard field. In order to be able to include these changes on your layout, you may need to
have to manually alter the query object if the query is explicitly selecting certain fields from
the view.

For example, a standard field VOUCHER is added to the view. Before being able to reference
VOUCHER in the stationery layout, you would need to modify the query SELECT statement and
add VOUCHER to the data object.

If the query is defined to select all columns (SELECT * FROM <TABLE>) then any change to the
columns in the view will automatically be included in the data object.
Figure 8 Query Field List
These fields can then be referenced and placed on the Layout Model of the report, where
required.

Note: In order to include a field on the stationery item, it must be


available in the Data Model definition. If it has not been included for
selection, it cannot be added to the report.

Stationery Views
Item Database View For Data Model Item Database View For Data Model
Guest Folio FOLIO_HEADER Guest REP_GUEST_MESSAGES_VIEW
FOLIO_DETAIL_VIEW Message
FOLIO_CREDIT_CARD_LIST
FOLIO_FOOTER
FOLIO_TAX_DETAILS
AR Folio AR_FOLIO_DETAIL_VIEW Group Folio GRP_FOLIO_DETAIL
AR_FOLIO_LIST RESERVATION_GENERAL_VIEW
AR_FOLIO_HEADER GRP_FOLIO_FOOTER
FOLIO_H_PASSERBY
Passer By FOLIO_H_PASSERBY Exchange FIN_CASHIER_REP
Folio FOLIO_DETAIL_VIEW
FOLIO_CREDIT_CARD_LIST
FOLIO_FOOTER
FOLIO_TAX_DETAILS
Confirmation CONFIRMATION_GENERAL_VIEW Register CONFIRMATION_GENERAL_VIEW
s Card
AR AR_REMINDER_HEADER Expense EXP_FOLIO_DETAIL
Reminders AR_REMINDER_DETAILS Folio RESERVATION_GENERAL_VIEW
AR_REMINDER_FOOTER EXP_FOLIO_FOOTER
AR AR_REMINDER_HEADER, Commission TA_CHECK_DETAIL
Statement AR_STATEMENT_DETAILS Check
Deposit FOREIGN_CURRENCY
Receipt FINANCIAL_TRANSACTIONS
Paid Out FINANCIAL_TRANSACTIONS Pay Receipt FINANCIAL_TRANSACTIONS
Layout Model
The Layout Model can be accessed from the Toolbar or the Object Navigator.

Figure 9 Layout Icon


Once selected, the Report Layout is presented

Figure 10 Layout Model View

The layout is created using frames, lines, labels and field objects in the required locations.

Frames are used to define boundaries and establish the source of the data, for a specific
region of the report. In the case of the GSTFOLIO, four data sources exist:

Data Source Used to ...


Header Print the profile and reservation information
Detail Print the transaction information
Footer Print tax summary and folio balance data
Merchant Info Print credit card settlement data

Within each frame, label and fields objects are placed.


The Format Toolbar across the top of the window allows you to alter the font, size and
justification of each object on the Layout Model. Holding down the Shift key and selecting with
a mouse click can select multiple objects.

Object Properties
An object’s properties can be accessed and modified using the property palette option. Using
the context sensitive menu (right click) or pressing F4 will display the property palette. Once
selected with the mouse, small handles around the other edge of the object appear which can
be used to resize or reshape an object.

Figure 11 Context Menu: Property Palette Option

Figure 12 Property Palette Window


The property palette can then be used to alter the appearance or behavior of an object at
runtime.
Each and every object, including frames has properties defined.
Adding an Object
To add a field to the Layout Model, select the field object from the Tool Palette.

The tool palette to the left of the window allows you to add various objects to the
Report Layout. These include lines, boxes, label text, fields and frames.

Select the label object, then move the cross hair cursor on the layout window
and with the left mouse pressed, drag a line vertically or horizontally.

Select the label object, then move the cross hair cursor on the layout window
and with the left mouse pressed, drag an area to define the location of the new
label/text.

Select the field object , then move the cross hair cursor on the layout window
and with the left mouse pressed, drag an area to define the location of the new
field. Once defined on the Layout Model, the properties can be modified to think the
object to a field in the Data Model.

The T displayed shows the currently selected format of the background, border and
foreground colors.

Select the paint-can objects to alter the fill, border or text color. To alter existing
objects, you must first select them. All new objects created will inherit the
properties for color currently selected.

Figure 13 Layout Toolbar

It is also possible to copy and paste, or cut and paste objects on the Layout Model, using
options from the edit menu or standard Windows® keyboard shortcuts.

Object Alignment
There are also tools, on the Arrange menu, for aligning objects. Holding the Shift key and
selecting with a mouse click can select multiple objects at once.

Figure 14 Object Selection and Alignment


Select Arrange>Align Objects to display the Alignment form.
Figure 15 Alignment Options
Objects can be aligned vertically and/or horizontally.

Objects can also be resized using the Arrange>Size Objects option.

Figure 16 Object Sizing


Framing
The guest folio contains four data sources for the Header, Detail, Footer and Merchant
Information. Four main frames are used to create the various regions of the folio. Each frame
references a different data source.

Header section with reservation


and profile information

Detail section with repeat


transaction information

Footer section with tax breakout


and balance information

Merchant section with credit card


settlement information

Figure 17 GSTFOLIO Frames

Looking at the properties for each section’s frame, you can determine the various settings of
the object. There are two types of frames that can be used: a Standard and Repeat frame. A
Repeat frame is required if the Data Model will return multiple records from a single query. In
the case of the folio, for example, one reservation record could have several financial
transaction records. A Repeat frame is used to contain an area of the report in which the
transaction detail can print and repeat, for each associated financial transaction record for the
reservation.

To add a frame to the layout, use one of the tools. The arrow indicates a repeating
frame. The source of the data for a repeating frame would be a query in the Data Model, as
shown in Figure 15.
Figure 18 Frame Source

The source property identifies the location of the data for this frame; all objects contained
within this frame will need to exist in the applicable Data Model object.

Figure 19 Field Source

The same applies to the source for each field added to the Layout Model. The field balance is
added to the Footer section of the report – it is a child object of the Footer frame. Selecting
the properties of this field we can attach it to display/print the balance or balance in words.

Repeating frames also have other important properties, such as the number of records per
page. If 0, the frame will repeat to fill the page, if possible. Any subject frames or objects will
be pushed to the second page. With predefined stationery, it may be important to restrict the
printing to only 10 or 15 records for example.

Two Methods for Adding a Field


Field Object
A field can be added using the field object, from the palette and linking it to the field in the
data source via the property palette. This involves several steps

1. Select the Field icon and move the cross hair to position for field on the Layout Model.
2. Drag the area to define the field location.
3. Access properties F4 and link the field source to the field in the Data Model.
4. Change the object name to something meaningful (default F_1).

Refer to Figures 16 and 17.


Figure 20 Field Source

Text Object
An alternative is to reference a field using a Label Object, prefixed with the ampersand (&)
character. Using the text tool [T] on the tool palette, you can reference a field directly
prefixed with an ampersand (&). This is referred to as a Merge Code, for our purposes.

Figure 21 Object Comparison


This Figure shows a label, “Balance,” a field object “F_BALANCE” which references the field
BALANCE in the Data Model and a merge code &p_currency to print the value of the
p_currency field (currency of the folio).

In nearly all cases, merge codes can be used. These are added to the Layout Model using the

text object. .

General Layout
For the folio, there is the requirement that the supplement and reference fields are fixed in
length, to ensure they do not extend and push out the columns to the right. An object has
properties for horizontal and vertical elasticity. The value of these properties can be set as
described below:

Contract Means the size of the object decreases, if the formatted objects or data
within it are short enough, but it cannot increase to a size greater than that
shown in the Report Editor. Truncation of data may occur; look at the
examples. (You can think of this option as meaning "only contract, do not
expand.")

Expand Means the size of the object increases, if the formatted objects or data
within it are tall enough, but it cannot decrease to a size less than that
shown in the Report Editor. (You can think of this option as meaning, "only
expand, do not contract.")

Fixed Means the size of the object is the same on each logical page, regardless of
the size of the objects or data within it. Truncation of data may occur.

Variable Means the object may expand or contract in size to accommodate the
objects or data within it (with no extra space), which means the size shown
in the Report Editor has no effect on the object's size at runtime.

If working with predefined stationery, it may be necessary to set the properties of all objects
to fixed and size them accordingly to fit the pre-printed areas of the folio. This will prevent the
object from increasing in size and going out of the defined area.

Moving Objects
It is possible to move objects using different methods. Click to select an object and drag with
the mouse to the desired position.

Click to select an object and move with the cursor keys, this can more accurate. The degree of
precision is determined by setting a user preference within Format>Layout
Options>Rulers>Snap points per grid spacing to a value of 256

Figure 22 Ruler Settings

Layout Options
Within Format>Layout Options>Layout Model, you can define a preference for the display
of the Layout Model. It may assist you to display a frame around each field, label and frame.

Figure 23 Layout Options


Conditional Formatting
For stationery items, such as Confirmation Letters and Guest Folios, it is often necessary to
include text or field items only under specific conditions.

Figure 24 Conditional formatting on a field object

Within the Layout Mode of Oracle Report Writer, you are able to add a text object with the T
tool. Drag an area on the report and enter your label text.

To define that this label (text) object should only be displayed for specific conditions you need
to access the object’s properties palette through the context menu (right click) or by pressing
[F4].
Figure 25 Context Menu [F4]

Figure 26 Conditional Format

The Conditional Formatting property will allow you to define the formatting for this object
based on specific conditions.

One of these formatting options is to hide the object completely. Select the … button to
activate the Condition Wizard.
Figure 27 Format Condition Wizard
Selecting New will allow you define a new format condition.

Figure 28 New Condition


This object will only display if the above condition is not met. If this condition is found to be
True, the object is set to Hidden. The wizard is a replacement for the need to write PL/SQL
code to define conditional format triggers.
Format Trigger
The format trigger property of an object allows access to a code window for the input of
PL/SQL.

Figure 29 Format Trigger Code

This format trigger function was


auto generated by the Condition
Wizard run previously.
Another way of writing the conditional formatting function generated by the wizard would be

Figure 30 PL/SQL Code for Format Trigger

The function B_7FormatTrigger will return to the report a True (Display it) or False (Hide it)
value.

In the example above, if the reservation type of the reservation is


‘1’, ‘5’ or ‘9’ then it will display this paragraph (object). Otherwise (else) the object is not
displayed – remaining hidden.

Figure 31 Preview with Format Trigger. Paragraph Hidden

At runtime, the paragraph is hidden, as reservation type does not equal 1, 5 or 9.


Formula Columns
It is also possible to create a field (merge code), which is not part of the predefined view using
PL/SQL code.

For example, there may be a requirement to add a merge code to generate a dynamic
paragraph based on the value of another field.

This is achieved using a formula column field. From within the Data Model, ensure the tool
palette is visible by selecting View>Tool Palette.

From the tool bar, select the formula column icon. If the tool bar is not displayed within
the Data Model window, select View>Tool Palette from the menu bar.

Moving the cross hair cursor over the data block and dragging an area within the data block
creates a new field, CF_1.

Figure 32 Formula Column / Calculated Field

By default, the data type of the field is numeric; this can be changed by accessing the
property palette for the field using F4.

Figure 33 Data type of Column

The object name can also be changed to something meaningful when used in the Layout
Model.
Object (field) name changed to
something meaningful.

Data type of field changed to


character

Figure 34 Property Palette


Selecting the PL/SQL property, you can now create a function that will propagate a value into
the RATE_MESSAGE field just created. In this example, the function is required to determine
the value of the rate code within the reservation and return back a message to print on the
folio.

Note: All calculated fields should be given a name starting with CF_

It is then easy to determine, within the layout model, that this field
is non-standard and has been added to the data model specifically.

Figure 35 PL/SQL Code Window for Rate Message


Once entered, select the Compile option to ensure the code is syntactically correct. A
‘successfully compiled’ message is displayed in the lower right corner of the code window, as
in Figure 35. If the function does not compile, you will not be able to convert your report to an
REP as required.

Note: The return value for this function is character (string),


allowing for the string “Your rate includes breakfast…” to be
returned back to the field. In most cases, formula columns will be
character based.

Once painted onto the Layout Model, of the registration card, this will print for applicable
guests.

A label object is added to reference the


CF_RATE_MESSAGE field created in the Layout
Model. The field can then be resized across the
width of the registration card and set to fixed
width and height. Prefixing with CF_ identifies
that this code is not a standard field within the
view

Figure 36 Adding CF_RATE_MESSAGE to layout model

Calculated fields can be added to Confirmation Letters, Registration Cards etc, to enhance the
presentation and personalization of stationery items.

Note: Before making changes to a report’s Data Model, please


ensure that you have a backup of the RDF file

Column Size
When defining any formula column it is necessary to define the size of the column. This
ensures enough memory is reserved within the software to hold the return value from the
function.

Care should be taken to ensure the returned value does not exceed the defined size of the
column.

Figure 37 Property Palette

Consider the following function


Figure 38 PL/SQL Sample

For a profile name of Mr David Arland, this function would return a string ‘Mr D. Arland’

However in the event that the guest name was “Arnold Schwarzenegger‘ this function would
result in an (overflow) error, as the returned value is greater than 15 characters.

If concatenating several fields together, it is recommended that a substr( ) function be used


to ensure the return value never exceeds the defined field size.

Figure 39 PL/SQL Sample

Exception handling in Formula Columns


If programming formula columns into stationery items, it is very important to consider all
scenarios and handle any exceptions.

Consider the following function

Figure 40 PL/SQL Sample


Although the syntax is correct, this function could result in the report failing on execution. The
reason is that the code does not allow for the condition when RATE_CODE is equal to some
other value than ‘SUMMER’,’WINTER’,’BREAK’ or ‘ROMANCE’.

If the RATE_CODE equals ‘HOLIDAY’ the function would not know what to return and would
result in an unhandled exception.

Figure 41 PL/SQL Function

This can be corrected using an else clause in the IF statement to return NULL for any other
circumstance.

Figure 42 Handled Exception Code

Alternatively or in addition to the else clause the no_data_found exception can be added to
return some value in the event an exception occurs during execution of the code.

Support for programmed formula columns is the responsibility


of the developer of the code (not L2/L3 support)
Promotional Text – Dynamic Read from External Files
Without licensed access to the Oracle Report Builder program, sites/customers are not able to
change the boilerplate text within their stationery. Often sites have a requirement to
frequently modify a promotional text paragraph within confirmation letters etc.

To provide a solution to this requirement, it is possible to configure a formula column that will
read an external text file residing in the runtimes folder. The external file can be edited using
notepad and the text updated/replaced as required. On execution of the report, the content of
the file is read into the report and displayed within the column.

Figure 43 Data Model - Add Column

Figure 44 Field Properties

Within the data model, add a new formula column using the tool and access object
properties [F4]

Name the object accordingly and setup data type as character


Read from File should be set to ‘YES’ and the file format set to ‘TEXT’

Access the PL/SQL Formula to add the code


Figure 45 Function PL/SQL

and [COMPILE] then [CLOSE]

This code instructs the column to read a file called ‘PROMO.TXT’ from the runtimes folder.
The next step is to switch to the layout model and add the field object.

Figure 46 Field Properties

Care should be taken to ensure the field size (width) is sufficient to hold the text that exists
within the external file. Ensure elasticity is set to expand vertically, if the text should wrap to a
second or third line.

Finally create a file ‘PROMO.TXT’ containing the text to be outputted in the field and load this
file to the d:\micros\opera\production\runtimes folder.
Figure 47 External File PROMO.TXT

The contents of this file can be changed by the hotel as required without needing to amend
the RDF and recompile to a REP.

Dynamic File Name for Promotional Text


This concept can be extended to dynamically read different external files under specific
circumstances.

A separate file per room type could be read to include a room image within the letter

The formula column would be set to read an image file from the runtimes folder.
Figure 48 Field Properties

Figure 49 Layout Model

The field can then be added to the layout model. At runtime the function will calculate
:room_type || ‘.GIF’ to TK.GIF and read this file into the report for output.

Figure 50 Confirmation Letter Preview


Inserting the Hotel Logo
The sample principle of reading an external file into a formula column applies to the hotel logo
GIF.

In the Data Model, you need to add a new data object, using the formula column tool. If
the tool palette is not visible within the data model window, select View, Tools. Position the
cross hair over the Data Model window and drag an area to create the object. From the
properties of the object, change the name to CF_LOGO; change the data type to CHARACTER;
set Read From File to YES and define the file format to be IMAGE. Finally, in the PL/SQL
formula property, type return :p_resort;

Figure 51

This function will propagate the


CF_LOGO field with the value of the
resort code from hotel data.

Compile the PL/SQL function and close the properties of the field.

Toggle to the Layout Model and open the margin section of the report, using the edit

margin icon. In the top left corner, add a field using the icon and paint a square in the top
left corner. To obtain a perfect square, hold down the Shift key while dragging the mouse.

Access the properties of the object. Change the object name to F_LOGO.
Change the field source property to reference the CF_LOGO data object.
Figure 52

Close the property of the F_LOGO object.

Finally, ensure the Fill Color is set to No Fill and the Line Color is set to No Line using the
format tools on the layout model.

Figure 53 Figure 54

You can also resize the object according to your requirements. At runtime, the report writer
reads the file \micros\opera\production\runtimes\<resortcode>.gif and places it into
the CF_LOGO object.

It is highly recommended that object names, such as F_LOGO,


remain consistent across all reports for ease of support in the
future.
HTML Confirmations
From V2.6, it is possible to email confirmations in HTML format. This format offers a number
of advanced formatting options. For each text object on the layout model, it is possible to add
tags to control formatting when received in HTML format.

Within the property palette for an object, set


the ‘Contains HTML tags’ to yes.

Figure 55 Object Properties

Scrolling Text
An example is using the <marquee> tag to create scrolling text.

Figure 56 - Layout
Additional tags can be set for font, font size and/or colour

Figure 57 Resulting HTML Letter

HTML tags could also be included in any external text file read for promotional text use.
Compiling a Report to a Runtime File
Before saving, you should also do a full compile of the report by using the menu option,
Program>Compile>All or by pressing Cntrl+Shift+K. This will process any PL/SQL code
and validate the syntax.

Once complete, your RDF should be saved back to the


\Micros\Opera\Production\Customizable_Reports folder.

If errors are produced, they will be displayed in a window

Figure 58 Report Compile Window

- most commonly these type of errors are a result of not being connected to the schema.

To compile the report to an REP, use File>Administration>Compile or press Cntrl+T.


In the Save As dialog, locate the runtime folder \micros\opera\production\runtimes and
select Save. If a REP file of the same name exists, you will be prompted to overwrite the file.

Multiple Application Servers


It is essential that the new runtime REP be distributed to all thick clients and to all application
servers operational at the site.

Also ensure any externally read files, such as PROMO.TXT or <roomtype>.gif reside in
\runtimes of all clients and/or application servers.
REP_GEN Library
All Opera stationery and reports require that the REP_GEN library be attached. This library
contains common functions, used by all reports from Opera. If reports do not compile, ensure
this library is attached and/or you are connected to the database. From the Object Navigator
[F3], open the attached libraries section and ensure the REP_GEN library is linked to the
report.

Figure 59: REP_GEN Library

If you need to attach this library file, select the icon to the left of the Object Navigator
and select Browse on the Attach Library dialog box, to locate this file in the
\Micros\Opera\Production\Runtimes folder. Highlight the file and select Open, then
Attach to link the file to the report. You can then select Yes to remove the non-portable path
from the file.
Registration Card Configuration
The guest registration card uses the CONFIRMATION_GENERAL_VIEW as the data source. The
Data Model required has been pre-configured in the sample registration card provided with the
demonstration database.

If printing to letterhead or plain paper, both the boilerplate and field objects must be added to
the Layout Model. If printing to pre-printed stationery, only the field objects need to be added
to the Layout Model.

From the Toolbar, select the Layout Model to display the Report Layout.

The primary codes used on the registration card are:

Field Comments
&RESORT_FULL_NAME From hotel data
&RESORT_FULL_ADDRESS From hotel data
&FULL_ADDRESS Name and address of guest
&PHONE_NO Primary phone number from profile
&ARRIVAL_DATE
&DEPARTURE_DATE
&DEPARTURE_TIME
&ROOM_RATE
&ROOM_NUMBER
&ROOM_TYPE_DESCRIPTION Converted to description
&ROOM_TYPE Code only
&CURRENCY_CODE Currency of the rate code
&NO_OF_ADULTS
&NO_OF_CHILDREN
&MULTIPLE_RATE_INFO Property for vertical elasticity needs to be set to variable, so
field can grow as required.
&SHARE_LIST
&MEMBERSHIP_INFO
&FIRST_NAME
&LAST_NAME
&TITLE
&RATE_CODE

Alternatives for the &FULL_ADDRESS field are

&TITLE &FIRST_NAME &LAST_NAME


&ADDRESSEE_ADDRESS1
&ADDRESSEE_ADDRESS2
&ADDRESSEE_CITY &ADDRESSEE_STATE &ADDRESSEE_ZIP_CODE
&COUNTRY_DESCRIPTION

These codes are added to the Layout Model using the icon on the tool palette.
Sample Registration Card Format
The FULL_ADDRESS field and the surrounding frame are set to variable length, indicated by
the diamonds on each end of the frame. The same requirement applies to the multiple rate
information field. The field and frame are required to expand, based on the amount of data
returned to this field, by the program.

Figure 60 Layout Model – Registration Card


Confirmation Letter Configuration
The confirmation letter uses the CONFIRMATION_GENERAL_VIEW as the data source. The
Data Model for the confirmation letter has been pre-configured in the sample letters provided
with the demonstration database.

As the same view is used as the source, for both the registration card and confirmation letters,
the same fields are available on both.

Within the primary repeat frame, which references the Q_1 data source, place label objects for
the various fields and boilerplate text required for the letter.

Figure 61 Layout Model – Confirmation Letter with Formula Columns


The &FULL_NAME and &GUARANTEE_MESSAGE fields are not standard.

Note: The &CUSTOM_MESSAGE merge code used in this letter


would contain the variable text inputted by the user before printing
the letter.
Conditional formatting can then be added to the hide the deposit request paragraph, as
required.

Figure 62 Conditional Formatting Wizard

If the reservation type is not ‘deposit request’ then the text is hidden (ie not printed).
The following format trigger has been generated by the wizard:

Figure 63 PL/SQL Format Trigger

You can amend this function if additional criteria need to be added. For example, only print
this paragraph if the deposit amount due field has a value.

Figure 64 Format Trigger update

Note: Remember to compile the function if you make any changes.


You should see “Successfully Compiled” in the lower right of the
window.
Using a Calculated Field (Formula Column)
An alternative to adding all paragraphs and using conditional formatting to hide and display
paragraphs as required, is to add a formula column otherwise known as a calculated field, to
the Data Model and write PL/SQL code to return a value back to the field, for output on the
report.

Figure 65 Formula Column Creation

After adding a calculated field and renaming it to GUARANTEE_MESSAGE, of type CHARACTER


in the properties F4, you can access the PL/SQL property for this field
Figure 66 PL/SQL code for Formula Column

The PL/SQL code above is determining the value of the RESERVATION_TYPE field and
returning an applicable message to print on the confirmation letter.

The next step is to include this message field on the Layout Model; after toggling to the Layout
Model, using the Toolbar icon.

Figure 67 Layout Icon

A label or merge code is added to the report, using the tool.


Figure 68 Adding Formula Column to Layout Model

Adding a label to reference the field &GUARANTEE_MESSAGE is all that is required.


Guest Folio
The guest folio is more complex than the registration card or confirmation letter, as there is
more than one data source that is referenced in the layout model. This is necessary, as
information for the folio is being selected for several different areas of the database; including
Profile, Reservation, Transactions and Credit Cards.

Four data sources, in the Data Model of the GSTFOLIO, select information from various views:
FOLIO_HEADER, FOLIO_DETAIL_VIEW, FOLIO_CREDIT_CARD_LIST, FOLIO_FOOTER,
FOLIO_TAX_DETAILS

The four data sources are Q_HEADER, Q_DETAIL, Q_FOOTER and Q_MERCHANT_INFO.

In the Layout Model, frames are used to section the folio; each frame reference one of the
four data sources.

Figure 69 Folio Header Frame

First, a Repeat Header frame is added to the folio. This frame is linked to the Q_HEADER data
source. Fields and labels can then added in here, available from within the Q_HEADER data
source. Both fields and merge codes have been used in the figure above; although merge
codes (using the ampersand) can be used throughout.

Note: The Oracle Report Writer will interpret any label prefixed with
an ampersand to be a field reference, rather than boilerplate text.

This frame should be set to print on all pages, in the advanced layout properties.

Figure 70 Print Object On Property

Next, an outer frame is added for the transaction information; within this column titles/labels
can be added for date, description, debits and credits.
Figure 71 Outer Frame

Within this frame, a repeat frame is added for the detail (repeat) line for the transactions. This
repeat frame is linked to the Q_DETAIL data source – which retrieves the transaction records.

Figure 72 Repeat Frame


The reference text field should use the REFERENCEDISPLAYED field. This is a calculated field
which will format the content based on the setting options->phone detail. The phone
number will be removed from reference text depending on the parameter setting.

An arrow to the left of the frame indicates a Repeat frame. The


boilerplate text, for the titles, is outside the Repeat frame. Only those
fields, such as Date, Description, Reference, Supplement, Debit and
Credit are contained within the repeating frame.

This Repeat frame is linked to the Q_DETAIL data source through the
property palette F4 of the frame.

Figure 73 Arrow indicates repeat frame


The Summary frame is then added

Figure 74 Footer Frame with membership_message field


This frame is linked to the Q_FOOTER data source and contains the column totals, balance and
tax information. This frame/data source also contains a merge code for the membership
message – printed if awarding points to a loyalty card program.
If required, a final frame can be added, linked to the Q_MERCHANT_INFO data source

Figure 75 Merchant Information Frame


Contained within, you would place the various credit card fields.

Note: Currently, there is no facility to include user-defined fields


from the profile or reservation onto the folio.
On Line Help
The Report Builder On-Line help is an excellent source of reference for all topics covered in
this document.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy