[go: up one dir, main page]

0% found this document useful (0 votes)
455 views424 pages

WF 713 Appsgt

This manual describes how to use WebFOCUS graphical tools to create and deploy self-service report applications on the Internet or corporate intranets. It is intended for application developers. This manual may not be reproduced in any form without the written permission of information builders, inc.

Uploaded by

hellboysatya
Copyright
© Attribution Non-Commercial (BY-NC)
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)
455 views424 pages

WF 713 Appsgt

This manual describes how to use WebFOCUS graphical tools to create and deploy self-service report applications on the Internet or corporate intranets. It is intended for application developers. This manual may not be reproduced in any form without the written permission of information builders, inc.

Uploaded by

hellboysatya
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 424

Developing Reporting Applications With

Graphical Tools
Version 7 Release 1.3

DN4500724.0206
EDA, EDA/SQL, FIDEL, FOCCALC, FOCUS, FOCUS Fusion, FOCUS Vision, Hospital-Trac, Information Builders, the
Information Builders logo, Parlay, PC/FOCUS, SmartMart, SmartMode, SNAPpack, TableTalk, WALDO, Web390,
WebFOCUS and WorldMART are registered trademarks, and iWay and iWay Software are trademarks of Information
Builders, Inc.
Due to the nature of this material, this document refers to numerous hardware and software products by their
trademarks. In most, if not all cases, these designations are claimed as trademarks or registered trademarks by
their respective companies. It is not this publisher’s intent to use any of these names generically. The reader is
therefore cautioned to investigate all claimed trademark rights before using any of these names other than to refer
to the product described.
Copyright © 2006, by Information Builders, Inc and iWay Software. All rights reserved. Patent Pending. This manual,
or parts thereof, may not be reproduced in any form without the written permission of Information Builders, Inc.
WebFOCUS7

Preface
This documentation describes how to use WebFOCUS graphical tools to create and deploy
self-service report applications on the Internet or corporate intranets. It is intended for
application developers.

How This Manual Is Organized


This manual includes the following chapters:

Chapter/Appendix Contents

1 Where Am I? Explains where to find the information you are looking


for within the WebFOCUS documentation set.

2 Understanding User Introduces user interface design in WebFOCUS and


Interface Basics describes the components of a typical user interface.

3 Creating a Reporting Describes how to create a reporting application in the


Application local development environment.

4 Creating a Reporting Describes how to create a procedure, which is the


Procedure core element of a reporting application.

5 Designing a User Describes how to create a user interface in the local


Interface for a Web development environment using the HTML Layout
Application With the Painter (previously the Resource Layout Painter).
HTML Layout Painter

6 Designing an Describes how to create PDF reports, and to


Application With the coordinate and distribute layouts in the local
PDF Layout Painter development environment using the PDF Layout
Painter.

7 Enhancing a User Describes coding capabilities that extend the


Interface functionality and usability of an interface, including the
display of reports in popular formats and the display of
multiple reports on a single launch page.

8 Partitioning and Describes the steps you will perform for successful
Deploying Project Files deployment of your project files to the Web.

Developing Reporting Applications With Graphical Tools iii


Preface

Chapter/Appendix Contents

9 Editing Application Describes how to create, view, and edit the source
Components as Text in code for procedures, procedure components, Master
Developer Studio and Access files, and other types of files required by
your applications with the Developer Studio text editor.

10 Creating an Update Describes how to use the Update Assist to create an


Application With Update update application in Developer Studio.
Assist

A Creating a Report The following topics describe how to create content for
Template for the Report the Report Wizard tool using a Reporting Template.
Wizard

Documentation Conventions
The following conventions apply throughout this manual:

Convention Description
THIS TYPEFACE or Denotes syntax that you must enter exactly as shown.
this typeface

this typeface Represents a placeholder (or variable) in syntax for a value


that you or the system must supply.
underscore Indicates a default setting.

this typeface Represents a placeholder (or variable), a cross-reference, or


an important term. It may also indicate a button, menu item,
or dialog box option you can click or select.

this typeface Highlights a file name or command.

Key + Key Indicates keys that you must press simultaneously.


{ } Indicates two or three choices; type one of them, not the
braces.
[ ] Indicates a group of optional parameters. None are required,
but you may select one of them. Type only the parameter in
the brackets, not the brackets.
| Separates mutually exclusive choices in syntax. Type one of
them, not the symbol.

iv WebFOCUS7
Preface

Convention Description
... Indicates that you can enter a parameter multiple times. Type
only the parameter, not the ellipsis points (…).
. Indicates that there are (or could be) intervening or additional
. commands.
.

Related Publications
To view a current listing of our publications and to place an order, visit our World Wide Web
site, http://www.informationbuilders.com. You can also contact the Publications Order
Department at (800) 969-4636.

Customer Support
Do you have questions about this product?
Call Information Builders Customer Support Services (CSS) at (800) 736-6130 or
(212) 736-6130. Customer Support Consultants are available Monday through Friday
between 8:00 A.M. and 8:00 P.M. EST to address all your questions. Information Builders
consultants can also give you general guidance regarding product capabilities and
documentation. Please be ready to provide your six-digit site code (xxxx.xx) when you call.
You can also access support services electronically, 24 hours a day, with InfoResponse
Online. InfoResponse Online is accessible through our World Wide Web site, http://
www.informationbuilders.com. It connects you to the tracking system and known-problem
database at the Information Builders support center. Registered users can open, update,
and view the status of cases in the tracking system and read descriptions of reported
software issues. New users can register immediately for this service. The technical
support section of www.informationbuilders.com also provides usage techniques,
diagnostic tips, and answers to frequently asked questions.
To learn about the full range of available support services, ask your Information Builders
representative about InfoResponse Online, or call (800) 969-INFO.

Developing Reporting Applications With Graphical Tools v


Preface

Information You Should Have


To help our consultants answer your questions most effectively, please provide the
following information when you call:
❏ Your six-digit site code (xxxx.xx).
❏ Your WebFOCUS configuration:
❏ The front-end you are using, including vendor and release.
❏ The WebFOCUS connection method (Servlet, CGI, ISAPI) as well any Web and/or
Application server vendor and release information.
❏ The software release.
❏ Your server version and release. You can find this information using the Version
option in the Web Console.
❏ The stored procedure (preferably with line numbers) or FOCUS commands being used
in server access.
❏ The name of the Master File and Access File.
❏ The exact nature of the problem:
❏ Are the results or the format incorrect? Are the text or calculations missing or
misplaced?
❏ The error message and return code, if applicable.
❏ Is this related to any other problem?
❏ Has the procedure or query ever worked in its present form? Has it been changed
recently? How often does the problem occur?
❏ What release of the operating system are you using? Has it, WebFOCUS, your security
system, communications protocol, or front-end software changed?
❏ Is this problem reproducible? If so, how?
❏ Have you tried to reproduce your problem in the simplest form possible? For example,
if you are having problems joining two data sources, have you tried executing a query
containing the code to access a single data source?
❏ Do you have a trace file?
❏ How is the problem affecting your business? Is it halting development or production?
Do you just have questions about functionality or documentation?

vi WebFOCUS7
Preface

User Feedback
In an effort to produce effective documentation, the Documentation Services staff
welcomes your opinions regarding this manual. Please use the Reader Comments form at
the end of this manual to relay suggestions for improving the publication or to alert us to
corrections. You can also use the Documentation Feedback form on our Web site,
http://documentation.informationbuilders.com/feedback.asp.
Thank you, in advance, for your comments.

Information Builders Consulting and Training


Interested in training? Information Builders Education Department offers a wide variety of
training courses for this and other Information Builders products.
For information on course descriptions, locations, and dates, or to register for classes,
visit our World Wide Web site (http://www.informationbuilders.com) or call (800) 969-INFO
to speak to an Education Representative.

Developing Reporting Applications With Graphical Tools vii


Preface

viii WebFOCUS7
WebFOCUS7

Contents
1. Where Am I? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
WebFOCUS Core Documentation Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
2. Understanding User Interface Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
User Interface Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
About a Logon Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Setting a Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
About a Launch Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Adding a Control to a Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
Types of Launch Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Ways to Create a Launch Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
About an HTML Display Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
3. Creating a Reporting Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
What Is a Reporting Application? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Project-based and Remote Development Environments . . . . . . . . . . . . . . . . . . . . . . 3-2
Creating a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Organizing a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Adding a Master File to a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Viewing and Modifying Project Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Managing a Project With Source Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34
Source Control Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39
Securing a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-42
Removing a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43
4. Creating a Reporting Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Selecting a Creation Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Incorporating a Procedure Into an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Copying a Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Creating a Procedure Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
Working With a Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Using the SQL Report Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22
Using the Report Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33
Creating a Parameterized Report Using the Report Wizard . . . . . . . . . . . . . 4-35
Calling a Procedure From the Current One . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-46
Engine Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-55

Developing Reporting Applications With Graphical Tools ix


Contents

Managing Flow of Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-56


Working With a Full Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-57
Running a Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-59
Canceling a Running Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-62
5. Designing a User Interface for a Web Application With the HTML Layout
Painter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Uses for the HTML Layout Painter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Getting Started With the HTML Layout Painter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Creating a Report Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Adding a Report or Graph to the HTML Layout . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
Selecting Components to Import Into a Procedure . . . . . . . . . . . . . . . . . . . . . 5-14
Adding a Frame to the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16
Adding a Line to the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20
Adding an Image to the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-22
Adding Text to the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-24
Adding a Hyperlink to the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Adding a Group Box to the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28
Adding a Push Button to the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30
Using Form Controls to Supply Parameter Values . . . . . . . . . . . . . . . . . . . . . . . . . 5-32
Using a Text Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-34
Using a Text Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-36
Using a Drop-Down List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-39
Using a List Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-42
Using Check Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-44
Using Radio Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-46
Using Tree Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-48
Adding a Dynamic Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-52
Working With the Properties Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-56
Setting Form Controls for New Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-57
Working With the Parameters Tab in the Properties Window . . . . . . . . . . . . . . 5-58
Associating Form Controls With Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 5-58
Updating Parameters in the HTML Layout Painter With Report Painter Changes 5-65
Filtering Dynamic Parameter Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-65
Customizing Dynamic Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-68
Hidden Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-72
Automatically Populating Fields With Parameter Values . . . . . . . . . . . . . . . . . . 5-72
Adding an ALL Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-73
Supplying Parameter Values to External Reports . . . . . . . . . . . . . . . . . . . . . . . . . . 5-75

x WebFOCUS7
Contents

Styling Your Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-83


Adding a CSS or Script to the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-83
Setting HTML Page Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-83
Specifying Browser Defaults with Style Composer . . . . . . . . . . . . . . . . . . . . . . . . . 5-85
Laying Out Objects With the HTML Layout Painter . . . . . . . . . . . . . . . . . . . . . . . . . 5-98
Setting Relationships Between Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-98
Customizing the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-101
Controlling the HTML Layout Painter Environment . . . . . . . . . . . . . . . . . . . . . . . . 5-102
6. Designing an Application With the PDF Layout Painter . . . . . . . . . . . . . . 6-1
Uses for the PDF Layout Painter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Getting Started With the PDF Layout Painter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Creating a Compound Layout Report in PDF Format . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Controlling Overflow in Compound Layout Reports . . . . . . . . . . . . . . . . . . . . . . 6-8
Creating a Coordinated Compound Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
Adding a Reporting Object to a PDF Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
7. Enhancing a User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
Displaying a Report in a Helper Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Controlling Multiple Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Adding JavaScript for Drill-Down Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24
Facilitating Report Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-31
Using the WebFOCUS Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32
Opening and Closing the WebFOCUS Viewer . . . . . . . . . . . . . . . . . . . . . . . . . 7-34
Printing With On-Demand Paging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-36
WebFOCUS Viewer Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-36
Using a Cascading Style Sheet to Standardize Display . . . . . . . . . . . . . . . . . . . . . . 7-37
Displaying a Previously Run Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-44
Passing a User ID From HTML for a Custom Menu . . . . . . . . . . . . . . . . . . . . . . . . . 7-45
8. Partitioning and Deploying Project Files . . . . . . . . . . . . . . . . . . . . . . . . . 8-1
Deployment Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Summary of Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Step 1: Identify the Target Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Step 2: Create a Deployment Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Step 3: Partition the Project Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10
Working in a Default Partition Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15
Setting Running Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-18
Step 4: Deploy the Project Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
Configuring the Target Servers (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-24

Developing Reporting Applications With Graphical Tools xi


Contents

9. Editing Application Components as Text in Developer Studio . . . . . . . . 9-1


Text Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Accessing Text Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
The Other Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
The Comment Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
Creating a Text File or a Procedure Component as Text . . . . . . . . . . . . . . . . . . . . . . 9-6
Opening Application Components as Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
Finding and Replacing Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Changing Text Color and Case Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Adding Headings and Footings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12
Using Bookmarks to Move Within a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13
Running a Procedure From the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14
Opening a Graphical Tool From the Text Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15
10. Creating an Update Application With Update Assist . . . . . . . . . . . . . . 10-1
Update Assist (Step 1 of 6): Selecting Segments to Update . . . . . . . . . . . . . . . . . 10-2
Update Assist (Step 2 of 6): Selecting Fields to Update . . . . . . . . . . . . . . . . . . . . . 10-3
Change in When User-Supplied Data Is Validated . . . . . . . . . . . . . . . . . . . . . . 10-5
Update Assist (Step 3 of 6): Selecting Navigation Options . . . . . . . . . . . . . . . . . . 10-11
Update Assist (Step 4 of 6): Selecting a Color Scheme . . . . . . . . . . . . . . . . . . . . 10-13
Update Assist (Step 5 of 6): Selecting Output File Options . . . . . . . . . . . . . . . . . 10-14
Update Assist (Step 6 of 6): Confirming Selections . . . . . . . . . . . . . . . . . . . . . . . 10-15
About Your Update Assist Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16
Editing Your Update Assist Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-19
Changing the Search Field for Tree and Combo Box Navigation . . . . . . . . . . . 10-19
Customizing the Tree Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22
Calendar Control for Date-Formatted Fields . . . . . . . . . . . . . . . . . . . . . . . . . 10-22
Date-Stamping Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-23
Auto-numbering Fields in Update Assist Applications . . . . . . . . . . . . . . . . . . 10-24
Continuing Displaying Currently Displayed Values After a New Action . . . . . . . 10-24
Calling an Update Assist Procedure From a WebFOCUS Report . . . . . . . . . . . . . . . 10-25
Calling an Update Assist Project From a WebFOCUS Report Example . . . . . . . 10-27
A. Creating a Report Template for the Report Wizard . . . . . . . . . . . . . . . . . A-1
Creating a Report Template for the Report Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . A-2

xii WebFOCUS7
WebFOCUS7

1 Where Am I?

The WebFOCUS core set of Topics:


documentation contains information on
❏ WebFOCUS Core Documentation
using data sources, developing
Roadmap
applications, creating reports, and
reference materials. This topic helps
explain where to find the information you
are looking for.
WebFOCUS Core Documentation Roadmap

WebFOCUS Core Documentation Roadmap


The following illustrates the relationship of the manuals in your WebFOCUS Core
documentation set.

Developing an Application

WebFOCUS Application
Development Getting Started
Developing Reporting
Applications

Developing Reporting You Are Here


Applications With
Graphical Tools

Using i-Base
Functions Archives

Describing and
Creating a Report Accessing Data

Creating Reports With Describing Data With


Graphical Tools Graphical Tools

Creating Reports With Describing Data With


WebFOCUS Language WebFOCUS Language

If you are developing a WebFOCUS application…


❏ Developer Studio Application Development Getting Started provides an overview of the
process of developing an application in WebFOCUS Developer Studio and deploying it
to the Web. This also includes a description of the tools that are available for
developing your applications as well as tutorials to familiarize you with the
development process.
❏ Developing Reporting Applications discusses application logic and the structure of an
application. This includes detailed instructions on how to create the procedures and
user interface that will comprise your application.
❏ This manual discusses application logic and the structure of an application. It
provides the techniques for developing an application in WebFOCUS Developer Studio
and deploying it to the Web.

1-2 WebFOCUS7
Where Am I?

If you are creating a report request…


❏ Creating Reports With WebFOCUS Language describes how to create, style, and
analyze reports and graphs with the WebFOCUS language.
❏ Creating Reports With Graphical Tools describes how to create, style, and analyze
reports and graphs with the tools provided in WebFOCUS Developer Studio. It also
includes information on Report Caster.
If you are an administrator or developer configuring the data sources for a
WebFOCUS application...
❏ Describing Data With WebFOCUS Language contains information on how to use the
WebFOCUS language to create the metadata for the data sources that your
WebFOCUS applications will access.
❏ Describing Data With Graphical Tools contains information on how to use WebFOCUS
Developer Studio to create the metadata for the data sources that your WebFOCUS
applications will access.
If you are looking for information on a reference topic…
❏ Using Functions describes how to use Information Builders-supplied functions to
perform complex calculations and manipulate data in your procedures.
If you do not find the information you are looking for…
❏ Functions and Subroutines, previously found in Developing Reporting Applications, is a
stand-alone manual titled Using Functions. This manual describes all reporting and
Maintain functions, and explains how they can be used to perform calculations and
manipulate data.
❏ The following topics previously found in Developing Reporting Applications are now
located in Unique FOCUS Topics:
❏ Working With Cross-Century Dates
❏ Establishing String Substitutions
❏ Designing User Interfaces For Windows Reporting Applications
Unique FOCUS Topics contains topics previously contained in Developing Reporting
Applications and other Information Builders manuals that are not part of the current
Web methodologies of WebFOCUS, but are still supported for those who wish to use
them. You can find Unique FOCUS Topics on the WebFOCUS Documentation CD.
Additional Documentation
In addition to the documentation listed in this topic, documentation is available for
WebFOCUS installation and configuration as well as other WebFOCUS products. This
documentation is available at http://documentation.informationbuilders.com.

Developing Reporting Applications With Graphical Tools 1-3


WebFOCUS Core Documentation Roadmap

1-4 WebFOCUS7
WebFOCUS7

2 Understanding User Interface Basics

A user interface for a Web application is Topics:


a collection of HTML files that display
❏ User Interface Basics
pages in a browser. You can design a
user interface in a variety of ways: ❏ About a Logon Page
❏ Use Developer Studio’s HTML Layout ❏ About a Launch Page
Painter to create HTML forms and
❏ About an HTML Display Page
procedures in one integrated
process. For details, see Chapter 5,
Designing a User Interface for a Web
Application With the HTML Layout
Painter.

❏ Use Microsoft® FrontPage® 2000, a


graphical development tool
integrated with WebFOCUS. For
details, see Designing a User
Interface With FrontPage in the
Developing Reporting Applications
manual.
Regardless of the design method you
choose, read the following topics: User
Interface Basics on page 2-2, About a
Logon Page on page 2-2, About a Launch
Page on page 2-7, and About an HTML
Display Page on page 2-11.
In addition to the above techniques for
creating an interface, you can code a
user interface or modify a supplied
template. For details, see Coding a User
Interface in the Developing Reporting
Applications manual and Chapter 7,
Enhancing a User Interface.
User Interface Basics

User Interface Basics


A user interface is the means by which you enable communication between a user and
your application.
A WebFOCUS user interface allows a user to supply information, choose options, and run
reports. A simple one typically consists of:
❏ A logon page, which prompts for security credentials to ensure that a user is
authorized to access an application. A logon page is recommended but not required.
❏ A launch page, which enables a user to run one or more reports.
❏ An HTML display page, on which a report appears.
❏ A main (home) page, an application’s entry point, providing access to all application
features. There are many different kinds of main pages, each depending on the
purpose and complexity of the application. See Creating a Main Page in the Developing
Reporting Applications manual for a basic example.
User interface design is one of the most creative phases of application development.
Developer Studio provides many tools that support it.

About a Logon Page


In this section:
Setting a Browser
How to:
Modify WFSIGNON.HTML
Set Microsoft Internet Explorer to Accept All Cookies
Example:
Specifying an Absolute Address
Specifying a Relative Address

One way to ensure connection to a secure WebFOCUS Reporting Server is to include a


logon page. The sample logon page WFSIGNON.HTML is supplied with WebFOCUS
software in the following default location:
Windows: install_drive:\ibi\WebFOCUS71\ibi_html
UNIX: /ibi/WebFOCUS71/ibi_html
OS/390: /ibi/WebFOCUS71/ibi_html

2-2 WebFOCUS7
Understanding User Interface Basics

You can copy the file and modify the code for your application, or create a custom page of
your own.
The sample logon page prompts the user for an ID and password. The values are assigned
to the variables IBIC_user and IBIC_pass and sent to the Reporting Server for
authentication. If authentication is successful, the values are encrypted and stored in a
cookie. Using a cookie, you set security credentials once. Subsequent requests to the
Reporting Server automatically include the proper authorization.
For details on security, see the WebFOCUS Security and Administration manual.
You can use values collected on a logon page to customize components of an interface for
an individual user. For an example, see Chapter 7, Enhancing a User Interface.
The following is the supplied logon page displayed in a browser.

Developing Reporting Applications With Graphical Tools 2-3


About a Logon Page

Procedure: How to Modify WFSIGNON.HTML


1. Modify WFSIGNON.HTML in one of two ways:
❏ Use the Developer Studio text editor (TED). For details on this editor, see Chapter
9, Editing Application Components as Text in Developer Studio.
or
❏ Use the FrontPage HTML source editor. To use this editor, copy the file to your
project directory, rename it with the three-letter extension .HTM, add it to your
project, and open it in FrontPage. To open the file in FrontPage:
In Developer Studio, open the project for which you are coding the logon page.
Open the HTML Forms folder for the project. Right-click the name of the logon
page, and click Open on the pop-up menu.
The logon page opens in FrontPage.
At the bottom left of the FrontPage window, click the HTML tab. The HTML source
editor opens, displaying the HTML code.

2-4 WebFOCUS7
Understanding User Interface Basics

2. Modify the lines with letters on the left, as explained in the notes following the code.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>WebFOCUS signon screen</title>
</head>
<body bgcolor="#FFFFFF" alink="#0000FF">
<font size=4>
a. <form action="/ib_apps/WFServlet" method="POST">
<a href="http://www.informationbuilders.com"><img border="0"
src="ib_logo_home.gif" width="114" height="48"></a>
<p>&nbsp;</p>
<p>
UserID :
<input type=text size=15 maxlength=256 name="IBIC_user" value="">
<pre>
</pre>
PassWord :
<input type=password size=15 maxlength=256 name="IBIC_pass"
value="">
<pre>
</pre>
<input type=submit name="submit" value="Submit"></tr>
<input type=reset name="reset" value="Reset"></tr>
b. <input type=hidden name="IBIWF_action" value="WF_SIGNON"></tr>
</form>
</font>
</body>
</html>
a. Replace the hyperlink to the Web site shown with a hyperlink that applies to your
application. Do the same for the image.
b. After this line
<input type=hidden name="IBIWF_action" value="WF_SIGNON"></tr>
add the code that identifies the first application page that displays after
successful logon. The syntax is
<input type="hidden" name="WF_SIGNON_MESSAGE"
value="address/first_pg.htm">

where:
address is an absolute or relative address. See the examples. Use the address
that applies to WebFOCUS.
first_pg is the name of the page that displays after logon. For example, if your
application includes a main page, it is the name of that page.

Developing Reporting Applications With Graphical Tools 2-5


About a Logon Page

3. Apply formatting to the page as desired, and save it.


4. Use the Deploy Wizard to deploy the logon page with the rest of your application files.
For details, see Chapter 8, Partitioning and Deploying Project Files.

Example: Specifying an Absolute Address


<input type="hidden" name="WF_SIGNON_MESSAGE"
value="http://123.4.5.6/app_frame/home.htm">
<input type="hidden" name="WF_SIGNON_MESSAGE"
value="http://jonesweb/app_frame/home.htm">

Example: Specifying a Relative Address


The following assumes the existence of a Web server alias (ibi_html) for the path in which
HTML files reside:
<input type="hidden" name="WF_SIGNON_MESSAGE"
value="/ibi_html/sales_app/welcome.htm">

Setting a Browser
A secure WebFOCUS application that includes a logon page requires a browser that
accepts cookies. A cookie is the mechanism that WebFOCUS uses to pass information to
and from the Web server. If your browser is not configured to accept all cookies, you may
experience unexpected behavior from WebFOCUS.
All examples in the user interface chapters are run with Microsoft Internet Explorer on
Windows 71. Netscape Navigator is not supported.

Procedure: How to Set Microsoft Internet Explorer to Accept All Cookies


1. Launch Microsoft Internet Explorer.
2. From the Tools menu, select Internet Options.
3. Click the Security tab.
4. Click Custom Level.
5. Under the Cookies option, select Enable for both items.
6. Click OK.

2-6 WebFOCUS7
Understanding User Interface Basics

About a Launch Page


In this section:
Adding a Control to a Form
Types of Launch Pages
Ways to Create a Launch Page
Reference:
WebFOCUS Controls

Suppose that managers on their company intranet periodically need a sales report for one
of four regions. You:
❏ Create the procedure, including a variable for the region so that the report can run
with different values.
❏ Create the launch page, from which a manager runs the report. The page prompts for
the region of interest.
The following image shows a sample launch page was created in FrontPage.

Developing Reporting Applications With Graphical Tools 2-7


About a Launch Page

If a manager selects Midwest and clicks Run, the report appears.

At minimum, a launch page is a simple form that contains a Run and Clear button,
allowing the user to run a report. More often, it is a form, like the one shown, containing
controls that prompt for user input.
Controls include text boxes, check boxes, radio buttons, drop-down menus, push buttons,
and hyperlinks. A launch page usually displays default values or valid values to help the
user provide input. The Reporting Server uses the input to process the procedure and
return the desired output.
When a launch page is complete, deploy it to the Web server using the Deploy Wizard.
Supporting files such as procedures are deployed to the Reporting Server. Once the files
are stored on the appropriate servers, users can access the launch page by typing the
URL in the browser. See Chapter 8, Partitioning and Deploying Project Files.

2-8 WebFOCUS7
Understanding User Interface Basics

Adding a Control to a Form


A control prompts a user for a value required by a procedure. You can add a single control,
or a combination of controls, to a form on a launch page.
You must add a Submit button. Submitting a form calls WebFOCUS and passes the
supplied values to the procedure.

Reference: WebFOCUS Controls


The following table describes types of controls.

Control Enables a user to...

One-Line Text Box Enter a single value for a variable, such as user name or
password on a custom logon page.

Radio Button Choose one value from a group.

Check Box Choose multiple values.

Drop-Down List Choose a value from a drop-down list.


You can add text to describe the values.

Multi-Select Choose multiple values from a drop-down list. Allows a user to


Drop-Down List report on several field values at one time.

Dynamic Multi-Select Choose multiple values from a drop-down list populated by field
Drop-Down List values retrieved live from a data source.

Text Area Enter an ad hoc report request.

User-Customized For information on this control, see Chapter 7, Enhancing a


Menu User Interface.

Submit Button Run a report.


You must include a Submit button on a form. You may
optionally include a button that clears the form of current
values and restores the defaults.

Push Button Trigger an action.

Hyperlink Run a procedure using fixed values.

Developing Reporting Applications With Graphical Tools 2-9


About a Launch Page

Types of Launch Pages


A launch page can be a single page or a frameset. A single page is a one-page display that
is replaced by report output when a user submits a request. A frameset is a multiple-page
display, and any page (frame) can be replaced by report output.
FrontPage provides predefined templates for a single page and frameset, and WebFOCUS
adds others to the available set. They simplify the creation of a launch page by presenting
basic, standard page layouts. Optionally, you can develop your own layout by choosing the
default blank report page or a simple frameset to start, and then enhancing it as desired.

Ways to Create a Launch Page


A launch page calls the WebFOCUS Client to pass the name of a report to run, with any
required values. The WebFOCUS Client may be the CGI (Common Graphical Interface),
ISAPI (the proprietary API for the Microsoft Internet Information Server), or the WebFOCUS
Servlet.
You can create a launch page in the following ways:
❏ Use the HTML Layout Painter. The HTML Layout Painter allows you to create a launch
and display page in an integrated process within Developer Studio. See Chapter 5,
Designing a User Interface for a Web Application With the HTML Layout Painter.
❏ Use FrontPage. They automatically generate the required code for the CGI. See
Designing a User Interface With FrontPage in the Developing Reporting Applications
manual.
❏ Code the call to the WebFOCUS Client yourself. For details, see Coding a User
Interface in the Developing Reporting Applications manual.
❏ Customize templates supplied with your software. They include the required code for
the CGI, but need modification for your application. For details, see Coding a User
Interface in the Developing Reporting Applications manual.

2-10 WebFOCUS7
Understanding User Interface Basics

About an HTML Display Page


Report output from a Reporting Server appears on an HTML page in a browser. You have
many design options for report display. For example, you can display a report on a page by
itself or in a frame on a page, or you can design a custom page with multiple reports.
Your application will probably include different types of reports, which may influence the
display pages you design. Some types include:
❏ Dynamic. Created and formatted at the time a user requests it. Displays the most
current information from live data retrieval. Called by the WebFOCUS Client. Two kinds
of dynamic reports are drill-down and ad hoc.
❏ Drill-Down. Dynamic, multilevel report consisting of a parent (summary) component
and a child (detailed) component. For an example of a drill-down report, see Chapter
7, Enhancing a User Interface.
❏ Ad Hoc. Dynamic report, coded by a user directly on a launch page. For instructions
on enabling ad hoc reporting, see Coding a User Interface in the Developing Reporting
Applications manual.
❏ Static. HTML file created and formatted before a user requests it. Ready for access
without live data retrieval. Called by HTML code (A HREF). For instructions on creating
and calling a static report, see Coding a User Interface in the Developing Reporting
Applications manual.
You can create a report using the Report Painter, Report Assistant, or TED.

Developing Reporting Applications With Graphical Tools 2-11


About an HTML Display Page

2-12 WebFOCUS7
WebFOCUS7

3 Creating a Reporting Application

You can make reports available Topics:


throughout your enterprise by developing
❏ What Is a Reporting Application?
reporting applications. Reports created
in a reporting application can be grouped ❏ Project-based and Remote
together and run using a Web-based Development Environments
form. You can develop basic or complex
❏ Creating a Project
applications locally and then deploy
them to the Web, where they are run as ❏ Organizing a Project
self-service applications. ❏ Adding a Master File to a Project
You can maintain a reporting application
❏ Viewing and Modifying Project
by updating or adding Master Files, Properties
reporting procedures, HTML files, or
other components. ❏ Managing a Project With Source
Control
This section describes how to create a
self-service reporting application in the ❏ Securing a Project
local development environment. For ❏ Removing a Project
information on creating a Managed
Reporting application, see your Managed
Reporting documentation.
What Is a Reporting Application?

What Is a Repor ting Application?


A reporting application is a self-contained program with an interface that helps the user
accomplish reporting tasks. It typically consists of one or more Master Files, procedures,
and HTML files. The Master Files interpret the data sources that are accessed, while
procedures define how that data is retrieved and displayed. HTML forms enable a user to
interact with the application and manage the display of data in a browser.
For example, to run a self-service reporting application, a user opens a launch page in a
browser and enters the values for the desired output through controls such as drop-down
lists or radio buttons. For instance, the user may request a sales report for the Northeast
region rather than the Southeast region. When the report is run, Developer Studio passes
the user-supplied values to the WebFOCUS Reporting Server (via the Web server), where
the procedure is processed.
The procedure requests data from the data source, using the Master File to understand
how the data is organized. The Reporting Server compiles the answer set from the data
source and returns the output to an HTML page that is displayed in the user’s browser.

Project-based and Remote Development Environments


Developer Studio provides a local (stand-alone) development environment and a remote
development environment. From the Explorer’s Projects folder, you can develop projects
locally on your machine or against a remote WebFOCUS environment. From the Explorer’s
WebFOCUS Environments folder, you develop directly against environments that are
configured remotely.
In Developer Studio, you start building a reporting application as a project consisting of
different kinds of files. You can create the project as a stand-alone application in the
development environment or as a Web-based self-service application that you can deploy.
If you install a WebFOCUS Reporting Server during the Developer Studio installation
procedure, you can:
❏ Locally develop and deploy self-service applications from the Projects area.
Stand-alone Project-based development and deployment requires installation of a
WebFOCUS Reporting Server on the same machine as Developer Studio. A WebFOCUS
Client is also required for Project-based development. The files that you create for a
local project reside in a subdirectory under APPROOT (defined in the configuration files
edaserve.cfg and cgivars.wfs). The Application Root directories (APPROOT directories)
attribute must point to the same directory for Project-based development since files
will be created with the WebFOCUS Client, which resides on the Web server.
❏ Connect to one or more remote servers and modify existing self-service applications
on those servers. For example, you can add a reporting procedure to an existing
application.

3-2 WebFOCUS7
Creating a Reporting Application

❏ Configure access to one or more WebFOCUS environments so that you can manage
resources on the WebFOCUS Client and Reporting Server, and in the Managed
Reporting Repository (if installed). From the environment tree you can create and edit
procedures, metadata, HTML files, and more.
If you do not install a WebFOCUS Reporting Server during the Developer Studio installation
procedure, your environment allows the last two capabilities.
For details, see the Developer Studio Application Development Getting Started manual.

Creating a Project
How to:
Create a Project Directory
Reference:
File Types

In Developer Studio, you start building a reporting application as a project consisting of


different kinds of files. The project can be a stand-alone application in the development
environment or a Web-based application implemented through the deployment feature.
Before you begin local development, you must create a project directory that contains the
associated files using the Project Wizard. The Project Wizard enables you to name the
project, designate a directory for it, and optionally add other directory paths to data
sources from which the project can retrieve information, or paths to other resources.
When you have completed the Project Wizard, the new project is added as a node in the
Explorer under Projects on localhost. By default in the Developer Studio Edition, a project
node is created with folders labeled HTML Files, Maintain Files, Master Files, Procedures
and Other. (Maintain is not available in the Power Reporter.) These folders are called
virtual folders because they apply a logical structure to a project but do not actually exist
as physical directories.
Tip: You can organize a project in many ways. For details, see Organizing a Project on
page 3-9.
To create a self-service reporting application, you typically add files to each of these
folders with the exception of the Maintain Files folder, which is optional. To add data
maintenance functions, use the Maintain Files folder to launch the Maintain development
environment. For more information, see the Maintain Getting Started manual.
A sample project named SESSION is available as a storage space for your use.
Tip: You can drag and drop any component of a project (for example, an HTML file, Master
File, or Procedure) between projects or Explorer environments.

Developing Reporting Applications With Graphical Tools 3-3


Creating a Project

Reference: File Types


The major project components are organized in folders:
❏ HTML Files folder. Stores HTML files (.htm). This file type represents a Web form
(launch page) and manages the display of reports in a browser. For more information
on launch pages, see Chapter 2, Understanding User Interface Basics. You can add
other HTML resources to this folder, including .html, .js, .class, and image files, and
view them from the folder.
❏ Master Files folder. Stores Master Files (.mas) and associated Access Files (.acx).
These file types describe the data you report against. For more information on Master
Files and Access Files, see the Describing Data With Graphical Tools manual and the
Describing Data With WebFOCUS Language manual.
❏ Procedures folder. Stores procedure files (.fex). This file type is the core element of
a project. It specifies the data to be retrieved from a data source and the format in
which the data is presented. For more information, see Chapter 4, Creating a
Reporting Procedure.
❏ Other folder. Stores any visible file type that is not assigned to an existing virtual
folder. For example, if SQL files are available in the application and are not assigned
to a different virtual folder through the Filters option, then SQL files are listed in the
Other folder. File types visible in the Other folder can be reassigned so they appear in
a different virtual folder. For more information about reassigning file types, see
Organizing a Project on page 3-9.
Note: The Other folder cannot be renamed or deleted.
A project can use all of the following types of files.

File Type Description

Procedure Includes files that contain the executable functions of a project,


such as procedures (.fex).

File description Includes Master Files (.mas) and Access Files (.acx).

Data source Includes files that contain data values.

HTML resource Includes files displayed to the end user through a Web browser,
such as Web pages and HTML files (.htm, .html), graphic images
(.gif, .jpg), and Java executable objects (.class).

Temporary data file Includes temporary hold files (.ftm) that Developer Studio
creates during processing, and a number of temporary work files
used internally.

3-4 WebFOCUS7
Creating a Reporting Application

Procedure: How to Create a Project Directory


1. Do one of the following:
❏ Right-click the Projects on localhost node and choose New Project.
or

❏ Highlight the Projects on localhost node and click (New) on the Main toolbar.

The Create a Project - Step 1 of 2 dialog box opens.

2. In the first input field, type a name for the new project. The name can be up to 18
characters in length. It can include spaces.
Developer Studio creates a new subdirectory on the WebFOCUS Reporting Server
under APPROOT. APPROOT is a variable defined in the edaserve.cfg file. The default
setting for APPROOT is install_drive:\ibi\apps.
For example, if you create a project named Sales, Developer Studio creates a
subdirectory named Sales under APPROOT. The newly created subdirectory will contain
all project files, including the .GFA file. The .GFA file is an XML control file that
contains Information about the project, such as associated deployment scenarios,
folder names and file types, and accessible servers.
Important: Do not modify the .GFA file. Modification may corrupt the project.
Subdirectory names do not support spaces. If you include a space in the project name
(for example, Human Resources), Developer Studio replaces the space with an
underscore in the subdirectory name (for example, Human_Resources).

Developing Reporting Applications With Graphical Tools 3-5


Creating a Project

3. The Project Wizard displays the project name as the default directory in the second
input field.
In the second input field, you can optionally enter the name of a subdirectory
associated with another project. In that case, the new project and the existing project
will share project files.
4. Note: Project directories are created in lowercase. Before you entered information on
the dialog box, the default location and name of the new project was shown as IBFS:/
localhost/DEV. This value represents the location of the project in the Information
Builders File System (IBFS), where localhost is the name of the server on which the
project will be created, and DEV is an internal string indicating that you are working in
the project (development) area. The value of the IBFS location translates to the value
of APPROOT.
Once you enter information on the dialog box, the location and name changes to a
value like IBFS:/localhost/DEV/sales/Sales.GFA, where Sales is the project directory,
and Sales.GFA is the project control file created by the Project Wizard.
The following image shows a completed dialog box.

5. Click Next to continue.

3-6 WebFOCUS7
Creating a Reporting Application

6. A message is displayed if the directory does not exist. Click Yes to create the new
directory. Click No to change the name.
The Create a Project - Step 2 of 2 dialog box opens.

7. From this dialog box, you can add other directories to the project path. Project files in
those directories are visible to the project and can be made accessible for
development and deployment. The order of directories in the list box represents the
search sequence that the project uses.
To add directories to the project, click Add. From the Browse for Folder dialog box,
select a folder to add to the project path. The dialog box displays the folders available
on the WebFOCUS Reporting Server, based on the value of APPROOT.

Developing Reporting Applications With Graphical Tools 3-7


Creating a Project

By default, baseapp is automatically added to the search path for project resources.
You can use the baseapp folder to place common (shared) files in a central location.

Click OK. The directory (folder) is added. To add more directories, repeat this step.
If you highlight a directory in the list box on the Create a Project dialog box, click Add,
and select a directory in the Browse for Folder dialog box, the new directory will be
added after the highlighted directory.
❏ To change the order of the directories, select the directory and click Move Up or
Move Down.
❏ To remove a directory from the list, select the directory and click Remove.
When you are satisfied with the order of the directories and have no other changes,
click Finish, and the new project is added to the Explorer.
Tip: You can change directory paths for a project after you exit the Project Wizard. See
Viewing and Modifying Project Properties on page 3-17.

3-8 WebFOCUS7
Creating a Reporting Application

Note: If you create a project with the same name as another project, the location of the
GFA file directory is shown next to it in the Explorer window.

Organizing a Project
How to:
Add a Virtual Folder to a Project and Customize File Types
Customize Directories for Virtual Folders
Rename a Component
Remove a Component

Developer Studio has many features that help you organize a project:
❏ You can add a virtual folder to an existing project, or a virtual subfolder to an existing
folder, and customize the file types that display in it.
❏ You can customize the file types that display in any folder using the Project Properties
dialog box. For details, see How to Customize Display of File Types on page 3-20.
❏ You can rename a component to identify its function in the project, or remove a
component that is no longer used. You can rename and remove components such as
folders, subfolders, HTML files, Master Files, and procedures.

Developing Reporting Applications With Graphical Tools 3-9


Organizing a Project

Procedure: How to Add a Virtual Folder to a Project and Customize File Types
1. Select and right-click the project. Select New from the shortcut menu, and click Virtual
Folder.
The New Virtual Folder dialog box opens.

2. In the Name field, enter a name for the new virtual folder.
Customize the list of file types that will be displayed in the folder. File types (filters)
already defined in the project are shown in the list box. Click the check box next to a
file type in this list to add it to the new folder.

3-10 WebFOCUS7
Creating a Reporting Application

To add a file type not shown in the list, click the Add new file type filter(s) button.
The New Filter dialog box opens, listing the file types registered with the operating
system.

3. Scroll through the list and select one or more file types. Click OK when you are done.
The selected file type is added to the list.

To remove a file type from the list, select it and click the Remove file type filter(s)
button. Confirm the deletion as prompted.
Click OK on the New Virtual Folder dialog box to close it and return to the Explorer.
This sample window shows a new folder named Text Files, which includes .log files
used by the project named Sales.

Developing Reporting Applications With Graphical Tools 3-11


Organizing a Project

Tip: You can also customize file types and directories from a drop-down list. To access the

drop-down list, click the down arrow next to the Filters button on the Explorer
toolbar.

3-12 WebFOCUS7
Creating a Reporting Application

Procedure: How to Customize Directories for Virtual Folders


1. Highlight the Procedures folder in a project that has virtual folders and click the Filters
button on the Explorer toolbar.
The Edit Filters dialog box opens.

2. The Location list box shows the directory paths associated with the project. By
default, the boxes next to directory paths are checked. Click the box to deselect it if
you want to remove a directory from the search path.

Developing Reporting Applications With Graphical Tools 3-13


Organizing a Project

3. Click OK to apply the changes and close the Edit Filters dialog box.
Tip: You can also customize file types and directories from a drop-down list. To access the

drop-down list, click the down arrow next to the Filters button on the Explorer
toolbar.

Procedure: How to Rename a Component


1. Select and right-click the component. Select Rename from the shortcut menu.
2. Type the new name at the cursor location.

Procedure: How to Remove a Component


1. Select and right-click the component. Select Delete from the shortcut menu. If you are
deleting a virtual folder, select Delete Virtual Folder.
2. Click Yes to confirm the permanent deletion.

3-14 WebFOCUS7
Creating a Reporting Application

Adding a Master File to a Project


How to:
Add a Master File to a Project
Remove a Master File From a Project
Permanently Delete a Master File

Before you create a procedure that reports against a data source, your project must
understand how the data is organized. To obtain this information, a project reads a data
source description. Developer Studio refers to these descriptions as Master Files and
Access Files:
❏ A Master File describes the structure of the data.
❏ An Access File supplements the Master File for some data sources. An Access File
includes additional information that completes the description of a data source, for
example, the full data source name and location. If your data source is local and is
either FOCUS or text format, an Access File is not necessary.
There are three ways to provide metadata to a project:
❏ Add visible files to a project. When you designate one or more project paths in the
Project Wizard, all of the Master Files in those paths are visible to your current project
and can be made accessible for development and deployment.
When you add a visible Master File to a project, Developer Studio creates an active
link to the file; it does not copy the Master File to the project directory. See How to
Add a Master File to a Project on page 3-16 for details.
❏ Create synonyms. Using the Server Console or the Create Synonym Wizard, you can
create synonyms for remote data sources configured with the WebFOCUS Reporting
Server or for tables that reside on a subserver. For more information, see the
Describing Data With Graphical Tools manual.
❏ Create a Master File from scratch. Intended primarily for use by a database
administrator, the Master File Editor can be used to create a data source description
from scratch. An application developer can use this tool to view the structure of a data
source to make minor, authorized modifications to the Master File. For more
information, see the Describing Data With Graphical Tools manual.
Included in Developer Studio are several sample Master Files (.MAS) and corresponding
data sources (.FOC). Optionally use these sample files to practice creating projects.

Developing Reporting Applications With Graphical Tools 3-15


Adding a Master File to a Project

Procedure: How to Add a Master File to a Project


1. Open the Master Files folder in a project.

2. Click the Displays all files in the project path button on the Explorer toolbar.
The right window pane displays a list of all Master Files in the paths defined for the
selected project. Master Files that are not added to the project have a light gray icon
next to them and the file type description is Master File Visible within Project Path.
3. Right-click a Master File from the available Master Files list in the right window pane
and select Add to Project.
or

Select a Master File and click the Inserts the selected items into the project button
on the Explorer toolbar.
The Master File icon changes color to signify that it has been added to the list of
Master Files in your project and the file type description changes to Master File.
Tip: You can add two or more Master Files at one time. Hold down the Ctrl key to select
multiple Master Files.

Procedure: How to Remove a Master File From a Project


1. Open the Master Files folder in a project.

2. Click the Displays all files in the project path button on the Explorer toolbar.
The right window pane displays a list of all Master Files in the paths defined for the
selected project. Master Files that are added to the project path have a color icon next
to them and the file type description is Master File.
3. In the right window pane, right-click a Master File and choose Remove from Project.
or

Select a Master File and click the Removes the selected items from the project
button on the Explorer toolbar.
Click Yes to confirm removal of the Master File.
Tip: You can remove two or more Master Files at one time. Hold down the Ctrl key to
select multiple Master Files.

3-16 WebFOCUS7
Creating a Reporting Application

Procedure: How to Permanently Delete a Master File

1. Select a Master File and click the Delete button on the Explorer toolbar.
2. Click Yes to confirm permanent deletion of the Master File.

Viewing and Modifying Project Proper ties


How to:
View Project Properties
Apply Read-only Security
Run a Project on a Remote Server
Modify Directory Paths
Customize Display of File Types
Add a Comment
Select a Deployment Scenario
Reference:
Project Properties Dialog Box
New Filter Dialog Box

You can view and modify project properties to:


❏ Apply read-only security. When selected, this property prohibits modification to or
deletion of a project. A project with read-only security displays a lock next to it in the
Explorer.
❏ Run a project on a remote server. You can run a project on a server other than the
localhost.
❏ Modify directory paths. The Related Directories list contains directories in the
project path. A project searches the directory paths in the order they appear on the
list. You can add or remove a path, or change the search order.
❏ Customize the display of items (file types) in a folder. You can modify the file
types that display in a folder in the Explorer.
❏ Add a comment. You can add a descriptive comment about a project.

Developing Reporting Applications With Graphical Tools 3-17


Viewing and Modifying Project Properties

❏ Select a deployment scenario. A deployment scenario defines the partitioning of


the files and the selection of servers. For example, you might have two deployment
scenarios for a project, one that maps the files to a production server and one that
maps the files to a test server. You can associate a specific deployment scenario with
a project.
❏ Select a starting object. You can flag an object to run first when a project is
started.
You can also view project properties such as file type, location, size, and date of last
modification.

Procedure: How to View Project Properties


1. Right-click a project and choose Properties.
2. The Project Properties dialog box opens, displaying the General, Paths, Edit Filters,
Comment, and Deployment tabs.
3. The General tab is selected by default. It displays the project type, location, size, and
date of last modification.
You can modify certain project properties using this dialog box.

Procedure: How to Apply Read-only Security


1. Right-click a project and choose Properties.
The Project Properties dialog box opens.
2. On the General tab, click the Read-only check box.
3. Complete the dialog box as described in this topic. Click OK to apply changes and
close the dialog box, or click Apply to temporarily apply changes and keep the dialog
box open. Click Close to apply the temporary changes.

Procedure: How to Run a Project on a Remote Server


1. Right-click a project and choose Properties.
The Project Properties dialog box opens.
2. On the General tab, click the Run Remote check box.
3. Complete the dialog box as described in this topic. Click OK to apply changes and
close the dialog box, or click Apply to temporarily apply changes and keep the dialog
box open. Click Close to apply the temporary changes.

3-18 WebFOCUS7
Creating a Reporting Application

Procedure: How to Modify Directory Paths


1. Right-click a project and select Properties.
The Project Properties dialog box opens.
2. Click the Paths tab.

Make the following modifications to the directory paths:

❏ To add a new directory path, click the Add new directory button. Select from
the available folders and click OK. The new directory is added to the Related
Directories list.

❏ To remove a directory path, highlight it and click the Remove directory button.
Click Yes to confirm the deletion.

❏ To reposition a directory path, highlight it and click the Move Directory Up or


Move Directory Down button. These buttons are inactive for a single directory.

Developing Reporting Applications With Graphical Tools 3-19


Viewing and Modifying Project Properties

3. Complete the dialog box as described in this topic. Click OK to apply changes and
close the dialog box, or click Apply to temporarily apply changes and keep the dialog
box open. Click Close to apply the temporary changes.

Procedure: How to Customize Display of File Types


1. Right-click a project and choose Properties.
The Project Properties dialog box opens.
2. Click the Edit Filters tab.

3-20 WebFOCUS7
Creating a Reporting Application

The Filters list box shows the file types associated with the project. You can make the
following modifications to the list:

❏ To add an item, click the Add new file type filters button. The New Filter dialog
box opens, listing the file types registered with the operating system.

Select a registered file type and click OK.

❏ To remove an item, highlight it and click the Remove file type filters button.
Click Yes to confirm the deletion.
3. Click OK when you are done.

Developing Reporting Applications With Graphical Tools 3-21


Viewing and Modifying Project Properties

Procedure: How to Add a Comment


1. Right-click a project and select Properties.
The Project Properties dialog box opens.
2. Click the Comment tab.

3. Place the cursor in the Comment field, and type your comment.
4. Complete the dialog box as described in this topic. Click OK to apply changes and
close the dialog box, or click Apply to temporarily apply changes and keep the dialog
box open. Click Close to apply the temporary changes.

3-22 WebFOCUS7
Creating a Reporting Application

Procedure: How to Select a Deployment Scenario


1. Right-click a project and select Properties.
The Project Properties dialog box opens displaying the General tab.
2. Select the Deployment tab.
The Deployment tab is displayed as shown in the following image.

3. On the Deployment tab, click the Active Scenario drop-down list, and select a scenario.
The list contains all the scenarios created using the New Scenario option of the
Deploy feature, and the default scenario (Local Deploy).
If you select a scenario other than the default scenario (Local Deploy), the Target
Application field is enabled. This displays the application name to be created in the
target deploy environment, or you can enter a new application name that will be used
on the Web server and WebFOCUS Reporting Server deployment paths.
4. Click the Starting Object drop-down list, and make your selection. You can select any
object from the list, but typically the starting object for a deployed application is an
HTML file. The list contains all the valid starting objects created for this project.
5. Click OK to apply changes and close the dialog box, or click Apply to temporarily apply
changes and keep the dialog box open. Click Close to apply the temporary changes.
In the Explorer, the icon for a starting object shows a down arrow, indicating that it will
run first.
Tip: You can also designate a starting object by right-clicking it and choosing Set as
Scenario Starting Object, or by highlighting it and selecting Set as Scenario Starting Object
from the File menu.

Developing Reporting Applications With Graphical Tools 3-23


Viewing and Modifying Project Properties

Reference: Project Properties Dialog Box


General Tab

3-24 WebFOCUS7
Creating a Reporting Application

Type
Is the type of project. Developer Studio supplies this value.
Location
Is the path in which the project and its associated files reside. Developer Studio
supplies this value.
Size
Is the size of the project, in bytes. Developer Studio supplies this value.
Modified
Is the date and time the project was last changed. Developer Studio supplies this
value.
Read-only
Prohibits modification to or deletion of a project.
Run Remote
Runs the project on a remote server.
OK
Confirms changes and returns to the Explorer.
Cancel
Aborts changes and returns to the Explorer.
Apply
Temporarily applies changes and keeps the dialog box open. Click Close to apply them
permanently.

Developing Reporting Applications With Graphical Tools 3-25


Viewing and Modifying Project Properties

Paths Tab

3-26 WebFOCUS7
Creating a Reporting Application

Related Application Paths


Are the directories in the project path. Developer Studio searches the directories in
the order in which they appear on the list. Use the Add new directory, Remove
directory, Move Directory Up, and Move Directory Down buttons to modify directory
paths.
Add New Directory
Adds a directory to the project search path.
Remove Directory
Deletes a directory from the project search path.
Move Directory Up
Moves a directory up in the project search path.
Move Directory Down
Moves a directory down in the project search path.
OK
Confirms changes and returns to the Explorer.
Cancel
Aborts changes and returns to the Explorer.
Apply
Temporarily applies changes and keeps the dialog box open. Click Close to apply them
permanently.

Developing Reporting Applications With Graphical Tools 3-27


Viewing and Modifying Project Properties

Edit Filters Tab

3-28 WebFOCUS7
Creating a Reporting Application

Filters
Are the file types associated with a project. Use the Add new file type filter(s) and
Remove file type filter(s) buttons to modify the Filters list.
Add New File Type Filter(s)
Adds a filter.
Remove File Type Filter(s)
Removes a filter.
OK
Confirms changes and returns to the Explorer.
Cancel
Aborts changes and returns to the Explorer.
Apply
Temporarily applies changes and keeps the dialog box open. Click Close to apply them
permanently.

Developing Reporting Applications With Graphical Tools 3-29


Viewing and Modifying Project Properties

Comment Tab

Comment
Type a descriptive comment for the project in the Comment field.
OK
Confirms changes and returns to the Explorer.
Cancel
Aborts changes and returns to the Explorer.
Apply
Temporarily applies changes and keeps the dialog box open. Click Close to apply them
permanently.

3-30 WebFOCUS7
Creating a Reporting Application

Deployment Tab

Active Scenario
Indicates how to partition the files. Select from the available scenarios in the drop-
down list.

Developing Reporting Applications With Graphical Tools 3-31


Viewing and Modifying Project Properties

Target Application Name


If you select a scenario other than the default scenario (Local Deploy), this field is
enabled. Otherwise, this field is disabled. Optionally enter an application name that
will be used on the Web server and WebFOCUS Reporting Server deployment paths, or
accept the default value (the current project name).
If you are deploying files to your development server, you must provide a target
application name other than your development directory.
If you are deploying files to a WebFOCUS Reporting Server on OS/390 and z/OS, the
target application name can be up to 8 characters. For deployment servers on all
other supported platforms, the name can be up to 18 characters. Spaces are not
allowed. (If a space is entered, it is converted to an underscore.)
Starting Object
Indicates the first component that runs. For a deployed application, the starting object
is typically an HTML file. Select from the available objects in the drop-down list.
Smart Deploy
Choose this option to deploy only the files that have changed since the last time you
deployed the application. This option can significantly increase the speed of
deployment.
Ignore unresolved items
This option ensures that deployment is completed in a case where the project
contains an unresolved file. An unresolved file can be any of the following: a file that
once belonged to the project but was deleted outside of Developer Studio or from
another project in which it was shared; a file located in a directory that changed and
can no longer be found.
Compile Maintain Procedures
Choose this option to compile Maintain procedures during deployment. Compilation
improves application performance. For more information, see the Developing
WebFOCUS Maintain Applications manual.
Compile for verbose Maintain trace (Debug)
This option is reserved for debugging purposes. It can affect performance. For more
information, see the Developing WebFOCUS Maintain Applications manual.
Include Server Paths
Choose this option to allow the deployment process to include server paths in the Call
and Exec statements within Maintain procedures. Do not choose this option when
deploying Maintain applications to platforms that do not support APP PATH
commands (for example, VM).
For details about deployment, see Chapter 8, Partitioning and Deploying Project Files.

3-32 WebFOCUS7
Creating a Reporting Application

Reference: New Filter Dialog Box

Registered File Types


Select a file type from those registered with the operating system, and click OK to add
it to the Filters list on the Edit Filters tab.
OK
Confirms changes and returns to the Project Properties dialog box.
Cancel
Aborts changes and returns to the Project Properties dialog box.

Developing Reporting Applications With Graphical Tools 3-33


Managing a Project With Source Control

Managing a Project With Source Control


In this section:
How It Works
Source Control Options

Developer Studio supports third-party source file management products such as Microsoft
Visual SourceSafe, PVCS Version Manager from Merant, and others that use an industry
standard API. Source file management (called source control in Developer Studio) provides
version control for your individual projects and for your team projects, allowing multiple
users to work on the same files without overwriting each other’s changes. A source control
product manages access to source code and documents all code changes.
Developer Studio provides access to basic source control functions through menu options
in the Explorer. If your site has installed a supported source control product, you can track
the history of project code without leaving your development environment.
Source control is available from the Projects on localhost area in the Explorer. It does not
apply to files in the WebFOCUS Environments area.

How It Works

How to:
Determine If Source Control Is Enabled
Access Source Control Options
Restore Write Access to a Single File
Restore Write Access to a Project
Reference:
Source Control Icons
Guidelines for Using Source Control

When you start Developer Studio, it checks your system to determine if a supported
source control product is installed.
If Developer Studio detects a supported product, it enables optional use of that product
for the management of Developer Studio project files.

3-34 WebFOCUS7
Creating a Reporting Application

Procedure: How to Determine If Source Control Is Enabled


1. In the Developer Studio Explorer, select Options from the Window menu.
2. On the Windows Options dialog box, select the Source Control tab.
3. The source control system or systems detected by Developer Studio during startup are
listed.
4. If more than one system is listed, check the one you want to use, and click OK.
Otherwise, Developer Studio will use the system that is listed and checked by default.
Click Cancel to close the dialog box.
5. In the Explorer, there are several indications that source control is enabled.

A Source Control button is available on the toolbar.


The option Source Control is available on the menu bar.
In the Projects on localhost area, the description Controlled or Not Controlled displays
for a project or file in the right pane of the Explorer.

Developing Reporting Applications With Graphical Tools 3-35


Managing a Project With Source Control

Procedure: How to Access Source Control Options


You can implement source controI on a project level or file level. Developer Studio writes
information regarding source control in the project’s .GFA file when you select the option
Add to Source Control.
Depending on the way you access a source control option, that option is applied to a
Developer Studio project (GFA), or to a single file or multiple files if selected. A project
refers to an entire folder with all its contents (files).
If an object is selected (for example, a project or file), a source control option is applied to
that object.
Access source control options in one of the following ways:

❏ Click the Source Control button on the toolbar.


❏ Select Source Control from the menu bar.
❏ Select and right-click Projects on localhost, and then select Source Control from the
shortcut menu.
❏ Select and right-click a project in the Projects on localhost area, and then select
Source Control from the shortcut menu.
❏ Select and right-click a virtual folder under a project, and then select Source Control
from the shortcut menu.
❏ Select and right-click a file in a virtual folder, and then select Source Control from the
shortcut menu.

3-36 WebFOCUS7
Creating a Reporting Application

Reference: Source Control Icons


The following table describes how Developer Studio uses the icons to indicate the status
of a file in regard to source control.

Status Description

The file has been added to source control.


- Controlled

The file has been checked out of the source


- Checked Out
control database for editing.

The file has been added to source control. The


- current Developer Studio project is sharing it with
Controlled & Shared another Developer Studio project that has been
added to source control.

The file has been checked out of the source


- control database for editing. The current
Checked Out & Shared Developer Studio project is sharing it with another
Developer Studio project that has been added to
source control.

The file is being shared with another Developer


- Studio project. It has been checked out by the
Exclusive Checked Out & other project.
Shared

The file has not been added to source control, or


- Not has been added and then removed.
Controlled

Developing Reporting Applications With Graphical Tools 3-37


Managing a Project With Source Control

Reference: Guidelines for Using Source Control


❏ When you add a Developer Studio project to Microsoft Visual SourceSafe, that project
is assigned to a corresponding SourceSafe project. If one Developer Studio project
shares files from a second Developer Studio project, you must also add the second
project to SourceSafe. For example, if a Developer Studio project named Sales uses
files from baseapp, you must add the baseapp project to SourceSafe. If you do not,
the shared files cannot be managed by source control.
❏ When you add files to Visual SourceSafe, SourceSafe assigns the attribute read only
(R) to them. When you check out a file, SourceSafe removes the read only attribute to
allow edits to the file.
When you remove files from SourceSafe, SourceSafe retains the read only attribute
originally assigned. You must manually change the attribute to restore write access.
See How to Restore Write Access to a Single File on page 3-38 and How to Restore
Write Access to a Project on page 3-38 for instructions.
❏ To use source control effectively, you must be familiar with the specific source control
product that you have and its database structure. Your source control administrator
can give you information on the setup at your site.

Procedure: How to Restore Write Access to a Single File


1. In the Developer Studio Explorer, select and right-click the file. Select Properties on the
shortcut menu.
2. On the General tab on the File Properties dialog box, click the Read-only check box to
remove the check mark.
Click OK to close the dialog box.
3. In the Developer Studio Explorer, notice that the attribute R (read only) has been
removed from the file.

Procedure: How to Restore Write Access to a Project


1. Select and right-click the project.
2. Select Properties on the shortcut menu.
3. On the General tab in the Project Properties dialog box, click the Read-only check box
to remove the check mark.
Click OK to close the dialog box.
4. In the Developer Studio Explorer, notice that the attribute R (read only) has been
removed from the project.

3-38 WebFOCUS7
Creating a Reporting Application

Source Control Options

In this section:
Get Latest Version
Check Out
Check In
Undo Check Out
Add to Source Control
Remove From Source Control
Show History
Show Differences
Source Control Properties
Share From Source Control
Refresh Status
Source Control
Unbind From Source Control
Open From Source Control

This topic describes the source control options available from Developer Studio.

Get Latest Version


Select this option to view a file without changing it. This option retrieves the latest version
of the selected file and provides you with a read only copy.
If you attempt to make changes, they are not saved.

Check Out
To make changes to a file in source control, you must first check it out of the database.
The Check Out option retrieves the latest version of the selected file and allows you to
edit it. Source control removes the attribute R (read only) from a checked out file.
A file that has been checked out displays the description Checked Out in the Developer
Studio Explorer.

Developing Reporting Applications With Graphical Tools 3-39


Managing a Project With Source Control

Check In
Select this option to return a checked out file to the source control database. Source
control stores any changes made to the file in the database.

Undo Check Out


Select this option to reverse a check out and cancel any changes made to a file in your
working area.

Add to Source Control


Before you can add Developer Studio files to source control, you must have a source
control project in which to place them. Therefore, to implement source control, the first
option that you will usually choose is Add to Source Control.
When you add a Developer Studio project (GFA) to Microsoft Visual SourceSafe,
SourceSafe creates a corresponding project (folder) in which to store the files that get
sourced, using the same name as the Developer Studio project. A project refers to an
entire folder with all its contents (files).
A file added to source control displays the description Controlled in the Developer Studio
Explorer.
In this example, the HTML files have been added to source control.

Remove From Source Control


Select this option to remove a file from the source control database.
A file that has been removed from the database, or one that has not been added to the
database, displays the description Not Controlled in the Developer Studio Explorer.

3-40 WebFOCUS7
Creating a Reporting Application

Show History
Select this option to view information about a file, such as version history, date of creation
or modification, and other details.

Show Differences
Select this option to display the differences between a local copy of a file and the copy
stored in the database.

Source Control Properties


Select this option to view or edit certain file properties. For example, you can view the
checkout status (including the user, date of checkout, and version), comments, and other
file properties.

Share From Source Control


Select this option when you are working in a Developer Studio project and wish to use files
from a different Developer Studio project that has been added to the source control
database.
A file that is shared with another project displays the description Controlled & Shared or
Checked Out & Shared in the Developer Studio Explorer.
A shared file that is checked out by one project displays the description Exclusive Checked
Out & Shared in the other project.

Refresh Status
Select this option to refresh the display of file status in the Developer Studio Explorer.

Source Control
This option opens the source control product.
It is available in one of the following ways:
❏ Click the Source Control button on the toolbar and select Source Control from the drop-
down menu.
❏ Select Source Control on the menu bar and select Source Control from the drop-down
menu.

Developing Reporting Applications With Graphical Tools 3-41


Securing a Project

Unbind From Source Control


Select this option to disassociate a Developer Studio project from source control.
Developer Studio removes the information regarding source control from the project’s .GFA
file (it added the information when you selected Add to Source Control).
This feature is available from the Source Control option on the menu bar or the Source
Control menu when you select and right-click Projects on localhost.

Open From Source Control


Select this option to create a local Developer Studio project (GFA) based on a project in
the source control database. It enables a developer to get a project that has already been
created and added to source control.
It is available from the Source Control option on the menu bar or the Source Control menu
when you select and right-click Projects on localhost.

Securing a Project
Some Master Files or procedures in a project may have security restrictions applied to
them. To see the data or portion of the data in a Master File or procedure you have access
to, you must enable your password.
Enabling your password also allows you to encrypt data to secure information in a
procedure or Master File, or decrypt data for use with the Developer Studio tools. For
information on encryption and decryption, see the Describing Data with Graphical Tools
manual. For additional information on security, see the WebFOCUS Security and
Administration manual.

Procedure: How to Secure a Project


1. Highlight a project and choose Password from the Command menu.
2. Enter the password to secure procedures or Master Files in the current project, and
click OK.

3-42 WebFOCUS7
Creating a Reporting Application

Removing a Project
When necessary, you can remove a project from the Explorer. The .GFA control file is
deleted from the default directory. You also have the option of deleting the associated
project files from the directory.

Procedure: How to Remove a Project


1. Select the project.
2. Choose one of the following methods:
❏ Right-click the project and select Delete from the shortcut menu. You are asked if
you want to delete the .GFA control file and, optionally, the associated files.
Respond to the prompts as desired.
or
❏ Press the Delete key. You are asked if you want to delete the .GFA file and,
optionally, the associated files. Respond to the prompts as desired.

Developing Reporting Applications With Graphical Tools 3-43


Removing a Project

3-44 WebFOCUS7
WebFOCUS7

4 Creating a Reporting Procedure

A procedure is the core element of a Topics:


reporting application and is always
❏ Selecting a Creation Tool
created within the context of an
application. It specifies the data to be ❏ Incorporating a Procedure Into an
retrieved from a data source and the Application
format in which data is presented to the
❏ Copying a Procedure
user. A procedure can consist of a single
component or multiple components, in ❏ Creating a Procedure Component
any meaningful combination. ❏ Working With a Component
The most common procedure with one
❏ Using the SQL Report Wizard
component is a report or graph. A
procedure that includes multiple ❏ Using the Report Wizard
components may contain Joins, virtual ❏ Calling a Procedure From the Current
fields (Defines), environment settings, One
as well as a report or graph. When a
procedure is run, the components are ❏ Engine Tool
executed in the order in which they are ❏ Managing Flow of Control
specified.
❏ Working With a Full Procedure
More complex procedures may contain
calls to other procedures, nested ❏ Running a Procedure
procedures, data extracted to an ❏ Canceling a Running Procedure
intermediate (HOLD) file for additional
reporting, and WebFOCUS code such as
Dialogue Manager commands to handle
flow of control.
Selecting a Creation Tool

Selecting a Creation Tool


How to:
Select a Creation Tool
Create a Report Procedure With the Report Painter or Report Assistant
Create a Reporting Procedure Using the Procedure Window
Create a Procedure With the Text Editor
Reference:
WebFOCUS Logon Dialog Box
Add Procedure Dialog Box

You can create a procedure with one of the following tools:


❏ Procedure Viewer. Provides a graphical environment for the creation of a generic
procedure. This option is the default.
❏ Report Painter. Provides a graphical environment for the creation of a report
procedure.
❏ PDF Layout Painter. Provides a graphical environment for the creation compound
PDF report.
❏ SQL Report Wizard. Assists you with SQL passthru, which allows you to execute SQL
code that retrieves data from an RDBMS. You can use the resulting extract file in the
Report Painter or the Graph Assistant.
❏ Graph Assistant. Allows you to transform almost any type of data into an effective
graph that you can customize.
❏ Text Editor. Provides a standard text editor, allowing you to create a procedure by
entering commands.
❏ Compound Document Tool. Provides a graphical environment, the Compound Report
Constructor, which allows you to combine reports with styled HOLD formats (for
example, PDF, HTML, PS, EXL2K) or regular character-based reports into one file.
Note: You can use the HTML Graph Assistant in Developer Studio only when you are
creating a Reporting Object.

4-2 WebFOCUS7
Creating a Reporting Procedure

Procedure: How to Select a Creation Tool


1. Open a project.
2. Create a new procedure by doing one of the following:
❏ Right-click the Procedures folder, select New, and click Procedure.
or
❏ Highlight the Procedures folder, select New from the File menu, and click
Procedure.
The Add Procedure dialog box opens.

The display box lists all the procedures currently visible in the project path, or all
procedures that have been added to the project path (QTY_ALL.fex in the sample
dialog box). Click the Displays all files in the project path button to toggle between
the two displays.
3. In the File name field, type a name for the new procedure. Do not include any spaces
in the name or add an extension; Developer Studio automatically appends the
extension .fex.
4. In the Files of type drop-down list, accept the default, Procedure Files (*.fex).

Developing Reporting Applications With Graphical Tools 4-3


Selecting a Creation Tool

5. In the Create with drop-down list, select the creation tool:


❏ Procedure Viewer provides a graphical environment for the creation of a generic
procedure. For information, see How to Create a Reporting Procedure Using the
Procedure Window on page 4-7.
❏ Report Painter provides a graphical environment for the creation of a report
procedure. For information, see How to Create a Report Procedure With the Report
Painter or Report Assistant on page 4-5.
❏ PDF Layout Painter enables you to design PDF reports, and to coordinate and
distribute layouts made up of multiple reports and graphs in a single PDF file.
For details, see Chapter 6, Designing an Application With the PDF Layout Painter.
❏ SQL Report Wizard assists you with SQL passthru, which allows you to execute
SQL code that retrieves data from an RDBMS. You can use the resulting extract file
in the Report Painter or the Graph Assistant. For information, see Using the SQL
Report Wizard on page 4-22.
❏ Text Editor provides a standard text editor, allowing you to create a procedure by
entering commands. For information, see How to Create a Procedure With the Text
Editor on page 4-8.
❏ Graph Assistant accesses the Graph Assistant, where you can transform almost
any type of data into an effective graph that you can customize.
For information, see the Creating Reports With Graphical Tools manual.
❏ Compound Document Tool provides a graphical environment, called the Compound
Report Constructor, which allows you to combine reports with styled hold formats
(for example, PDF, HTML, PS, EXL2K) or regular character-based reports into one
file.
For information, see the Creating Reports With Graphical Tools manual.
6. Optionally, click Procedure will run remotely to run the procedure on a remote server.
You can also designate a procedure to run remotely after you have created it. See How
to Run a Procedure on a Remote Server on page 4-61.

4-4 WebFOCUS7
Creating a Reporting Procedure

Reference: WebFOCUS Logon Dialog Box


When you access either the Projects folder or the WebFOCUS Environments folder and you
need to access a secure server, a logon box displays, prompting you for an ID and
password.
There is a check box option for remembering the ID or password. By default, it is not
checked. If you check this box, your credentials will be stored and encrypted in the
wfscom.wfs file, the local configuration file that is used to store information processed by
the Developer Studio communication layer. For details about the wfscom.wfs file, see
Managing the WebFOCUS Environment in the Developing Reporting Applications manual. If
you decide to change the stored credentials later, you can do so from the WebFOCUS
Environments Properties dialog box.

Procedure: How to Create a Report Procedure With the Report Painter or Report
Assistant
1. In the Add Procedure dialog box, enter a name for the new procedure in the File name
field, then select Report Painter or Report Assistant from the Create with drop-down
list, and click Open. For details on the Add Procedure dialog box, see Add Procedure
Dialog Box on page 4-9.
The Open dialog box prompts you for the name of the Master File to use.

Developing Reporting Applications With Graphical Tools 4-5


Selecting a Creation Tool

The display box lists all the Master Files currently visible in the project path, or all the
Master Files that have been added to the project path. Click the Displays all files in the
project path button to toggle between the two displays.

2. Select a Master File from the display box to add it to the File name field.
3. In the Files of type drop-down list, accept the default, Master Files (*.mas).
4. Choose either Open Report Painter or Open Report Assistant, and click Open to start
the selected tool.
You can now build the report procedure. See the Creating Reports With Graphical Tools
manual or the Creating Reports With WebFOCUS Language manual for information.
Note: If you create a Hold file for a report procedure, you can select this file from the
Open dialog box. To select a Hold file, click and hold a component connector from the
Procedure window and select the Report tool. The Open dialog box displays. Select
the Hold file and click Open. Report Painter opens with the Hold file that you selected.

4-6 WebFOCUS7
Creating a Reporting Procedure

Procedure: How to Create a Reporting Procedure Using the Procedure Window


1. In the Add Procedure dialog box, enter a name for the new procedure, then select
Procedure Viewer, and click Open.
The Procedure window opens.

This window contains a default Comment component with two diamond objects on
either side called component connectors. The Comment component does not contain
any executable commands. At this point, you have created a procedure shell. You can
now make this shell executable by adding components, such as a report or graph.
Components are stored in a file with the extension .FEX, including any information on
running the procedure remotely.
2. Click and hold a diamond object and select a component, such as Report or Graph.
For details on how to proceed, see Creating a Procedure Component on page 4-12.

Developing Reporting Applications With Graphical Tools 4-7


Selecting a Creation Tool

Procedure: How to Create a Procedure With the Text Editor


1. In the Add Procedure dialog box, enter a name for the new procedure, select Text
Editor, and click Open. The text editor opens.

2. Enter the syntax for your procedure. See the Creating Reports With WebFOCUS
Language manual for details on WebFOCUS syntax.
3. Click the Save button on the text editor toolbar when you are done. See Chapter 9,
Editing Application Components as Text in Developer Studio for details on the text
editor.

4-8 WebFOCUS7
Creating a Reporting Procedure

Reference: Add Procedure Dialog Box

The Add Procedure dialog box contains the following fields/options:


Look in
Is the name of the project.
Procedure List Box
Lists the procedures associated with the selected project.
File name
Is the name of the procedure.
Files of type
Is the type of file.
Create with
Is the creation tool to be used. The options are:
Procedure Viewer
Report Painter
PDF Layout Painter
SQL Report Wizard
Graph Assistant
Text Editor
Compound Document Tool

Developing Reporting Applications With Graphical Tools 4-9


Incorporating a Procedure Into an Application

Incorporating a Procedure Into an Application


How to:
Add a Procedure to a Project
Remove a Procedure From a Project

When you create a procedure in the current project, it is automatically incorporated into
that project. However, you are not limited to the use of procedures created in the project.
You can make procedures from another project available in the current project.
To incorporate a procedure from another project into the current project, complete the
following steps:
1. Add the procedure’s directory to the project path. When you add a procedure’s
directory to the project path, all project files become available. For details on
modifying available directories for a project, see Modify Directory Paths in Chapter 3,
Creating a Reporting Application.
2. Add a procedure to the project. Once a procedure’s directory is visible to a project,
add the procedure to the project so it will be available for reporting and deployment.
For details, see How to Add a Procedure to a Project on page 4-10.
Note: You can also remove a procedure from a project. For details, see How to Remove a
Procedure From a Project on page 4-11.

Procedure: How to Add a Procedure to a Project


1. Open the Procedures folder in the project.

2. If not already selected, click the Displays all files in the project path button on the
Explorer toolbar.
The right window pane displays all procedures in the paths defined for the selected
project. Procedures that are not added to the project path have a light gray icon next
to them, and the file type description is Focus Executable Visible within Project Path.
3. Do one of the following:
❏ Right-click a procedure from the available procedures on the right, and select Add
to Project from the shortcut menu.
or

❏ Select a procedure and click the Inserts the selected items into the project
button on the Explorer toolbar.

4-10 WebFOCUS7
Creating a Reporting Procedure

The procedure icon changes color to signify that it has been added to the project, and
the file type changes to Focus Executable.

Tip: Clicking the Displays all files in the project path button on the Explorer toolbar
toggles between the files that are visible in the project path and the files that have been
added to the project.

Procedure: How to Remove a Procedure From a Project


1. Open the Procedures folder in the project.

2. If not already selected, click the Displays all files in the project path button on the
Explorer toolbar.
The right window pane displays all procedures in the paths defined for the selected
project. Procedures that have been added to the project path have a color icon next to
them, and the file type description is Focus Executable.
3. Do one of the following:
❏ In the right window pane, right-click a procedure and choose Remove from Project
from the pop-up menu.
or

❏ Select a procedure and click the Delete button on the Explorer toolbar.
4. Click Yes to confirm permanent removal of the procedure.

Copying a Procedure
You can drag and drop any component of a project, including a procedure, between
projects or WebFOCUS environments, or within a single project. When a procedure is
copied within a project, it is identified as Copy of procedure_name. A second copy is
identified as Copy (2) of procedure_name, and so on.

Procedure: How to Copy a Procedure Within a Project


1. Open the Procedures folder for a project.
2. Right-click the procedure to be copied, and select Copy from the pop-up menu.
3. Right-click the Procedures folder, and select Paste from the pop-up menu.

Developing Reporting Applications With Graphical Tools 4-11


Creating a Procedure Component

Creating a Procedure Component


How to:
Create a Component in an Existing Procedure
Reference:
Component Types

After creating a procedure shell, you can create components that make the shell
executable. The Component Connector toolbar contains the available types of
components. The Comment component is created by default and is not included on the
toolbar.
Several of the components on the toolbar are usually placed in a specific order based on
the logical flow of a procedure. These components are Let, Set, Filedef, Use, Join, Define,
and Report or Graph, in that order. The remaining components—Execute, Include, and
Other—enhance the user interface and efficiency, and can be placed anywhere in the
order of execution. However, Dimension must be placed before the Report component.
You can have one or several components in a procedure. The following example includes a
Comment, four instances of a Report, a Use, Define, and Other components. Together
these components make up the procedure named APP6.

4-12 WebFOCUS7
Creating a Reporting Procedure

Reference: Component Types


You can include the following components in a procedure.

Component Description

Report Creates a tabular representation of the data retrieved from a data


source.
A Report is placed after a Join and a Define. For details, see the
Creating Reports With Graphical Tools manual.

SQL Report The SQL Report Wizard assists you with SQL passthru, which allows you
to execute SQL code that retrieves data from an RDBMS. You can use
the resulting extract file in the Report Painter or the Graph Assistant.
For details, see Using the SQL Report Wizard on page 4-22.

Define Creates a temporary (virtual) field that is evaluated before a report is


run.
A Define is placed before a Report. For details, see the Creating Reports
With Graphical Tools manual.

Graph Creates a graphical representation of the data retrieved from a data


source.
A Graph is placed after a Join and a Define. For details, see the Creating
Reports With Graphical Tools manual.

Set Customizes the Developer Studio and WebFOCUS environments,


including the way reports and graphs display, report and graph content,
data retrieval characteristics that affect performance, system responses
to end user requests, metadata setup, and date manipulation.
For details on the Set tool and parameters, see Customizing Your
Environment in the Developing Reporting Applications manual.

Join Defines a relationship between two or more data sources so that a


report can use data from all of them at once.
A Join is placed before a Define, and if there is no Define, it is placed
before a Report. For details, see the Creating Reports With Graphical
Tools manual.

Developing Reporting Applications With Graphical Tools 4-13


Creating a Procedure Component

Component Description

Let Defines a word that represents another string of text. This feature saves
time when you are writing code for local use. However, you must delete
any Let components before you deploy a project to the Web.
For details on the Let tool, see Unique FOCUS Topics on the
Documentation CD.

Use Provides flexibility in using a FOCUS data source. You can specify read-
only access, treat multiple data sources as one, and request the use of
data sources not stored in your current directory (whether elsewhere on
your hard disk or on a network file server).
For details on accessing FOCUS data sources, including techniques for
maintaining Use commands, see Accessing a FOCUS Data Source in the
Developing Reporting Applications manual.

FileDef Assigns a temporary name to a file created and used by WebFOCUS.


To preserve an extract file (created by the HOLD command) on the
server’s disk, you must issue a FILEDEF to a specific location. Also, the
Dialogue Manager -READ and -WRITE commands refer to files by names
that must first be established with a FILEDEF.
For details on the Filedef tool, including techniques for maintaining
Filedefs, see Defining and Allocating WebFOCUS Files in the Developing
Reporting Applications manual.

Execute Enables one procedure to call another. You can select a procedure to be
called by the one you are editing.
An Execute component can be placed anywhere in a procedure.
For details on the Execute component, see Calling a Procedure From the
Current One on page 4-46.

Include Allows you to use a portion of a procedure if you store it separately. A


separate, included procedure is treated as part of the procedure
currently being edited. It enables the reuse of code, making projects
easier to write and maintain. After an included procedure runs, control
returns to the calling procedure.
An Include component can be placed anywhere in a procedure.
For details on the Include component, see Calling a Procedure From the
Current One on page 4-46.

4-14 WebFOCUS7
Creating a Reporting Procedure

Component Description

HtmlForm Creates a text file you can use to add HTML code to the procedure
currently being edited. HTML forms are used to launch applications in
the Web environment.
Note: The Deploy Wizard guides you through the process of creating a
configuration that manages the deployment of your project files,
including HTML forms, to the Web.
For more information on the Deploy Wizard, see the Developer Studio
Application Development Getting Started manual.

Other Enables you to enter commands that connect other components. This
feature is useful for writing code that does not have a graphical tool
(such as Dialogue Manager). However, you can also use Other for any
kind of manual coding—for example, to code a virtual field or a report.
When used this way, the Other component automatically converts to the
corresponding component type.
An Other component can be placed anywhere in a procedure.
For information on the Other component, see the Developer Studio
Application Development Getting Started manual. For details on the
WebFOCUS language, see the Creating Reports With WebFOCUS
Language manual.

Olap Creates an OLAP hierarchy and dimensions based on data for multi-
Dimensions dimensional analysis without changing the Master File. The new logical
view is saved as part of the procedure.
A Dimension component applies to FOCUS data sources and relational
tables. It must be placed before the Report component.
For information on defining dimensions, see the Describing Data With
Graphical Tools manual and the Describing Data With WebFOCUS
Language manual.
Unlike the Dimension Builder (addressed in the Describing Data With
Graphical Tools manual), the Dimension Tool, accessed through the
Dimension component, does not show the graphical representation of a
Master File; rather, it lists the fields. The process of creating a hierarchy
is the same; drag and drop fields from the left pane to the right pane.

Developing Reporting Applications With Graphical Tools 4-15


Creating a Procedure Component

Component Description

SQL Editor The SQL Editor enables you to code SQL Passthru and highlights any
SQL commands within the code. This editor also allows you to choose
your connection engine and connection name from drop-down lists on
the toolbar.
For more information on the SQL Editor, see the Developer Studio
Application Development Getting Started manual.

Match The Match Wizard enables you to merge two or more data sources, and
specify which records to merge and which to sort out. The wizard
creates a new data source, a HOLD file, into which it merges fields from
the selected records. You can report from the new data source and use
it as you would any other HOLD file.
For more information on the Match Wizard, see the Developer Studio
Application Development Getting Started manual.

Engine The Engine tool exposes the FOCUS ENGINE SET commands and
enables you to enter ENGINE commands or connection attributes, and
override parameters.
Note: The Engine tool is only used to create ENGINE statements. You
are responsible for having the knowledge of the ENGINE SET command
or the Connection Attribute needed. For details see the For details, see
Engine Tool on page 4-55.

Dialogue The Dialogue Manager enables you to control the flow of your
Mngr application with the use of variables.
For more information on the Dialogue Manager, see Managing Flow of
Control on page 4-56.

Modify Changes or modifies data. There is no Modify tool but you can use the
Other tool to create a Modify request by typing code, at which point the
Other tool changes to a Modify component.
For details on Modify, see Unique FOCUS Topics on the Documentation
CD.

4-16 WebFOCUS7
Creating a Reporting Procedure

Component Description

Comment Includes a comment for the project. This comment is not necessary and
you can delete it if you wish. A procedure shell, when created, contains
a default Comment component. Once you create an executable
component for a procedure, the file name defaults as a comment in this
component. For example, if you named the shell TEST, the default
Comment component will contain the comment -* File TEST.FEX.
For information on the Comment component, see the Developer Studio
Application Development Getting Started manual.

Procedure: How to Create a Component in an Existing Procedure


1. Right-click a procedure in the Procedures folder and choose Open. The Procedure
window opens.
2. Click and hold a component connector. The Component Connector menu opens as
shown in the following image:

Developing Reporting Applications With Graphical Tools 4-17


Working With a Component

3. Select the tool for the component you wish to create. You can also select a tool from
the static Component Connector toolbar that displays in the Procedure window.
The corresponding tool opens. For details, see Component Types on page 4-13.
4. After you have constructed a component using a tool, exit the tool. You are asked if
you want to update the procedure. Answer yes, and your changes are saved and the
component is added to the procedure as a graphical object of the type created
(Report, Graph, Define, Join, and so on).

Working With a Component


How to:
Run a Component
Edit a Component
Check a Component
Copy a Component From One Procedure to Another

You can perform the following tasks on a component:


❏ Running. You can run some types of components, for example, a report or graph.
This shows you how the output appears from a visual point of view.
❏ Editing. You can edit a component within a graphical tool or with the text editor.
Using the text editor requires that you have some knowledge of the WebFOCUS
language. You must be familiar with the types of commands, how to use them, and
where to place them in a request.
❏ Checking. Checking a component enables you to locate errors. Each component tool
includes a check button that checks the syntax of the code against the server. For
more information, see How to Check a Component on page 4-20.
❏ Copying. You can copy a component from one location to another within the same
procedure, or from one procedure to another.

4-18 WebFOCUS7
Creating a Reporting Procedure

Procedure: How to Run a Component


1. Open a procedure in the Procedures window.
2. From the Procedure window:
❏ Right-click the component and select Run from the shortcut menu.
or
❏ Select the component and then click the Run button on the Main toolbar.
Tip: If you are running a report flagged for remote execution from a reporting tool (Report
Painter, Report Assistant, Graph Assistant), the report will automatically run remotely. To
run a report remotely when it has not been flagged for remote execution, select Run
Remote from the File menu.

Procedure: How to Edit a Component


1. From the Procedure window, choose one of the following methods to open a
component:
❏ Double-click the component.
or
❏ Right-click the component and choose Open.
2. Make your changes to the selected component.
3. Exit the tool by clicking the control menu box. When asked if you want to update the
procedure, click Yes. Your changes are saved.
Tip: You can edit a component with the text editor. Right-click the component and choose
Edit Text. The text editor opens, displaying the component’s syntax. For information about
the text editor, see Chapter 9, Editing Application Components as Text in Developer Studio.

Developing Reporting Applications With Graphical Tools 4-19


Working With a Component

Procedure: How to Check a Component


1. From the Procedure window, choose one of the following component tools:
❏ Define
❏ Set
❏ Let
❏ Use
❏ Filedef
The appropriate tool opens.
2. Add your information to the tool, and click Check.
The Check window opens, displaying the code produced by the tool and any errors that
exist. The source code for your component and any errors that may exist are
displayed. The following is a Check window for the Define tool.

3. Click OK to return to your component tool.

4-20 WebFOCUS7
Creating a Reporting Procedure

Procedure: How to Copy a Component From One Procedure to Another


1. Open both procedures by right-clicking them and choosing Open from the shortcut
menu.
2. Choose Tile from the Window menu to view both Procedure windows simultaneously.
3. In the first Procedure window, click and hold the component you wish to copy.
4. While holding the left mouse button, click the Ctrl key on your keyboard.
5. Drag the mouse pointer to the second Procedure window.
Note: You must click the Ctrl key to copy. Omitting to click Ctrl before dragging moves
the component.
6. Release the mouse button when the mouse pointer is over the second Procedure
window.
The component is copied to the second window.
When you drag and drop a component, its icon changes to show whether its target
location is valid. If it is not valid, the cursor resembles a circle with a slash through
the word Drop. When you have dragged the component to a valid location, the cursor
resembles a small square with a plus sign inside it.
Tip: You can move a component from one procedure to another by holding the left
mouse button, and dragging the mouse pointer to the second Procedure window.
Holding down the Ctrl key copies the component, whereas clicking and dragging
moves the component.

Developing Reporting Applications With Graphical Tools 4-21


Using the SQL Report Wizard

Using the SQL Repor t Wizard


How to:
Execute SQL Commands For a Stored Procedure
Include SQL Commands From an External .sql File
Pass SQL Commands to the RDBMS Using SQL Passthru
Import SQL Commands From an Existing .sql File
Add an .sql Extension as a Valid Filter
Example:
Executing SQL Code for a Stored Procedure With the SQL Report Wizard

The SQL Report Wizard assists you with SQL passthru, which allows you to execute SQL
code that retrieves data from an RDBMS. You can use the resulting extract file in the
Report Painter or the Graph Assistant. The supported engines are DB2, DB2 for AS/400,
Microsoft SQL Server, Oracle, Sybase, and Teradata.
The SQL Report Wizard is available throughout all development areas of Developer Studio:
Projects, Data Servers, and Managed Reporting. When working in Managed Reporting, the
tool enables administrators to use SQL in Standard Reports available in the Domain or
use procedures that reside on the WebFOCUS Reporting Server.

Procedure: How to Execute SQL Commands For a Stored Procedure


1. Access the SQL Report Wizard by doing one of the following:
❏ In the Explorer, right-click the Procedures folder and select New, Procedure. In the
Add Procedure dialog box enter a file name and then select SQL Report Wizard
from the Create with drop-down list. Click Open.
❏ In the Procedure Viewer, click the component connector and then click SQL Report
on the drop-down list.
You can also click the SQL Report icon on the Procedure Viewer toolbar.

4-22 WebFOCUS7
Creating a Reporting Procedure

The SQL Report Wizard - Welcome window opens.

2. Click the option button next to Executed from a stored procedure call within an SQL
database. This enables you to type in a stored procedure name in a specified
database. This is useful if you do not know SQL, but know the stored procedure that
creates the data.

Developing Reporting Applications With Graphical Tools 4-23


Using the SQL Report Wizard

3. Click Next to see the SQL Report Wizard - Data access information window.

4. In the Select the SQL database engine area, select a database engine from the drop-
down list. The list consists of available engines in the edasprof.prf file. You can
choose the first value, Default, which is the first value set in the edasprof.prf file.
5. In the Select the connection area, choose a connection from the drop-down list
generated from the engine that you selected. You can choose the default value, which
is the first connection in the edasprof.prf file for the selected engine, or choose
another connection defined in edasprof.prf.
6. Click Next to see the SQL Report Wizard - Call SQL Stored Procedure window.

Note: When typing procedure names and parameters, note that SQL is case-sensitive.

4-24 WebFOCUS7
Creating a Reporting Procedure

7. In the Remote procedure name field, type the name of the remote procedure you want
to execute.
8. In the Parameters (comma delimited) field, type the parameter names and values you
wish to execute along with the procedure.
9. Optionally, you can run with limited records by clicking Run SQL. By default, the Run
with limited records check box is selected so you can test your procedure with a
readlimit if the engine supports it. There is a field box next to the check box in which
you can enter the number of records to be read. 100 is the default limit.
10. Click Next to see the SQL Report Wizard - Summary of SQL options window.
Do one of the following:
❏ To create a report, select the Create Report option button. This option is selected
by default.
❏ To create a graph, select the Create Graph option button.
11. Click Finish to create the SQLOUT file. The Report Painter or Graph Assistant opens.
When you have completed the procedure, you can run it from the Procedures folder in
the Explorer view.

Procedure: How to Include SQL Commands From an External .sql File


1. Access the SQL Report Wizard by doing one of the following:
❏ In the Explorer, right-click the Procedures folder and select New, Procedure. In the
Add Procedure dialog box enter a file name and then select SQL Report Wizard
from the Create with drop-down list. Click Open.
❏ In the Procedure Viewer, click the component connector and then click SQL Report
on the drop-down list.
You can also click the SQL Report icon on the Procedure Viewer toolbar.
The SQL Report Wizard - Welcome window opens.
2. Click the option button next to Include SQL commands from an external .sql file. This
enables you to browse and select external procedures that exist on the APP PATH of
the project. This enables sites to leverage pre-existing SQL procedures. It is not
possible to execute procedures from Managed Reporting.
Note: You can only browse the files on the APP PATH if your .sql extension is a valid
filter in the Properties dialog box. To do this, see How to Add an .sql Extension as a
Valid Filter.
3. Click Next to see the SQL Report Wizard - Data access information window.

Developing Reporting Applications With Graphical Tools 4-25


Using the SQL Report Wizard

4. In the Select the SQL database engine area, select a database engine from the drop-
down list. The list consists of available engines in the edasprof.prf file. You can
choose the first value, Default, which is the first value set in the edasprof.prf file.
5. In the Select the connection area, choose a connection from the drop-down list
generated from the engine that you selected. You can choose the default value, which
is the first connection in the edasprof.prf file for the selected engine, or choose
another connection defined in edasprof.prf.
6. Click Next to see the SQL Report Wizard - Include external SQL file window.

7. Enter the external SQL file name in the field, or click Browse to select it.
Note: You can only browse the files on the APP PATH if your .sql extension is a valid
filter in the Properties dialog box. To do this, see How to Add an .sql Extension as a
Valid Filter.
8. Optionally, you can run with limited records by clicking Run SQL. By default, the Run
with limited records check box is selected so you can test your procedure with a
readlimit if the engine supports it. There is a field box next to the check box in which
you can enter the number of records to be read. 100 is the default limit.
9. Click Next to see the SQL Report Wizard - Summary of SQL options window.
Do one of the following:
❏ To create a report, select the Create Report option button. This option is selected
by default.
❏ To create a graph, select the Create Graph option button.

4-26 WebFOCUS7
Creating a Reporting Procedure

10. Click Finish to run the SQL procedure. The Report Painter or Graph Assistant opens.
When you have completed the procedure, you can run it from the Procedures folder in
the Explorer view.

Procedure: How to Pass SQL Commands to the RDBMS Using SQL Passthru
1. Access the SQL Report Wizard by doing one of the following:
❏ In the Explorer, right-click the Procedures folder and select New, Procedure. In the
Add Procedure dialog box enter a file name and then select SQL Report Wizard
from the Create with drop-down list. Click Open.
❏ In the Procedure Viewer, click the component connector and then click SQL Report
on the drop-down list.
You can also click the SQL Report icon on the Procedure Viewer toolbar.
The SQL Report Wizard - Welcome window opens.
2. Click the option button next to Type SQL statements in the report request. This
enables you to enter SQL commands that will be passed on to the RDBMS with the
SQL Passthru feature.
3. Click Next to see the SQL Report Wizard - Data access information window.
4. In the Select the SQL database engine area, select a database engine from the drop-
down list. The list consists of available engines in the edasprof.prf file. You can
choose the first value, Default, which is the first value set in the edasprof.prf file.
5. In the Select the connection area, choose a connection from the drop-down list
generated from the engine that you selected. You can choose the default value, which
is the first connection in the edasprof.prf file for the selected engine, or choose
another connection defined in edasprof.prf.

Developing Reporting Applications With Graphical Tools 4-27


Using the SQL Report Wizard

6. Click Next to see the SQL Report Wizard - Enter SQL statements window.

7. In the field box, type the SQL statements you want to pass to the RDBMS.
8. Optionally, you can run with limited records by clicking Run SQL. By default, the Run
with limited records check box is selected so you can test your procedure with a read
limit if the engine supports it. There is a field box next to the check box in which you
can enter the number of records to be read. 100 is the default limit.
9. Click Run SQL to run your report.
10. Click Next to see the SQL Report Wizard - Summary of SQL options window.
Do one of the following:
❏ To create a report, select the Create Report option button. This option is selected
by default.
❏ To create a graph, select the Create Graph option button.
11. Click Finish to run the SQL procedure.The Report Painter or Graph Assistant opens.
When you have completed the procedure, you can run it from the Procedures folder in
the Explorer view.

4-28 WebFOCUS7
Creating a Reporting Procedure

Procedure: How to Import SQL Commands From an Existing .sql File


1. Access the SQL Report Wizard by doing one of the following:
❏ In the Explorer, right-click the Procedures folder and select New, Procedure. In the
Add Procedure dialog box enter a file name and then select SQL Report Wizard
from the Create with drop-down list. Click Open.
❏ In the Procedure Viewer, click the component connector and then click SQL Report
on the drop-down list.
You can also click the SQL Report icon on the Procedure Viewer toolbar.
The SQL Report Wizard - Welcome window opens.
2. Click the option button next to Import from an existing .sql file. This enables you to
modify SQL code after importing it from an external file to the procedure being built. It
enables you to modify the request using bits of code.
3. Click Next to see the SQL Report Wizard - Data access information window.
4. In the Select the SQL database engine area, select a database engine from the drop-
down list. The list consists of available engines in the edasprof.prf file. You can
choose the first value, Default, which is the first value set in the edasprof.prf file.
5. In the Select the connection area, choose a connection from the drop-down list
generated from the engine that you selected. You can choose the default value, which
is the first connection in the edasprof.prf file for the selected engine, or choose other
connections defined in edasprof.prf.
6. Click Next to see the SQL Report Wizard - Import external SQL file window.

Developing Reporting Applications With Graphical Tools 4-29


Using the SQL Report Wizard

7. Type the SQL file name that you want to import or click Browse to select it.
Note: You can only browse the files on the APP PATH if your .sql extension is a valid
filter in the Properties dialog box. To do this, see How to Add an .sql Extension as a
Valid Filter.
8. Optionally, you can run with limited records by clicking Run SQL. By default, the Run
with limited records check box is selected so you can test your procedure with a
readlimit if the engine supports it. There is a field box next to the check box in which
you can enter the number of records to be read. 100 is the default limit.
9. Click Run SQL to run your report.
10. Click Next to see the SQL Report Wizard - Enter SQL statements window. You can edit
the imported SQL code if necessary.
11. Click Run SQL to run your report.
12. Click Next to see the SQL Report Wizard - Summary of SQL options window.
Do one of the following:
❏ To create a report, select the Create Report option button. This option is selected
by default.
❏ To create a graph, select the Create Graph option button.
13. Click Finish to run the SQL procedure. The Report Painter or Graph Assistant opens.
When you have completed the procedure, you can run it from the Procedures folder in
the Explorer view.

Procedure: How to Add an .sql Extension as a Valid Filter


To browse the files on the APP PATH, your .sql extension must be a valid filter in the
Properties dialog box.
1. Right-click the project, select Properties, then select the Edit Filters tab.
2. Scroll through the list until you find the .sql extension in the Extensions column.
If the .sql file is not part of the displayed list in the Extensions column, click the Add
new filter file type filter(s) icon.

3. Select the .sql extension.


4. Click OK.

4-30 WebFOCUS7
Creating a Reporting Procedure

Example: Executing SQL Code for a Stored Procedure With the SQL Report Wizard
Start the WebFOCUS Reporting Server and create an adapter:
1. Start the WebFOCUS Reporting Server with security OFF.
2. Create the following adapter:
CON01 - Northwind Database as default (for Stored Procedures).
This is the connection name automatically assigned by the server.
3. Start Developer Studio.
Launch the SQL Report Wizard to begin executing SQL code:
4. Launch the SQL Report Wizard by right-clicking the Procedures folder and selecting
SQL Report from the Create with drop-down list in the Add Procedure dialog box.
The SQL Report Wizard - Welcome window opens.
5. Click the option button next to Executed from a stored procedure call within an SQL
database.
6. Click Next to see the SQL Report Wizard - Data access information window.
7. In the Select the SQL database engine area, select a database engine from the drop-
down list. The list consists of available engines in the edasprof.prf file. You can
choose the first value, MSSQL, which is the first value set in the edasprof.prf file.
8. In the Select the connection area, choose the CON01 connection from the drop-down
list.
9. Click Next to see the SQL Report Wizard - Call SQL Stored Procedure window.
Note: When typing procedure names and parameters, note that SQL is case-sensitive.
10. In the Remote procedure name field, type TenMostExpensiveProducts.
11. Do not type a parameter in the Parameters (comma delimited) field.
12. Click Next to see the SQL Report Wizard - Summary of SQL options window.
13. Select the Create Graph option button.
14. Click Finish to open the Graph Assistant.

Developing Reporting Applications With Graphical Tools 4-31


Using the SQL Report Wizard

Create a graph in the Graph Assistant:


15. In the Graph Assistant Select Graph Type drop-down list, select Pie.
16. Click Next.
17. In the Field value plotted on X axis field, type TenMostExpensiveProducts.
18. In the Field value(s) plotted on Y axis field, type UnitPrice.
19. Click Next.
20. In the Page Heading field, type Ten Most Expensive Products.
21. Click Run to run your graph.

4-32 WebFOCUS7
Creating a Reporting Procedure

Using the Report Wizard


In this section:
Creating a Parameterized Report Using the Report Wizard
How to:
Access the WebFOCUS Report Wizard
Select a Template in the Report Wizard
Assign Data to a Template in the Report Wizard
Create Filters in the Report Wizard
Select Styling Options in the Report Wizard
Preview and Save a Report in the Report Wizard
Reference:
Types of Report Wizard Templates

The WebFOCUS Report Wizard provides a step-by-step tool for developers to create
parameterized reports based on predefined templates. The reports developed with the
Report Wizard can accept any number of parameter values supplied by users at run time,
when the report is executed. The parameter values include variables to populate the
report, and optional filters to control the amount of output. The required variables may
include measures, which are numeric fields that can be added or summed, and
dimensions, which are fields that can be used to sort the report output. For example, a
measure can be a quantity or cost field, and a dimension can be a product or category
field.
A set of predefined report templates are available from the Report Wizard interface that
enable you to create a variety of business reports and forms, and take advantage of the
most powerful WebFOCUS reporting features. For more information, see Types of Report
Wizard Templates. You can also develop customized report templates and make them
available to Report Wizard users. For more information, see Appendix A, Creating a Report
Template for the Report Wizard in the Developing Reporting Applications With Graphical
Tools manual.

Developing Reporting Applications With Graphical Tools 4-33


Using the Report Wizard

Procedure: How to Access the WebFOCUS Report Wizard


To access the WebFOCUS Report Wizard, complete the following steps from the Developer
Studio environment.
1. Launch the Report Wizard using any of the following methods:
❏ Highlight the project for which you want to create a report, then click Start the
Report Wizard in the QuickLinks pane.
❏ Right-click the project for which you want to create a report (or right-click the HTML
files folder in that project), select New, then select Report Wizard.
❏ From Managed Reporting, expand Standard Reports and right-click a folder. From
the New option, select Report Wizard.
The Add HTML File dialog box opens.

2. In the File name field, type the name of the new HTML file you want to create.
Note: You must specify a new name for the HTML file you want to create in the Report
Wizard. If you select an existing HTML file name, that file will be opened in the HTML
Layout Painter and the Report Wizard will not be launched.
3. In the Files of type field, accept the default HTML Files.
4. In the Create with field, select HTML Layout Painter from the drop-down list. This
specifies that your finished report will de displayed in the HTML Layout Painter.

4-34 WebFOCUS7
Creating a Reporting Procedure

5. Click Open.
The Report Wizard opens.

Creating a Parameterized Report Using the Report Wizard


The Report Wizard prompts you to complete these basic steps:
❏ Select a template. Select a template that fits the needs of your report. For example,
if you would like to create a report that provides lists of information and sum totals,
select Listing Report.
❏ Assign data to a template. By assigning Master File data or static values to each
variable in your parameterized report, you can control the content of your HTML report.
❏ Create filters. By creating filters (WHERE clauses), you can provide users with a way
to control, or limit, the amount of output generated by the report.
❏ Select styling options. Select a launch page template, and select the types of form
controls associated with the variables displayed in your report.
❏ Preview and save a report. Preview the final product, and decide whether to save
the report or not.

Developing Reporting Applications With Graphical Tools 4-35


Using the Report Wizard

Procedure: How to Select a Template in the Report Wizard


From the Report Wizard dialog box shown in the following image, complete the following
steps to select a report template.

1. In the Templates pane, highlight the type of report you wish to create. To determine
which template meets your needs, refer to information about each template in the
Overview tab of the Template Details pane.
Optionally, to view an example of the type of report you highlighted in the Templates
pane, click the Definition and Sample link in the Overview tab.

4-36 WebFOCUS7
Creating a Reporting Procedure

2. Click the Variables tab. This tab lists and describes the variables associated with the
report template you selected.
If a drop-down list appears in the Number column of the Variables tab, as shown in
the following image, you must specify the number of instances of that variable to
create at run time. This is a required step.

Tip: After the report is created, instances of a variable can be made optional by
assigning the value to the relevant drop-down box in the HTML Layout Painter. See
Adding an All Value in the Developing Reporting Applications With Graphical Tools
manual.
3. Click Next to continue to the Report Wizard, Data Requirements dialog box.

Developing Reporting Applications With Graphical Tools 4-37


Using the Report Wizard

Procedure: How to Assign Data to a Template in the Report Wizard


From the Report Wizard, Data Requirements dialog box, complete the following steps to
assign data to a template.
Note: There is no automatic verification for variable selection. To ensure that your Report
Wizard report runs correctly, you must have a good understanding of your data source, and
select data with an appropriate format (numeric, alphanumeric, and date) for each variable
in the template you selected.
1. In the Data File Selector field, select the Master File of the data source you want to
associate with variables in your report. You can select from the drop-down list or use
the browse button.
2. In the Select variable to modify pane, select a variable in the Name column that you
want to populate with an appropriate field in the data source you selected, then
double-click one or more fields from the data source tree menu below the Data File
Selector field. The field(s) you select will be shown in the Assigned parameters pane.
If you want users to have a choice of data values for this variable at run time, select
multiple fields. Otherwise, select one field. Depending on the underlying code of the
selected template, selecting one field may hide this variable from the user at run
time.
Repeat this step for each of the variables listed in the Name column that you want to
populate with a corresponding field in the selected data source.
3. If the template you selected includes any variables that should be populated with a
static value that you manually create (for example, headings), click the new value

button, , in the Assigned parameters pane to create a customized variable.


Double-click the default Display Value field and enter a value to be displayed for this
variable on the launch page, then double-click the default Return Value field and enter
a name to be displayed for this variable on the report page. If desired, you can also
edit the display and return values for any of the data source fields selected in the
previous step.
Optionally, you can delete and reorder (move up, move down) the list of variables
displayed in the Assigned parameters pane.
Note: If you select a different Master File data source after assigning values to
variables, a message appears confirming that all assigned data fields will be removed
from the variables, and you will have to go back to the first step of this procedure.

4-38 WebFOCUS7
Creating a Reporting Procedure

The following image shows an example of a completed Data Requirements dialog box.

Note: If you want to change the way the data source fields are displayed or change
the context of the fields list, for example, displaying in alphabetical order, right-click in
the list of fields and select other data source display options.
4. When you are finished assigning values to all of the variables, click Next, and the
Filters and Defaults dialog box opens where you can create filters.
Note: All check boxes in the Assigned column will be populated when you have
assigned values for every variable, which is required to continue in the Report Wizard.
Otherwise, an error message will be displayed when you click Next.
Note: After you exit the Report Wizard, you can further modify the dynamic parameters in
your report in the HTML Layout Painter. For more information, see Designing a User
Interface for a Web Application With the HTML Layout Painter in the Developing Reporting
Applications With Graphical Tools manual.

Developing Reporting Applications With Graphical Tools 4-39


Using the Report Wizard

Procedure: How to Create Filters in the Report Wizard


You have the option to create filters (WHERE clauses) that enable users to control the
amount of report output at run time. To create filters, complete the following steps. If you
do not wish to include filters in your report, click Next in the Filters and Defaults dialog box
to proceed to the Reporting Options screen.
1. In the Filters and Defaults dialog box, click New to open the Filter options dialog box,
as shown in the following image:

2. In the Fields list pane, select the data source field you want to use in your filter.
3. In the Multiselect pane, select the type of filter you want to create. Select:
❏ None if you want to create a single-select filter. (A single-select filter allows users
to select only one value at run time, for example, REGION EQ 'EAST')
❏ OR if you want to create a multi-select filter. (A multi-select filter allows users to
select more than one value at run time, for example, PLANT EQ 'LA' OR 'BOS')
4. Click OK and you are returned to the Filters and Defaults dialog box.
You can repeat the previous steps to create additional filters if desired.
5. Optionally, you can select an existing filter in the Filters and Defaults dialog box, and
click Edit to make changes to meet your specifications, or click Delete to remove the
filter.

4-40 WebFOCUS7
Creating a Reporting Procedure

The following image shows the syntax for two filters as displayed in the Filters and
Defaults dialog box:

6. When you are finished creating filters, click Next to continue to the Reporting Options
dialog box.

Procedure: How to Select Styling Options in the Report Wizard


The Styling Options dialog box opens, as shown in the following image:

Developing Reporting Applications With Graphical Tools 4-41


Using the Report Wizard

Select options for your report output by completing the following steps:
1. Select whether the output for a report will be determined by the developer or the user.
2. In the Report format options menu, select an output format from the drop-down list.
For some of the templates available in the Report Wizard, one or both of the first two
output options may be greyed out (inactive).
3. In the Select HTML Template menu, select a launch page template from the drop-down
list.
Your options are: No template, WebFOCUS 7 template, or a customized launch page
template if you have developed one.
4. When you have completed making reporting options selections, click Next, and the
New Parameters dialog box opens, as shown in the following image:

Each parameter is associated with a default form control type listed in the Control
Type column. If you want to change to another type of form control, click the down-
arrow to the far right of the current Control Type value, and select another type of
control from the drop-down list.
Note: If the New Parameters dialog box is not displayed, the check box next to “Don’t
show this message again and use default selection” was previously selected. To
reactivate, go to the Tools, Settings dialog box of the HTML Painter and select Show
new parameters.

4-42 WebFOCUS7
Creating a Reporting Procedure

5. If you want to suppress the display of a parameter in the HTML report you are
creating, un-check the Create control check box for that parameter.
6. If you are satisfied with the control type values, click OK to continue.

Procedure: How to Preview and Save a Report in the Report Wizard


1. The Report Wizard Summary dialog box opens displaying the reports’ path and file
name, the selected report template name, and the Master File data source name, as
shown in the following image:

From the Report Wizard Summary dialog box, you have the following options:
❏ Click Run Report to preview the report’s launch page and environment in a new
browser window. You can select values for any of the parameters and click the Run
button to execute this report and view the output. When finished previewing your
report, close the browser window to return to the Report Wizard Summary.
❏ Click Back to return to previous Report Wizard screens to modify your report.

Developing Reporting Applications With Graphical Tools 4-43


Using the Report Wizard

❏ Click Finish to either:


Create the report, and open it in the HTML Layout Painter (if the Launch HTML
Layout Painter check box is selected).
or
Create the report and quit the Report Wizard (if the Launch HTML Layout Painter
check box is not selected).
❏ Click Cancel to close the Report Wizard without saving the report.
❏ Click Help to access Developer Studio help screens.
2. The following image is an example of how your new Report Wizard report launch page
will appear if you selected the WebFOCUS 7 HTML template.

From the browser window displaying this launch page, select File, then Save As, and
enter a name to save your new HTML report.

4-44 WebFOCUS7
Creating a Reporting Procedure

Reference: Types of Report Wizard Templates


❏ Accordion Report - An expandable report that provides a way to control the amount
of sorted data that appears on an HTML report page. When an Expandable Report
first appears, only data values of the first (highest-level) sort field are shown; all other
data is hidden and must be manually expanded to be displayed.
❏ Active Report - Provides a means to distribute OLAP functionality in an unconnected,
distributed fashion. Active reports enable users to transform reports by changing the
sort and distribution of data, adding and removing graphs as required, and doing so in
a standard browser.
❏ Business Form - A single page invoice form with heading, footings, and detail data
enclosed in boxes. This template can be edited and transformed into other types of
business forms.
❏ Crossfoot Report - Contains line totals in the right-most column and column totals at
the bottom of each column. The report can have from one to three dimensions on the
left side of the report and a single dimension across the top of the report.
❏ Crosstab Report - Displays summary information by category, with certain categories
listed across the top of the report and others down the left-hand side. CrossTab
reports are powerful tools for summing financial information.
❏ Graph and Report - Creates a tabular report above a graph in HTML output format.
The graph type is user defined, which may be a vertical bar or line, or a pie chart.
❏ Listing Report - Displays a simple list of instances of a field sorted by one to four
categories with a user supplied heading.
❏ Mailing Label Report - Provides a means to select fields to use as mailing labels.
Names and addresses are positioned for printing on 3-up mailing label paper.
❏ OLAP Report - Generates an OLAP report for analysis on a user-selected OLAP-
enabled Master File Description.
❏ Simple Report - Sums one numeric field by a single sort field.
❏ Table of Contents Report - Generates a report with one to three sort fields where
the primary sort field controls the report heading. The report includes one or two
measure fields and the output is fixed as HTML format.
❏ Visualization Report - Displays data for two measures, sorted from highest to
lowest values of the first measure. A horizontal bar graph is displayed in the column
next to each measure.

Developing Reporting Applications With Graphical Tools 4-45


Calling a Procedure From the Current One

Calling a Procedure From the Current One


How to:
Call a Procedure With the Include Component
Execute a Procedure With the Execute Wizard
Example:
Calling a Procedure From Another Procedure

The Execute Wizard and the Include component enable you to call another procedure from
the current one.
The Execute component allows one procedure to execute or call another procedure. The
redesigned Execute Wizard allows you to view and select available procedures and supply
values for parameters in the called procedure and also test that called procedure. The
called procedure behaves as a completely separate procedure, with its own context.
Execute Wizard allows you to select the procedure that you are supplying parameter
values for. Once this procedure is specified, Execute Wizard displays these parameters
and prompts you to provide values for them. You can provide values for all parameters in
the procedure, or can choose to provide values for only some of the parameters. If you
provide values for only some of the parameters, you must provide values for the other
parameters using another method. (For example, values are passed from another part of
the application, etc.) After providing parameter values, you can test the called procedure.
The Execute Wizard is available throughout all development areas of the product: Projects,
Data Servers, and Managed Reporting. When working in Managed Reporting, the tool
allows developers to use Standard Reports available in the Domain or use procedures that
reside on the WebFOCUS Reporting Server.
Execute Wizard uses the WFDESCRIBE auto-prompting feature to locate and pass
parameters. To activate the WFDESCRIBE feature, change the default value in the
IBIF_wfdescribe setting in the cgivars.wfs file.
The Include component allows one procedure to run another procedure as if the second
one were embedded in the first. In this case, the procedure being included (called) has full
access to variables defined in the calling procedure. Using this tool, you can create an
object that includes another procedure within a host procedure. There is no limit to the
number of procedures that can be included.

4-46 WebFOCUS7
Creating a Reporting Procedure

Procedure: How to Call a Procedure With the Include Component


1. Open the host procedure.
2. Click and hold the component connector at the point at which you wish to include the
existing procedure.
The Component Connector toolbox opens.
3. Click the Include button on the toolbox.
The Open dialog box opens.
4. Select the procedure you wish to embed from the list, or type the name of a new
procedure in the File Name field.
5. Click Open.
Tip: The Include component inserts the -INCLUDE command into the procedure’s code.
Right-click the Include object and choose Quick View from the shortcut menu to see the -
INCLUDE command.

Developing Reporting Applications With Graphical Tools 4-47


Calling a Procedure From the Current One

Procedure: How to Execute a Procedure With the Execute Wizard


1. Click the component connector at the point at which you wish to include the existing
procedure.
The Component Connector toolbox opens.
2. Click the Execute button.
The Execute Procedure Wizard opens.

4-48 WebFOCUS7
Creating a Reporting Procedure

3. Select the procedure you want to execute from the list of available procedures, and
click Next. The Execute Procedure Wizard - Enter Procedure Parameters window opens:

The Enter Procedure Parameters window contains a list of variables contained in the
procedure you are executing, and fields in which to enter values for those variables.
This screen will not appear if the procedure you are calling does not have parameters.
4. Enter the variable values you wish to use in the procedure you are executing. If you do
not wish to provide a value for a variable, uncheck the Optional box next to the
variable name.

Developing Reporting Applications With Graphical Tools 4-49


Calling a Procedure From the Current One

5. Click Next.
The Execute Procedure Wizard - Summary window opens. This window allows you to
view the name of the procedure you are calling and view the variables-value pairs.

6. Click Test Procedure to ensure that the procedure runs properly. If the procedure works
properly, a report will display in your browser.
7. Click Finish to insert the selected procedure into the current procedure.
Tip: The Execute component inserts the EX command in the procedure’s code. Hover your
cursor over the Execute object to see the EX command. If you wish to run the embedded
procedure, right-click the Execute object and choose Run from the shortcut menu.

4-50 WebFOCUS7
Creating a Reporting Procedure

Example: Calling a Procedure From Another Procedure


In the following example, you will create two procedures. One procedure, named
SALESREP, will contain a sales report with variables. The second procedure, names
SVALUES, will contain the values for the variables in SALESREP, and will execute
SALESREP. The result will be a sales report with variable values filled in.
Create the SALESREP procedure:
1. Create a new procedure named SALESREP using the SALES data source.
2. In the Component Connector toolbox, click a component connector, and select Report.
The Report Painter opens.
3. In the Page Heading section, type Monthly Report for and then select Variable Field
from the Insert menu. The Variable Editor opens.
4. Create the &CITY variable by doing the following:
a. Enter CITY in the Name input field.
b. Select Single Select from the Variable Type drop-down list.
c. Select Values from field from the Data Context drop-down list.
d. Select CITY from the Fields from database drop-down list.
e. Select ALL the from Values from field CITY box.
f. Click OK.
5. Add the UNIT_SOLD and RETURNS fields to your report, then select both fields in the
layout and click the Sum button in the toolbar.
6. Create the RATIO field by doing the following:
a. Select Computes from the Report menu. The Report Options window opens.
b. Enter RATIO in the Field input box.
c. Enter D5.2 in the Format input box.
d. Enter 100 * (RETURNS/UNIT_SOLD) in the Expressions window.
e. Click OK.
7. Add the PROD_CODE field to your report, and click By.

Developing Reporting Applications With Graphical Tools 4-51


Calling a Procedure From the Current One

8. Filter the PROD_CODE field by doing the following:


a. Select Where/If from the Report menu. The Report Options window opens.
b. Select the IF tab.
c. Enter the following in the Expressions window: IF PROD_CODE IS-FROM &CODE1
TO &CODE2
d. Click OK.
9. Add the CITY field to your report, and click By.
10. Filter by the CITY field by doing the following:
a. Select Where/If from the Report menu. The Report Options window opens.
b. Select the IF tab.
c. Enter the following in the Expressions window: IF CITY EQ &CITY
d. Click OK.
11. Save and close the procedure.
Create the SVALUES procedure:
12. Create a new procedure named SVALUES and from the Create with drop-down list,
select Procedure Viewer. The Procedure Viewer opens.
13. Click a component connector, and select Execute. The Execute Wizard opens.
14. Select SALESREP from the list of procedures, and click Next.

4-52 WebFOCUS7
Creating a Reporting Procedure

The Enter Procedure Parameters window opens.

15. Enter STAMFORD in the Value field for CITY.


16. Enter B10 in the Value field for CODE1.
17. Enter B20 in the Value field for CODE2.
18. Click Next.

Developing Reporting Applications With Graphical Tools 4-53


Calling a Procedure From the Current One

The Summary window opens.

19. Click Finish. You return to the Component Connector toolbox.


20. Close and save the procedure.
When the SVALUES procedure is run, the following report appears.

4-54 WebFOCUS7
Creating a Reporting Procedure

Engine Tool
How to:
Create an Engine Statement
Reference:
ENGINE Dialog Box

The Engine tool exposes the FOCUS ENGINE SET commands and enables you to enter
ENGINE commands or connection attributes, and override parameters.
Note: The Engine tool is only used to create ENGINE statements. You are responsible for
having the knowledge of the ENGINE SET command or the Connection Attribute needed.

Procedure: How to Create an Engine Statement


1. From the Procedure Viewer, click and hold a component connector (yellow diamond),
then click the Engine button on the Component Connector toolbox.
Or
Select Engine from the Insert menu.
The ENGINE dialog box opens.
2. Select an Engine from the Engine drop-down list or manually type in an Engine name.
3. Enter either the Connection string or the SET parameters.
4. Click the TEST button to check the ENGINE statement.
5. Click OK to save the ENGINE statement in the Procedure Viewer.
You may click the ENGINE file to update the existing ENGINE statement.

Reference: ENGINE Dialog Box

The ENGINE dialog box has the following fields:

Developing Reporting Applications With Graphical Tools 4-55


Managing Flow of Control

Engine
Contains a list of current adapters for which ENGINE statements exist. This field is
editable. You may manually type a new engine name.
Connection
Contains any existing connections found in your environment.
SET parameters
Type in a parameter statement.
For more information about Adapters, see the iWay Adapter Administration for
Windows, UNIX, OpenVMS, OS/400, OS/390, and z/OS manual.

Managing Flow of Control


You can use Dialogue Manager to control the execution of procedures. Among other
things, Dialogue Manager commands:
❏ Display forms.
❏ Set and test variables.
❏ Execute procedures.
❏ Execute operating system commands.
❏ Read and write disk files.
Dialogue Manager commands are stored in procedures. Their execution can be triggered
by actions on a form, such as clicking a button. Procedures containing Dialogue Manager
commands can be reused by other procedures in a project.
The ability of Dialogue Manager commands to display forms and the ability of a form’s
objects to call Dialogue Manager commands are two of the most important aspects of
application development. The most powerful applications are a combination of graphical
and command-driven components.
For related information, see Managing Flow of Control in an Application in the Developing
Reporting Applications manual.

4-56 WebFOCUS7
Creating a Reporting Procedure

Working With a Full Procedure


How to:
Access ReportCaster to Schedule a Report
Encrypt or Decrypt a Procedure
Edit a Procedure as Text

Although most of procedure development happens at the component level, there are
several tasks that you can perform on a full procedure:
❏ Activating OLAP. If a procedure is set to run in HTML format and it uses an
OLAP-enabled Master File, you can activate OLAP for that procedure and use the OLAP
interface to manipulate data in a report or graph. For details on OLAP, see the Creating
Reports With Graphical Tools manual.
❏ Scheduling a report for distribution. You can schedule a report for distribution to a
single user or multiple users at specific times. For details on scheduling a report, see
the Creating Reports With Graphical Tools manual.
You can schedule an HTML-formatted report that has been OLAP-enabled, but the
OLAP feature will not be active. See How to Access ReportCaster to Schedule a Report
on page 4-58.
❏ Create a Web-based user interface. You can use the HTML Layout Painter or
Microsoft® FrontPage 2000 to create a launch page (Web-based interface) that makes
a report available to browser users. For more information on your options, see
Chapter 2, Understanding User Interface Basics.
❏ Securing a procedure’s contents by encrypting or decrypting it. You can restrict
a user from viewing a procedure by encrypting it. To restore access to a procedure,
decrypt it. See How to Encrypt or Decrypt a Procedure on page 4-58.
❏ Editing a procedure. You can edit a procedure as text. See How to Edit a Procedure
as Text on page 4-59.
❏ Debugging a Procedure. Debugging enables you to check a procedure for any errors
by viewing the logical execution of the request line-by-line in the Command Console.

Developing Reporting Applications With Graphical Tools 4-57


Working With a Full Procedure

Procedure: How to Access ReportCaster to Schedule a Report


1. Expand the WebFOCUS Environments node.
2. Select a server (for example, localhost).

3. Click the ReportCaster icon on the Main toolbar.

The ReportCaster Signon dialog box opens.

4. Enter a valid user name and password.


5. Click OK. If the user name and password for ReportCaster are incorrect, you are
prompted to log on again.
The ReportCaster dialog box opens. For information about scheduling a report, see
the Creating Reports With Graphical Tools manual.

Procedure: How to Encrypt or Decrypt a Procedure


To encrypt a procedure:
1. From an open project, right-click a procedure in the Procedures folder, then select
Properties.
The Project Properties dialog box opens.
2. Select the Encrypted check box, and click Apply.
To decrypt a procedure:
1. From an open project, right-click a procedure in the Procedures folder, then select
Properties.
The Project Properties dialog box opens.
2. Deselect the Encrypted check box, and click Apply.

4-58 WebFOCUS7
Creating a Reporting Procedure

Procedure: How to Edit a Procedure as Text


1. Right-click the procedure and select Edit As Text from the shortcut menu, or select the
procedure and choose Edit As Text from the File Menu.
2. The text editor opens, displaying the procedure’s syntax.
For details on using the text editor, see Chapter 9, Editing Application Components as Text
in Developer Studio.

Running a Procedure
How to:
Run a Procedure on a Local Server
Identify a Remote Server
Run a Procedure on a Remote Server

You can run a procedure on the local host or on a remote server at any point during the
development process:

Procedure: How to Run a Procedure on a Local Server


1. Select the procedure.
2. Do one of the following:
❏ Right-click the procedure, then choose Run from the shortcut menu.
or
❏ Click the Run button on the Main toolbar.

Developing Reporting Applications With Graphical Tools 4-59


Running a Procedure

Procedure: How to Identify a Remote Server


1. From the Explorer window, select the Command menu and then choose Remote Run
Server.
The Server Settings dialog box opens.

2. Select the remote server from the Server drop-down list and enter your user name and
password to access that server.
3. Enter a port number where the remote server is listening in the Service field.
4. Click OK.

4-60 WebFOCUS7
Creating a Reporting Procedure

Procedure: How to Run a Procedure on a Remote Server


1. From an open project, right-click the procedure and select Flag as Remote from the
shortcut menu or the File menu.
2. Do one of the following:
❏ Right-click the procedure, then choose Run from the shortcut menu.
or
❏ Select the procedure, then click the Run button on the Main toolbar.
The Server Settings dialog box opens if you have not previously configured a Remote
Run Server.

3. Select the remote server from the Server drop-down list and enter your user name and
password to access that server.
4. Enter a port number where the remote server is listening in the Service field.

Developing Reporting Applications With Graphical Tools 4-61


Canceling a Running Procedure

5. Click OK.
The selected procedure is run, and its output appears in the output facility associated
with the tool that created it. For example, an HTML report or graph is displayed in the
browser, and the result of a query command is displayed in the Command Console.
Tip: You can also set a procedure to run remotely from the New Procedure dialog box.
See Selecting a Creation Tool on page 4-2.

Canceling a Running Procedure


You can cancel any procedure while it is running. This may be necessary if you run a
procedure and find that it takes too long to process or that it is the wrong one. To cancel a
procedure at any time, you must use the Web Console. For more information, see the iWay
Server Administration for UNIX, Windows, OpenVMS, OS/400, OS/390 and z/OS manual.

4-62 WebFOCUS7
WebFOCUS7

5 Designing a User Interface for a Web


Application With the HTML Layout Painter

The HTML Layout Painter allows you to Topics:


graphically create an HTML page that
❏ Uses for the HTML Layout Painter
incorporates forms, reports, graphs, and
Web objects. You can also directly edit ❏ Getting Started With the HTML
HTML code in the HTML Editor or a third Layout Painter
party editor. The HTML Layout Painter is
❏ Creating a Report Page Layout
fully integrated with JavaScript and
Cascading Style Sheets (CSS). ❏ Using Form Controls to Supply
Parameter Values
This topic describes how to create a
user interface in the local development ❏ Supplying Parameter Values to
environment. For information on creating External Reports
a user interface in Managed Reporting, ❏ Styling Your Layout
see your Managed Reporting
documentation. ❏ Specifying Browser Defaults with
Style Composer
To take advantage of a tutorial on the
Layout Painter, see the Developer Studio ❏ Laying Out Objects With the HTML
Application Development Getting Started Layout Painter
manual. ❏ Customizing the Layout
Note: The HTML Layout Painter does not ❏ Controlling the HTML Layout Painter
support OLAP-enabled reports. Environment
Uses for the HTML Layout Painter

Uses for the HTML Layout Painter


You can do the following when creating an HTML layout:
❏ Build an HTML launch page. The HTML Layout Painter allows you to add push buttons,
hyperlinks, and other objects that launch other WebFOCUS reports in your application.
❏ Create a launch page for one or more reports that contain parameters.
❏ Create a complete report by adding multiple reports and graphs into a single HTML
formatted report.
❏ Create an advanced report layout by including images, frames, and other Web
elements. You can change the location, size, and properties of all objects in your
layout.
❏ Directly edit an HTML page in the HTML Editor or in a third party editor.
❏ Set background, font, and other properties in the Style Composer tool.

Getting Star ted With the HTML Layout Painter


How to:
Access the HTML Layout Painter
Reference:
HTML Layout Painter Windows and Toolbars
Standard Toolbar
Components Toolbar

You can create procedures and HTML forms in one integrated process with the HTML
Layout Painter. When you save your layout, both the procedure file (.fex) and the HTML file
are saved in their respective Project folders. You can deploy both files with your project
and they will retain their relationship.
Note: The HTML Layout Painter does not support OLAP-enabled reports. If you execute a
report from the HTML Layout Painter with this option, the output window will not display
the OLAP controls and you will receive a scripting error. In order to execute this type of
report, you must use a frame. For more information, see Adding a Frame to the Layout on
page 5-16.

5-2 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Access the HTML Layout Painter


1. Create a new HTML file by completing one of these actions:
❏ With the HTML folder highlighted, select New from the File menu, then select HTML
file.
or
❏ Click Layout Reports and Graphs in the QuickLinks pane.
The Add HTML File dialog box opens.

2. Enter a name for the new procedure in the File name field.
3. Select HTML Layout Painter from the Create with drop-down list.
4. Click Open.
The HTML Layout Painter opens.

Developing Reporting Applications With Graphical Tools 5-3


Getting Started With the HTML Layout Painter

Reference: HTML Layout Painter Windows and Toolbars


When you open the HTML Layout Painter, it appears as shown in the following image.

The main elements of the HTML Layout Painter are:


Menu Bar
Displays pull-down menus for the HTML Layout Painter.
Developer Studio Toolbar
Displays tool buttons such as Open and Run. For details, see the Creating Reports
With Graphical Tools manual.
Standard Toolbar
Displays buttons such as Cut and Paste that allow you edit the layout.
Components Toolbar
Contains buttons that add reporting objects and form controls to the layout.
Layout Toolbar
Contains buttons that control the appearance of the layout. For details, see Layout
Toolbar on page 5-100.
Properties Window
Displays the properties and events of objects in the layout. For details, see Working
With the Properties Window on page 5-56.

5-4 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Events Tab
Displays the events associated with objects in the layout. For details, see Working
With the Properties Window on page 5-56.
QuickLinks Window
Displays links to information on Developer Studio Help, configuration options,
metadata creation, and reports and procedures.
Parameters Tab
Displays information about the parameters in your report or graph. For details, see
Working With the Parameters Tab in the Properties Window on page 5-58.

Reference: Standard Toolbar


The Standard toolbar contains the following buttons:

Button Description

Saves the existing procedure (.fex) and HTML files to the current project.
This button is grayed out once the layout is saved and no new changes have
been made. When a change has been made to the layout, the Save button is
active until the report is saved again.

Removes the highlighted object(s) and saves it to the clipboard.

Copies the highlighted object(s) to the clipboard.

Pastes the object(s) to the specified location.

Deletes the highlighted object(s).

Resets the layout by reversing the last action performed.

Repeats the last action performed.

Developing Reporting Applications With Graphical Tools 5-5


Getting Started With the HTML Layout Painter

Reference: Components Toolbar


The Components toolbar contains the following buttons:

Button Description

Inserts a report object to the layout.

Inserts a graph object to the layout.

Inserts a placeholder for an IFRAME. An IFRAME can have its own URL and
contain HTML content, and it can be a placeholder for a drill-down report.

Inserts a placeholder for an image.

Inserts text.

Inserts a line.

Adds a group box.

Adds a text box.

Adds a hidden text box.

Adds a drop-down list.

Adds a list box (a drop-down list that allows multiple selections).

Adds a push button.

Adds a reset button.

Adds a radio button.

5-6 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Button Description

Adds a check box list.

Inserts a text area.

Inserts a tree control.

Inserts a hyperlink.

Adds a calendar

Adds an ActiveX control

Saves a selection.

Developing Reporting Applications With Graphical Tools 5-7


Creating a Report Page Layout

Creating a Repor t Page Layout


In this section:
Adding a Report or Graph to the HTML Layout
Selecting Components to Import Into a Procedure
Adding a Frame to the Layout
Adding a Line to the Layout
Adding an Image to the Layout
Adding Text to the Layout
Adding a Hyperlink to the Layout
Adding a Group Box to the Layout
Adding a Push Button to the Layout

You can use the HTML Layout Painter to create an HTML page that launches and displays
your report or graph. You can add elements to the HTML page including a report or graph,
text, and form controls. The following is a complete list of objects you can add to your
HTML page with the HTML Layout Painter:
❏ A report or graph. For details, see Adding a Report or Graph to the HTML Layout on
page 5-9.
❏ A frame. For details, see Adding a Frame to the Layout on page 5-16.
❏ A line. For details, see Adding a Line to the Layout on page 5-20.
❏ An image. For details, see Adding an Image to the Layout on page 5-22.
❏ Text. For details, see Adding Text to the Layout on page 5-24.
❏ A hyperlink. For details, see Adding a Hyperlink to the Layout on page 5-26.
❏ A group box. For details, see Adding a Group Box to the Layout on page 5-28.
❏ A push button. For details, see Adding a Push Button to the Layout on page 5-30.
❏ A form control. For details, see Adding a Push Button to the Layout on page 5-30 and
Using Form Controls to Supply Parameter Values on page 5-32.
❏ A theme (template). For details, see Styling Your Layout on page 5-83.
❏ A Calendar. For details, see Adding a Dynamic Calendar on page 5-52.
❏ An HTML template. For details, see Adding a CSS or Script to the Layout on page 5-
83.

5-8 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

You can also set properties for the HTML page in the HTML Layout Painter. For details, see
Setting HTML Page Properties on page 5-83.

Adding a Report or Graph to the HTML Layout

How to:
Add a New Report or Graph to an HTML Layout
Add an Existing Report or Graph to a Layout
Reference:
Report Properties in the Properties Window
Graph Properties in the Properties Window

You can add a report or graph to the HTML Layout that will display when you run the
procedure. You can add a new report which you create in the Report Painter or Report
Assistant, a new graph which you create in the Graph Assistant, or an existing report or
graph that resides on an available server.
You can also include parameters in a report whose values can be assigned with forms
that are added with the HTML Layout Painter. For information, see Using Form Controls to
Supply Parameter Values on page 5-32.
You can set the graphic used as a placeholder for a report or graph in the layout using the
Settings dialog box. For details, see How to Set Page Properties on page 5-102.

Procedure: How to Add a New Report or Graph to an HTML Layout


1. Insert a report or graph object by doing one of the following:
❏ Click the Insert new report or Insert new graph button.
❏ From the Insert menu, select New Report or New Graph.
❏ Right-click in the layout and select New Report or New Graph from the pop-up
menu.
The cursor changes into a crosshair.

Developing Reporting Applications With Graphical Tools 5-9


Creating a Report Page Layout

2. Click and drag the crosshair to create a report or graph object and adjust it to the size
you want.
A report or graph object is created in the layout and assigned the name reportn or
graphn where n is a number. The object will appear in gray and white to indicate that
the placeholder does not have a report or graph associated with it. Once a report or
graph is associated with the object, the object displays the contents of the report or
graph.
3. Create a report or graph by doing one of the following:
❏ Double-click the placeholder.
or
❏ Right-click the placeholder and select Open report for a report, or Open for a graph.
The Open dialog box opens.
4. Select the Master File you want to report against from the Master File list, select Open
Report Painter or Open Report Assistant, and click Open.
The selected tool opens. For details on using these tools, see Creating Reports With
the Report Assistant, Creating Reports With the Report Painter, and Creating a Graph
With Graph Assistant in the Creating Reports With Graphical Tools manual.
5. Optionally, after creating the report or graph, you can change its properties by
adjusting the properties displayed in the Properties tab of the Properties window. For
details, see Report Properties in the Properties Window on page 5-12.

Procedure: How to Add an Existing Report or Graph to a Layout


1. Insert a report or graph object by doing one of the following:
❏ Click the Insert new report or Insert new graph button.
The cursor changes into a crosshair. Click and drag the crosshair to create a
report or graph object and adjust it to the size you want.
A report or graph object is created in the layout and assigned the name reportn or
graphn where n is a number. The object will appear in gray and white to indicate
that the placeholder does not have a report or graph associated with it. Once a
report or graph is associated with the object, the object displays the contents of
the report or graph.
❏ From the Insert menu, select Import Existing Procedure.
Note: If you want to access the Manage Layout dialog box, choose this method.
❏ Right-click in the layout and select New Report or New Graph from the pop-up
menu.

5-10 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

2. Do one of the following:


For a report:
Right-click the report object and select Import existing report.
For a graph:
Right-click the graph object and select Import existing graph.
The Get source file dialog box opens.
Enter the name of the procedure you want to add to the layout.
3. Click Open.
The report or graph object appears as a blank white object.
4. Double-click the object.
The Procedure Viewer opens.
5. Open the report or graph, and make any necessary changes.
6. Optionally, change the properties by adjusting the properties displayed in the
Properties tab of the Properties window. For details, see Report Properties in the
Properties Window on page 5-12.

Developing Reporting Applications With Graphical Tools 5-11


Creating a Report Page Layout

Reference: Report Properties in the Properties Window


When a report is selected, the Properties tab in the Properties window contains options
that control the properties of your report and reporting objects.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

5-12 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Graph Properties in the Properties Window


When a graph is selected, the Properties tab in the Properties window contains options
that control the properties of your graph.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-13


Creating a Report Page Layout

Selecting Components to Import Into a Procedure

How to:
Select Components to Import Into a Procedure
Reference:
Manage Layout Dialog Box

You can select to include or exclude components to be imported into your procedure with
the Manage Layout dialog box. The Manage Layout dialog box allows you to select from
components of your request such as TABLE, SET, and GRAPH.
If you have several requests in one procedure, you can use the Manage Layout dialog box
to suppress the display of individual TABLE, SET, and GRAPH components (for example,
temporary HOLD files). By default, the last TABLE is set to display.

Procedure: How to Select Components to Import Into a Procedure


1. Select Import Existing Procedure from the Insert menu.
The Get source file dialog box opens.
2. Select a File name and click Open.
The Manage Layout dialog box opens. For details, see Manage Layout Dialog Box on
page 5-15.

5-14 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Manage Layout Dialog Box

The Manage Layout dialog box contains the following fields/options:


Components
Displays all the components (SET, DEFINE, etc.) in the request.
Data
Displays the contents of the selected component.

Developing Reporting Applications With Graphical Tools 5-15


Creating a Report Page Layout

Component Legend
Determines whether the request is included in the procedure, outside of the
procedure, or in the procedure and layout.
In focexec and layout
Activates the component and displays the component in the layout.
In focexec only
Deactivates the component and does not display the component in the layout. This
is a good method for hiding report requests that produce temporary files.
Not in focexec
Removes the component from the procedure.
Show layout items only (reports and graphs)
Displays the layout’s reports and graphs in the Data field.
This check box only displays when you access the Manage Layout dialog box from
the Insert menu. When accessing it from the pop-up menu, only the report or graph
component displays, and the check box does not apply.

Adding a Frame to the Layout

How to:
Add a Frame to the Layout
Assign a URL, HTML Form, or Report to a Frame
Reference:
Frame Properties in the Properties Window

You can use a frame to embed additional Web sources or run reports. You can also use a
frame as the output location or target for a drill-down report. You can also use a frame to
run a table of contents report, an OLAP report, a PDF report, or an Excel report. By
default, frames are hidden until they are populated with output.

5-16 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Add a Frame to the Layout


1. Insert a frame by doing one of the following:
❏ Click the Frame button.
❏ From the Insert menu, select Frame.
The cursor changes into a crosshair.
2. Click and drag the crosshair to create a frame and adjust it to the size you want.
A frame is created in the layout and assigned the name iframen, where n is a number.
3. Optionally, change the frame’s properties by adjusting the properties displayed in the
Properties tab of the Properties window. For details, see Frame Properties in the
Properties Window on page 5-19.

Procedure: How to Assign a URL, HTML Form, or Report to a Frame


1. Insert a frame by doing one of the following:
❏ Click the Frame button.
❏ From the Insert menu, select Frame.
The cursor changes into a crosshair.
2. Click and drag the crosshair to create a frame and adjust it to the size you want.
A frame is created in the layout and assigned the name iframen, where n is a number.
3. Right-click the frame, and select Frame Properties from the pop-up menu.

Developing Reporting Applications With Graphical Tools 5-17


Creating a Report Page Layout

The Hyperlink Properties dialog box opens.

4. Click the New icon to create a new action. From the drop down list in the Action field
you can select:
❏ URL: To assign a URL address to the frame, select URL and enter the fully
qualified URL in the Source field.
❏ HTML File: To assign an HTML file to the frame, click select HTML File and enter
the file’s location in the Source field, or click the browse button (...) to browse to
the location. An HTML file refers to the HTML files in your application.
❏ Embedded Procedure: To assign an embedded procedure to the frame, select
Embedded Procedure and enter the procedure’s location in the Source field, or
click the browse button (...) to browse to the location.
❏ External Procedure: To assign an external procedure to the frame, select
External Procedure and enter the procedure’s location in the Source field, or click
the browse button (...) to browse to the location.
5. Click OK.
6. Optionally, change the frame’s properties by adjusting the properties displayed in the
Properties tab of the Properties window. For details, see Frame Properties in the
Properties Window on page 5-19.

5-18 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Frame Properties in the Properties Window


When a frame is selected, the Properties tab in the Properties window contains options
that control the properties of your frame.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-19


Creating a Report Page Layout

Adding a Line to the Layout

How to:
Add a Line to the Layout
Reference:
Line Properties in the Properties Window

You can add a horizontal or vertical line to the layout. This is useful for distinguishing
between sections of your launch or display page.

Procedure: How to Add a Line to the Layout


1. Do one of the following:
❏ Click the Insert line button.
❏ From the Insert menu, select Line.
The cursor changes into a crosshair.
2. Click and drag the crosshair to create a horizontal or vertical line.
A line is created in the layout.
3. Optionally, change the line’s properties by adjusting the properties displayed in the
Properties tab of the Properties window. For details, see Line Properties in the
Properties Window on page 5-21.

5-20 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Line Properties in the Properties Window


When a line is selected, the Properties tab in the Properties window contains options that
control the properties of lines.

To view a description of a property at the bottom of the Properties window, click the
desired property. These properties adhere to the Microsoft standards. For more
information on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-21


Creating a Report Page Layout

Adding an Image to the Layout

How to:
Add an Image to a Layout
Reference:
Image Properties in the Properties Window

You can add an image to the layout. This is useful for including graphics such as a
company logo.
You can insert an image into your report layout and add a hyperlink to it. After you run your
report and click the image you can launch a URL or run a report the same way you can by
clicking a hyperlink or push button. For more information, see How to Add a Hyperlink to a
Push Button or an Image on page 5-27.

Note: When inserting images, images must be referenced from a specific directory
location. Links to images are not supported.

Procedure: How to Add an Image to a Layout


1. Do one of the following:
❏ Click the Insert image button.
❏ From the Insert menu, select Image.
The Get source file dialog box opens.
2. Navigate to the directory where the image is located using the Look in menu, then
select the image you want to add to the layout.
3. Click Open.
4. Optionally, change the image’s properties by adjusting the properties displayed in the
Properties tab of the Properties window. For details, see Image Properties in the
Properties Window on page 5-23.
Note: You can always return an image to its original size by right-clicking the image
and selecting Image properties from the pop-up menu, then selecting Restore size.

5-22 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Image Properties in the Properties Window


When an image is selected, the Properties tab in the Properties contains options that
control the properties of images.

Developing Reporting Applications With Graphical Tools 5-23


Creating a Report Page Layout

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Adding Text to the Layout

How to:
Add Text to a Layout
Reference:
Text Properties in the Properties Window

You can add text to the layout. This is useful for including headings for your Web page, or
adding directions or explanation for your report or graph.

Procedure: How to Add Text to a Layout


1. Insert text to the layout by doing one of the following:
❏ Click the Insert Text button.
❏ From the Insert menu, select Text.
A text object appears.
2. Replace the text with the text you want to appear in the layout.
3. Optionally, change the text’s properties by adjusting the properties displayed in the
Properties tab of the Properties window. For details, see Text Properties in the
Properties Window on page 5-25.

5-24 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Text Properties in the Properties Window


When text is selected, the Properties tab in the Properties window contains options that
control the properties of text in your report.

These properties adhere to the Microsoft standards. For more information on Microsoft
object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-25


Creating a Report Page Layout

Adding a Hyperlink to the Layout

How to:
Create a Hyperlink
Add a Hyperlink to a Push Button or an Image

You can create a hyperlink for your HTML page. A hyperlink can execute a report, link to a
URL, or open an HTML page. You can create a hyperlink in two ways:
❏ Insert a hyperlink. For details, see How to Create a Hyperlink on page 5-26.
❏ Add a hyperlink to a push button or image. For details, see How to Add a Hyperlink to a
Push Button or an Image on page 5-27.

Procedure: How to Create a Hyperlink


1. Do one of the following:
❏ Click the Insert Hyperlink button.
❏ Select Hyperlink from the Insert menu.
The Hyperlink Properties dialog box opens.

2. Enter the text you want to display as the hyperlink in the Display Text field.

5-26 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

3. Set the action of the hyperlink:


❏ To link to a URL, select URL in the Action section, and enter the URL in the Source
field.
❏ To open an HTML page, click select HTML in the Action section, and enter the
HTML page in the Source field.
❏ To execute an embedded procedure, select Embedded procedure and enter the
procedure name in the Source field, or click the browse button (...) to browse to
the procedure.
❏ To execute an external procedure, select External procedure and enter the
procedure name in the Source field, or click the browse button (...) to browse to
the procedure.
4. Optionally, direct the output to a specific location by selecting Window or Frame in the
Target Type field.
5. Specify a name for the target window or frame by selecting one of the default values
from the Target Name drop-down list or by typing the name of a new or existing window
or frame in the Target Name field. If you enter the name of a new frame, a frame
object will be added to the layout.
6. Click OK.
7. Execute the request and click the image to launch the web page of the URL Address
you typed in the Source field.

Procedure: How to Add a Hyperlink to a Push Button or an Image


To add a hyperlink to a push button or image, complete the following steps.
1. Right-click the push button or image, and select Create hyperlink. The Hyperlink
Properties dialog box opens.
2. Click the New icon to generate a new request and select URL from the Action drop-
down list.
3. Type a URL in the Source field.
4. Optionally, in the Target Type field, direct the output to a specific location by selecting
Window or Frame from the drop-down list.
5. In the Target Name field, specify a target window or frame by selecting one of the
default values from the drop-down list or by typing the name of a new or existing
window or frame. If you enter the name of a new frame, a frame object will be added
to the layout.
6. Click OK.

Developing Reporting Applications With Graphical Tools 5-27


Creating a Report Page Layout

7. Execute the request and click the image to launch the web page of the URL Address
you typed in the Source field.

Adding a Group Box to the Layout

How to:
Add a Group Box
Reference:
Group Box Properties in the Properties Window

A group box can be used to create a border around a group of objects, for example, forms
or reports and graphs.

Procedure: How to Add a Group Box


1. Insert a group box by doing one of the following:
❏ Click the Group box button.
❏ From the Insert menu, select Group box.
The cursor changes into a crosshair.
2. Click and drag the crosshair to create a group box and adjust it to the size you want.
A group box is created in the layout and assigned the name groupboxn, where n is a
number.
3. Optionally, change the group box’s properties by adjusting the properties displayed in
the Properties tab of the Properties window. For details, see Group Box Properties in
the Properties Window on page 5-29.

5-28 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Group Box Properties in the Properties Window


When a group box is selected, the Properties tab in the Properties window contains
options that control the properties of a group box.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-29


Creating a Report Page Layout

Adding a Push Button to the Layout

How to:
Create a Submit or Reset Button
Reference:
Push Button Properties in the Properties Window

You can add a push button to the layout. A push button allows you to submit a report, or
link to a URL or HTML form. This behavior is similar to a hyperlink.
For information on adding a hyperlink to a push button, see How to Add a Hyperlink to a
Push Button or an Image on page 5-27.

Procedure: How to Create a Submit or Reset Button


1. If the Submit or Reset button is deleted from the layout, a push button can be used to
replace the button. Insert a push button by doing one of the following:
❏ Click the Push button.
❏ From the Insert menu, select Push Button.
The cursor changes into a crosshair.
2. Click and drag the crosshair to create a push button and adjust it to the size you want.
A push button is created in the layout and assigned the name buttonn, where n is a
number.

5-30 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Push Button Properties in the Properties Window


When a push button is selected, the Properties tab in the Properties window contains
options that control the properties of your buttons.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-31


Using Form Controls to Supply Parameter Values

Using Form Controls to Supply Parameter Values


In this section:
Using a Text Box
Using a Text Area
Using a Drop-Down List
Using a List Box
Using Check Boxes
Using Radio Buttons
Using Tree Controls
Adding a Dynamic Calendar
Working With the Properties Window
Setting Form Controls for New Parameters
Working With the Parameters Tab in the Properties Window
Associating Form Controls With Parameters
Updating Parameters in the HTML Layout Painter With Report Painter Changes
Filtering Dynamic Parameter Values
Customizing Dynamic Parameters
Hidden Parameters
Automatically Populating Fields With Parameter Values
Adding an ALL Value
Reference:
Types of Form Controls

Form controls allow you to prompt users for a parameter value. When you create a
parameter as part of a report or graph, the HTML Layout Painter automatically adds a form
control, Submit button, and Reset button for the parameter to your layout, and the
parameter appears in the parameters box. You can also add a form control and then
associate it with a parameter.
When you delete a parameter in the Report Painter that was assigned a form control in the
HTML Layout Painter, you must delete the associated controls individually.

5-32 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Form controls, with the exception of a text box which does not supply a list of possible
values, can supply values to the user with a dynamic or static list of values:
❏ A dynamic list retrieves values from a specified data source when the request is run.
❏ A static list consists of a list of values you supply. These values do not change unless
you change them.
The properties of a form control, as well as the parameters associated with each form
control, can be controlled with the Properties tab and Parameters tab of the Properties
window. For details, see Working With the Properties Window on page 5-56 and Working
With the Parameters Tab in the Properties Window on page 5-58, respectively.

Reference: Types of Form Controls


Form controls can be single or multi-select.
Single-select form controls are:
❏ A text box. For details, see Using a Text Box on page 5-34.
❏ A drop-down list. For details, see Using a Drop-Down List on page 5-39.
❏ Radio buttons. For details, see Using Radio Buttons on page 5-46.
❏ A text area. For details, see Using a Text Area on page 5-36.
Multi-select form controls are:
❏ A list box. For details, see Using a List Box on page 5-42.
❏ Check boxes. For details, see How to Add a List Box on page 5-42.
❏ A tree control. For details, see Using Tree Controls on page 5-48.
The default control type for all single select parameters is a drop down list. The default
control type for all multi-select parameters is a list box.
You can change the type of form control using the Parameters tab. For details, see How to
Change the Type of Form Control Associated With a Parameter on page 5-59.
Note: Individual multi-select parameters must be designated as multi-select in the Report
Painter in order to process multiple values.

Developing Reporting Applications With Graphical Tools 5-33


Using Form Controls to Supply Parameter Values

Using a Text Box

How to:
Create a Text Box
Reference:
Text Box Properties in the Properties Window

A text box enables the user to enter a parameter’s value in a text entry field.

Procedure: How to Create a Text Box


1. Add a text box by doing one of the following:
❏ Click the Text Box button.
❏ From the Insert menu, select Text box.
The cursor changes to a crosshair.
2. Click and drag the crosshair to create a text box and adjust it to the size you want.
A text box is created in the layout and assigned the name editn, where n is a number.
3. To associate an existing parameter with the text box, click the Parameters tab of the
Properties window, find the row with the name of the text box (editn), click the
Parameter field in that row, click the down-arrow to the right of Unassigned at the edge
of the Parameter field, and select the parameter you want to associate with the text
box.
4. Optionally, enter a value for the text box. See Create a Static List of Values on page 5-
64.
5. Optionally, change the text box’s properties by adjusting the properties displayed in
the Properties tab of the Properties window. For details, see Text Box Properties in the
Properties Window on page 5-35.

5-34 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Text Box Properties in the Properties Window


When a text box is selected, the Properties tab in the Properties window contains options
that control the properties of your text box.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-35


Using Form Controls to Supply Parameter Values

Using a Text Area

How to:
Create a Text Area
Reference:
Text Area Properties and Events in the Properties Window

A text area is a single-select form control that enables you to enter multiple lines of text
that can be assigned to a single variable. The behavior is similar to a text box, but a user
is not restricted to entering just one line of text. For example, if you want to assign a
paragraph (multiple lines of text) to a variable that can be referenced by a procedure, you
can add the paragraph to a text area from the Parameters tab of the Properties window.
The following image shows the HTML Layout Painter, where you can access the text area
option in the Components toolbar.

5-36 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Create a Text Area

1. Click the Text Area button.

or
From the Insert menu, select Text Area.
The cursor changes to a crosshair.
2. Click a location on the layout page, drag the crosshair to create a rectangular text
area, release the left mouse button, and adjust the text area to the desired size.
A text area is created in the layout and assigned the name textarean, where n is a
number.
3. To associate values from an existing parameter with the text area, click the
Parameters tab in the Properties window, find the row with the name of the text area
(textarean), click the Parameter field in that row, click the down-arrow to the right of
Unassigned at the edge of the Parameter field, and select the parameter you want to
associate with the text area.
4. To associate static text values or dynamically retrieved data source values, select the
Static or Dynamic option in the Control Values section of the Parameters tab.
❏ Static - To add one or more lines of text as static values, type or paste text in the
area below the Static values label in the Parameters tab.
❏ Dynamic - To add dynamic values, select the Data source option to retrieve values
from a data source, or select the Procedure option to retrieve values from a
procedure. Click the browse button (...), select a source file from the Get source
file dialog box, and click Open. For the Data source option only, select a data field
from the tree structure displayed at the bottom of the Parameters tab.
5. Optionally, you can change the text area’s properties in the Properties tab of the
Properties window.

Developing Reporting Applications With Graphical Tools 5-37


Using Form Controls to Supply Parameter Values

Reference: Text Area Properties and Events in the Properties Window


When a text area is selected on the layout page and the Properties tab is selected in the
Properties window, properties are listed in the left column that can be controlled from the
right column. Selecting an option in the left column displays a description at the bottom of
the Properties window.
A text area is associated with the following properties:
❏ Access key
❏ Class identifier
❏ Columns
❏ Direction of text
❏ Disabled
❏ Inline style
❏ Language information
❏ Name
❏ Read only
❏ Rows
❏ Tab index
❏ Title
❏ Unique identifier
When a text area is selected on the layout page and the Events tab is selected within the
Properties tab in the Properties window, events are listed in the left column that can be
assigned an action from the right column.

5-38 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

A text area is associated with the following events:


❏ onblur
❏ onchange
❏ onclick
❏ ondblclick
❏ onfocus
❏ onkeydown
❏ onkeypress
❏ onkeyup
❏ onmousedown
❏ onmousemove
❏ onmouseout
❏ onmouseover
❏ onmouseup
❏ onselect

Optionally, you can change the text area’s properties and parameters. For details, see
Working With the Properties Window on page 5-56 and Working With the Parameters Tab in
the Properties Window on page 5-58.

Using a Drop-Down List

How to:
Add a Drop-Down List
Reference:
Drop-Down List Properties in the Properties Window

A drop-down list allows a user to select a single value from a list of supplied values. You
can use either a dynamic drop-down list, or a static drop-down list.

Procedure: How to Add a Drop-Down List


1. Add a drop-down list by doing one of the following:
❏ Click the drop-down list button.

Developing Reporting Applications With Graphical Tools 5-39


Using Form Controls to Supply Parameter Values

❏ From the Insert menu, select drop-down list.


The cursor changes to a crosshair.
2. Click and drag the crosshair to create a drop-down list, and adjust it to the size you
want.
A drop-down is created in the layout and assigned the name comboboxn, where n is a
number.
3. To associate an existing parameter with the drop-down list, click the Parameters tab of
the Properties window, find the row with the name of the drop-down list (comboboxn),
click the Parameter field in that row, click the down-arrow to the right of Unassigned at
the edge of the Parameter field, and select the parameter you want to associate with
the drop-down list.
4. In the Control Values section of the Parameters tab, select static or dynamic values
for the drop-down list. For details, see Associating Form Controls With Parameters on
page 5-58.
5. Optionally, change the drop-down list’s properties by adjusting the properties displayed
in the Properties tab of the Properties window. For details, see Drop-Down List
Properties in the Properties Window on page 5-41.

5-40 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Drop-Down List Properties in the Properties Window


When a drop-down List is selected, the Properties tab in the Properties window contains
options that control the properties of your drop-down list.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-41


Using Form Controls to Supply Parameter Values

Using a List Box

How to:
Add a List Box
Reference:
List Box Properties in the Properties Window

A list box allows a user to select single or multiple values at one time:
❏ A single select list allows the user to select only one value for each time a request is
run.
❏ A multi-select list allows the user to select multiple values by using the Ctrl key while
selecting values. In order to provide multiple values, the procedure must be set up to
accept multiple values.
List box values can be dynamic or static.

Procedure: How to Add a List Box


1. Add a list box by doing one of the following:
❏ Click the list box button.
❏ From the Insert menu, select List box.
The cursor changes to a crosshair.
2. Click and drag the crosshair to create a list box, and adjust it to the size you want.
A list box is created in the layout and assigned the name listboxn, where n is a
number.
3. To associate an existing parameter with the list box, click the Parameters tab of the
Properties window, find the row with the name of the list box (listboxn), click the
Parameter field in that row, click the down-arrow to the right of Unassigned at the edge
of the Parameter field, and select the parameter you want to associate with the list
box.
4. In the Control Values section of the Parameters tab, select static or dynamic values
for the list box. For details, see Associating Form Controls With Parameters on page 5-
58.
5. Optionally, change the list box’s properties by adjusting the properties displayed in the
Properties tab of the Properties window. For details, see List Box Properties in the
Properties Window on page 5-43.

5-42 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: List Box Properties in the Properties Window


When a list box is selected, the Properties tab in the Properties window contains
properties of your list box.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-43


Using Form Controls to Supply Parameter Values

Using Check Boxes

How to:
Add Check Boxes
Reference:
Check Box Properties in the Properties Window

Check boxes allow a user to select values from a list of values. Check box lists can allow
the user to select single or multiple values at one time:
❏ A single select list allows the user to select only one value each time a request is run.
❏ A multi-select list allows the user to select multiple values. In order to provide multiple
values, the procedure must be set up to accept multiple values.
Check box list values can be dynamic or static.

Procedure: How to Add Check Boxes


1. Add check boxes by doing one of the following:
❏ Click the Check box button.
❏ From the Insert menu, select Check box.
The cursor changes to a crosshair.
2. Click and drag the crosshair to create a check box list and adjust it to the size you
want.
A check box is created in the layout and assigned the name checkboxn, where n is a
number.
3. To associate an existing parameter with the check box, click the Parameters tab of the
Properties window, find the row with the name of the check box (checkboxn), click the
Parameter field in that row, click the down-arrow to the right of Unassigned at the edge
of the Parameter field, and select the parameter you want to associate with the check
box.
4. In the Control Values section of the Parameters tab, select static or dynamic values
for the check boxes. For details, see Associating Form Controls With Parameters on
page 5-58.
5. Optionally, check box list’s properties by adjusting the properties displayed in the
Properties tab of the Properties window. For details, see Check Box Properties in the
Properties Window on page 5-45.

5-44 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Check Box Properties in the Properties Window


When a check box is selected, the Properties tab in the Properties window contains
properties of your check box.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-45


Using Form Controls to Supply Parameter Values

Using Radio Buttons

How to:
Add Radio Buttons
Reference:
Radio Buttons Properties in the Properties Window

Radio buttons allow a user to select a single value from a list of supplied values. Radio
button values can be static or dynamic.

Procedure: How to Add Radio Buttons


1. Add radio buttons by doing one of the following:
❏ Click the Radio button.
❏ From the Insert menu, select Radio button.
The cursor changes to a crosshair.
2. Click and drag the crosshair to create a radio buttons list and adjust it to the size you
want.
A radio button placeholder is created in the layout and assigned the name radion,
where n is a number.
3. To associate an existing parameter with the radio buttons, click the Parameters tab of
the Properties window, find the row with the name of the radio buttons (radion), click
the Parameter field in that row, click the down-arrow that appears to the right of
Unassigned at the edge of the Parameter field, and select the parameter you want to
associate with the radio buttons.
4. In the Control Values section of the Parameters tab, select static or dynamic values
for the radio buttons. For details, see Associating Form Controls With Parameters on
page 5-58.
5. Optionally, change the radio buttons’ properties by adjusting the properties displayed
in the Properties tab of the Properties window. For details, see Radio Buttons
Properties in the Properties Window on page 5-47.

5-46 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Radio Buttons Properties in the Properties Window


When a radio button is selected, the Properties tab in the Properties window contains
options that control the properties of your radio buttons.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

Developing Reporting Applications With Graphical Tools 5-47


Using Form Controls to Supply Parameter Values

Using Tree Controls

How to:
Add a Tree Control to an HTML Page Using a Data Source
Add a Tree Control to an HTML Page Using an Existing Procedure
Reference:
Properties and Events for the Tree Control

You can show hierarchical data from a multi-dimensional data source (for example, SAP
BW), by using a tree structure in an HTML report. This feature is only available for
hierarchies that use the parent/child model; level hierarchies are not supported.
The behavior of the tree control is integrated with the parameter definition. If a parameter
is defined as a single value and that parameter is assigned to a tree control, the control
uses option buttons for each node in the hierarchy. If the paramater is defined as
MULTIPLE OR then the control uses check boxes for each node in the hierarchy, enabling
the user to select multiple nodes.

5-48 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

The following image shows the HTML Layout Painter, where you can access the Tree
Control option in the toolbar. It also shows the properties for the tree control.

Procedure: How to Add a Tree Control to an HTML Page Using a Data Source

1. In the HTML Layout Painter, click the Tree Control icon from the toolbar.
2. Click and drag your cursor over the canvas to select the area for the tree control.
3. Select the tree control and click the Parameters tab on the Properties window.
4. In the Control Values field, select Dynamic.
5. Select the Data Source option button and click the browse button (...) adjacent to the
text box.
6. Select a multi-dimensional data source and click OK.
7. Expand the Dimensions folder, a Dimension, and the Hierarchies folder.
8. Select a field from the hierarchy and add it to the Value field text box and the Display
field text box.

Developing Reporting Applications With Graphical Tools 5-49


Using Form Controls to Supply Parameter Values

Procedure: How to Add a Tree Control to an HTML Page Using an Existing Procedure
You can select an existing procedure to add to the tree control in an HTML report. When
you select a procedure, it should use fields from the parent/child hierarchy and be set up
as follows:
TABLE FILE file
SUM FST.dispfield
BY ParentUniqueField
BY UniqueField
BY datafield
ON TABLE PCHOLD FORMAT XML
END
where:
file
Is the name of the data source.
dispfield
Is the field whose values display in the tree control.
ParentUniqueField
Is the field that represents the parent for the parent/child hierarhcy (PROPERTY =
PARENT_OF).
UniqueField
Is the field that represents the unique IDs for the hierarchy members
(PROPERTY=UID).
datafield
Is the field whose values are passed as the parameter value.
After the procedure is set up, follow these steps:

1. In the HTML Layout Painter, click the Tree Control icon from the toolbar.
2. Click and drag your cursor over the canvas to select the area for the tree control.
3. Select the tree control and then click the Parameters tab on the Properties window.
4. In the Control Values field, select Dynamic.
5. Select the Procedure option button and click the browse button (...) adjacent to the
text box.
6. Select a procedure and click Open.

5-50 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Properties and Events for the Tree Control


The tree control has the following properties:
❏ Class identifier
❏ Direction of text
❏ Inline style
❏ Language information
❏ Title
❏ Unique Identifier
The tree control is associated with the following events:
❏ onclick
❏ ondblclick
❏ onkeydown
❏ onkeypress
❏ onkeyup
❏ onmousedown
❏ onmousemove
❏ onmouseout
❏ onmouseover
❏ onmouseup

Developing Reporting Applications With Graphical Tools 5-51


Using Form Controls to Supply Parameter Values

Adding a Dynamic Calendar

How to:
Set Calendar Properties
Example:
Returning a Range of Dates From a Procedure
Reference:
Calendar Properties in the Properties Window

Date parameters can utilize a built-in calendar control that allows users to select the
desired date or range of dates in a pop-up dynamic calendar. A procedure that is added to
or referenced in the HTML Layout Painter and contains date parameters will have a
Calendar control type available in the Properties tab of the Properties window.
When the Calendar control type is selected, a text box with a calendar icon will display in
the Design View of the Layout. The text box is the only control available for the calendar,
and the icon will always display to the right of the text box. The icon cannot be positioned
independently from the text box.
Note that when programmatically returning a date to the calendar, the date must be in a
FOCUS date format that specifies the complete date from the list of supported data types
in Calendar Properties.

5-52 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Set Calendar Properties


1. Right-click the calendar icon, and select Calendar Properties.
The following menu appears:

This menu allows the developer to set the range of dates available to the user at run
time. Available dates will be represented as an active hyperlink (blue and underlined)
and unavailable dates will be static (black without underlines).

Developing Reporting Applications With Graphical Tools 5-53


Using Form Controls to Supply Parameter Values

2. Select an option for setting the range of dates:


❏ Static. This option will set a static date range in which the developer will select a
start date and an end date using a pop-up calendar or by clicking the month, day,
or year from the controls. This setting is the default.
By default, the current date is selected and circled in red. As you scroll through
the calendar with the left/right arrows, the currently selected day will remain
highlighted for each month. Clicking a date will add that date to the control. Dates
can be selected by scrolling left to right, entering the month, day, and year as text,
or by selecting the month, day, and year from the drop-down list and spin boxes.
❏ Relative. This option allows the developer to set a specific number of days,
months, and years relative to the current date. The current date (at run time) will
always be the reference or starting point and the calendar will show a number of
days, months, and years relative to the current date. The range could be all in the
past (for example, five years prior to the current date) or all in the future (for
example, five years in the future).
❏ Dynamic. This option allows the developer to point to a procedure that returns a
range of dates. Clicking the browse button (...) allows the developer to choose a
preexisting procedure located in the current APP (local projects/data server) or
Domain (MR). The procedure must return two date values on the same data line in
XML format. The date values must be returned in a format that returns two digits
for the month and day, and four digits for the year, for example MM/DD/YY.

5-54 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Calendar Properties in the Properties Window


When a calendar is selected in the HTML Layout Painter, the Properties tab in the
Properties window contains properties of that calendar.

Click on a property to display a description at the bottom of the Properties window.

Developing Reporting Applications With Graphical Tools 5-55


Using Form Controls to Supply Parameter Values

Example: Returning a Range of Dates From a Procedure


The following returns the complete range of date values for HIREDATE.
-* File getdates.fex
TABLE FILE EMPDATA
SUM MIN.HIREDATE MAX.HIREDATE
ON TABLE PCHOLD FORMAT XML
END
The XML output is:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <fxf version="1.0" data="hold">
- <report records="41" lines="1" columns="2" rows="1">
<target format="" version="" type="" destination="HOLD" />
- <column_desc>
<col colnum="c0" fieldname="HIREDATE" alias="HDAT" datatype="date"
width="8" focus_format="YMD" description="" accept="" help_message=""
title="" within="" property="" reference="" valign="right" />
<col colnum="c1" fieldname="HIREDATE" alias="HDAT" datatype="date"
width="8" focus_format="YMD" description="" accept="" help_message=""
title="" within="" property="" reference="" valign="right" />
</column_desc>
- <table>
- <tr linetype="data" linenum="1">
<td colnum="c0" rawvalue="890301">890301</td>
<td colnum="c1" rawvalue="910513">910513</td>
</tr>
</table>
</report>
</fxf>

Working With the Properties Window

How to:
Move the Properties Window

The Properties window is a dockable window that consists of the following:


❏ A Properties tab that consists of the following components:
❏ A drop-down list that contains a list of all objects currently in the layout.
❏ An Events tab that list all events that can be assigned an action for an object.
❏ A Parameters tab that allows you to assign parameters to controls.
For details on the properties than can be set for an object, see the topic on that object.

5-56 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Move the Properties Window


To undock the Properties window, double-click the Properties title bar, then move the
window to the desired location in the layout.
To dock the Properties window, double-click the Properties title bar.

Setting Form Controls for New Parameters


When a report contains one or more new amper variable parameters created in the Report
Painter, the New Parameters dialog box appears when you save the report. You can set the
Control Type for each parameter prior to returning to the HTML Layout Painter. This
eliminates the need to select each parameter individually to edit the associated Control
Type setting using the Parameters tab of the Properties window.
The following image shows the New Parameters dialog box. For each parameter, you will
find Name and Type fields, a Create control check box, and a drop-down menu to set the
Control Type to either text box, calendar, list box, drop-down list, radio button, check box,
hidden, text area, or tree control. The Type field is set to Unresolved unless the amper
variable parameter is created with the Dialogue Manager using the -DEFAULT command
(which sets the Type field to Default).

Developing Reporting Applications With Graphical Tools 5-57


Using Form Controls to Supply Parameter Values

The Parameter grouping options menu in the New Parameters dialog box provides two
options for the placement of the form controls associated with new amper variable
parameters created in the Report Painter. Select Do not create a form to insert the form
controls for each of the new parameters in separate locations on the HTML page. Select
New form element to insert the form controls for all of the new parameters inside one
form element you can position anywhere on the HTML page. This form element also
contains submit (run) and reset buttons.

Working With the Parameters Tab in the Properties Window


The Parameters tab is a component of the Properties window. The Parameters tab
consists of the following components:
❏ The top pane contains information on the controls in the layout.
❏ The bottom pane contains information on parameter values.
For more detailed information, see Associating Form Controls With Parameters on page 5-
58.

Associating Form Controls With Parameters

How to:
Change the Type of Form Control Associated With a Parameter
Unassign or Reassign a Parameter to an Existing Form Control
Create a Static List of Values
Select a Dynamic List of Values
Reference:
Parameters Tab in the Properties Window (Static Values)
Parameters Tab in Properties Window (Dynamic Values)

When a parameter is created in the Report Painter, a text box is automatically added to
the layout and associated with the parameter. However, you can change the form control
and form control type associated with the parameter.

5-58 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Change the Type of Form Control Associated With a Parameter
1. In the Parameters tab, select the parameter name listed in the Parameter column.
2. Select the form control you want to use from the drop-down list in the Control Type
column to the right, and your change is reflected in the report layout.

Procedure: How to Unassign or Reassign a Parameter to an Existing Form Control


1. In the Parameters tab, select the desired form control in the Control Name column.
2. To the right of the desired form control, click the Parameter field, then select the down
arrow that appears at the right edge of the Parameter field.
All existing parameters are shown in the drop-down list, along with Unassigned.
3. Select an existing data field to assign the parameter to, or select Unassigned to
remove the association to the control.
Note: Unassigned parameters may result in no data returned for the request. An
unassigned parameter must have a default value assigned in the underlying
WebFOCUS code.

Developing Reporting Applications With Graphical Tools 5-59


Using Form Controls to Supply Parameter Values

Reference: Parameters Tab in the Properties Window (Static Values)

The Parameters tab contains the following fields and options when Static is selected in
the Control Values section:
Control Name
Contains the name of the form control associated with each parameter.
Parameter
Contains the name of each parameter in the current procedure.
Unassigned - Specifies the parameter is not associated with a form control.

5-60 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Control Type
Contains the type of form control associated with each parameter. The options are:
Text box
Calendar
List box
Drop-down list
Radio button
Check box
Hidden - Hides the control type in the layout.
Text Area
Tree Control
Control Values
Determines whether parameter values are obtained from a static or dynamic list.
Static - Uses a static list of parameter values you supply. A list of static values can
also be assigned in the Report Painter.
Static values
Is a list of supplied values for a static list. For more information, see Create a Static
List of Values on page 5-64.
Value - Is the value to be passed to the selected parameter.
Display - Option for multi-select controls to display values using customized text.
Selected - Is the value to act as the default value. If the form control is multi-select,
more than one value can be selected.
New - Creates a new parameter value. For information on creating new parameter
values, see How to Create a Static List of Values on page 5-64.
Delete - Deletes a supplied parameter value from the list.
Move Up - Moves the selected value up in the list.
Move Down - Moves the selected value down in the list.

Developing Reporting Applications With Graphical Tools 5-61


Using Form Controls to Supply Parameter Values

Reference: Parameters Tab in Properties Window (Dynamic Values)

The Parameters tab contains the following fields and options when Dynamic is selected in
the Control Values section:
Control Name
Contains the name of the form control associated with each parameter.

5-62 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Parameter
Contains the name of each parameter in the current procedure.
Unassigned - Specifies the parameter is not associated with a form control.
Control Type
Contains the type of form control associated with each parameter. The options are:
Text box
Calendar
List box
Drop-down list
Radio button
Check box
Hidden - Hides the control type in the layout.
Text Area
Tree Control
Control values
Determines whether parameter values are obtained from a static or dynamic list.
Dynamic - Uses a list of values retrieved from a selected data source when the
request is executed. This is the default if you use an Accept clause in a Master File to
create an amper variable parameter within a procedure. For more information, see
Select a Dynamic List of Values on page 5-64.
Data Source
Is the data source from which the values will be retrieved.
Procedure
Is the procedure that will be called.
Value field
Is the data source field from which the values will be retrieved.
Display field
Is the text that represents the parameter value in the form control the user views.
Add “ALL” Option
Adds the option to select ALL data source values to the control. Alternate text can be
substituted for “ALL” using the text field to the right. For more information, see Adding
an ALL Value on page 5-73.

Developing Reporting Applications With Graphical Tools 5-63


Using Form Controls to Supply Parameter Values

Limit values returned


Indicates that a specific number of field values will be retrieved from the data source.
The specific number of fields is selected with the menu to the right.

Procedure: How to Create a Static List of Values


Do the following in the Parameters tab:
1. In the Control Values section, select Static.
2. Click the New icon, and enter parameter value information in the Static values section:
a. In the Value column, enter the value to be passed to the selected parameter.
b. In the Display column, enter the text that represents the parameter value in the
form control the user views.
c. In the Selected column, check the box for the value you want to be selected by
default. If the form control is multi-select, more than one value can be selected.
3. Repeat Step 2 until the list contains all of the values you want to include.
4. Optionally, click the Delete button to eliminate any values, and the up and down arrows
to rearrange the order of the values.

Procedure: How to Select a Dynamic List of Values


Dynamic values are available by default if a data field used in the procedure is associated
with the selected form control. The Parameter field at the top of the Parameters tab
displays this data field (or displays Unassigned if there is no associated parameter).
To add or select a different dynamic list of values to populate a form control, do the
following in the Parameters tab of the Properties window:
1. Select the Dynamic option in the Control Values section.
2. To find the desired source file you want to retrieve values from, select the Data source
option to retrieve values from a .mas file, or select the Procedure option to retrieve
values from a .fex file. Click the browse button (...), select a source file from the Get
source file dialog box that opens, and click Open.
For the Data source option only, select the data field that has the desired values from
the tree structure displayed at the bottom of the Parameters tab. The data field you
select will be populated in the Value field.
3. Optionally, type a new name in the Display field for the data field populated in the
Value field.
4. Optionally, select Limit values returned, and select or type the number of field values
you want to retrieve from the data source in the box to the right of this option.

5-64 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Updating Parameters in the HTML Layout Painter With Report Painter


Changes
When using the HTML Layout Painter, if changes are made to parameter values in the
Report Painter, you may want to update the values in the HTML Layout Painter with those
entered in the Report Painter.

Filtering Dynamic Parameter Values

How to:
Filter Parameter Values
Reverse the Order of Chained Parameter Values
Remove a Parameter from the Chain
Cache Parameter Data

Use the chain feature to associate two or more related parameters. When you chain
parameters together, chained dynamic values are filtered as selections are made to each
parameter control. For example, if you chain the PLANT parameter to the STATE parameter,
only PLANT values for the currently selected STATE parameter will be available instead of
all the plants in the data source. Each time a selection is made, all chained parameters
will be dynamically updated. The chain feature also allows you to add, remove, and
reverse the order of parameters in the chain. See other topics in this section for details.

Procedure: How to Filter Parameter Values


1. In the Control Values section of the Parameters tab, click the Dynamic radio button.
2. Press the Shift key and then click two or more parameters to select them
simultaneously and activate the chain feature buttons on the layout toolbar.

3. Click the Add to chain button. The parameters you selected are labeled with
numbers to indicate the order in which they will be chained when you run your report.

You can also reverse the order of parameters in the chain. See How to Reverse the
Order of Chained Parameter Values on page 5-66 for details.

Developing Reporting Applications With Graphical Tools 5-65


Using Form Controls to Supply Parameter Values

Procedure: How to Reverse the Order of Chained Parameter Values

1. Click the Chain order button in the layout toolbar.


2. Click the parameter you want to display first in the chain.

You can continue to reverse the order in the chain by clicking the numeric labels on the
chained parameters. If you would like to see the numeric labels on the chained
parameters, select the Chain order button. Double-click a parameter to designate it as the
first parameter in the chain.

Procedure: How to Remove a Parameter from the Chain


1. Click the parameter you want to remove from the chain.

2. Click the Delete chain button in the layout toolbar.


3. Press the shift key and click the remaining chained parameters.

4. Click the Chain order button in the layout toolbar. You will no longer see a numeric
label on the parameter that you removed.

5-66 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Cache Parameter Data


When creating a chained set of parameters you also have the option to "cache" the
parameter data. Running a cached version of the parameter data makes the selection of
parameters much quicker because the browser retrieves all the data initially from the data
source and caches it on the client. By default, chained parameter data is non-cached,
meaning every selection will cause the parameter data to be reloaded from the server.
However, once you make a selection, the values are cached. The next time you make that
selection the cached data will be used.
1. Click a chained parameter in the layout.
2. Right-click the parameter and click the Cache run time data option.

You may select other chained parameters and enable the Cache run time data option.
Tip: If you decide to deactivate the option and revert back to using non-cached data, right-
click the chained parameter and click the check mark next to the Cache run time data
option.

Developing Reporting Applications With Graphical Tools 5-67


Using Form Controls to Supply Parameter Values

Customizing Dynamic Parameters

Example:
Retrieving Dynamic Parameter Values With One Value
Retrieving Dynamic Parameter Values With Two Values
Retrieving Values for Chained Variables With Caching Disabled
Retrieving Chained Variable Values With Caching Enabled

You have the option to allow customized retrieval of dynamic parameter values. By using a
custom procedure, you can use the FOCUS language to utilize temporary HOLD files,
filtering, etc. This allows the HTML Layout Painter to better integrate with a multitude of
large and/or proprietary data sources that may require unique retrieval methods. The
procedure must meet the following criteria:
❏ The procedure must return a name and value pair for each parameter value that will
populate the list. The first value is the submission value which is passed to the form
control when the user clicks the Submit button. The second value is the display value
which is what the user will see in the control. These two values can be the same or
different.
❏ The procedure must return the two data values on a single data line in XML format
(PCHOLD FORMAT XML).
Note: Different parameters in the same procedure can use both this option and the data
source method.
For chained parameters, there are two options based on whether caching is enabled:
❏ By default, caching of parameter values in not enabled. Each parameter control must
be mapped to its own procedure and the developer is responsible for writing filters or
WHERE criteria to properly filter the hierarchy of controls.
❏ If caching is enabled for the chained parameters, a single procedure can be used to
populate the controls of the chained variables. In this case, the HTML Layout Painter
writes the WHERE criteria.
To enable caching, click the Chain Order icon and right-click one of the chained
parameters.

5-68 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Example: Retrieving Dynamic Parameter Values With One Value


The following example shows the same value being used for the submission value and
display value.
TABLE FILE GGSALES
PRINT DST.PRODUCT
BY PRODUCT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END
The XML output is:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <fxf version="1.0" data="hold">
- <report records="4317" lines="10" columns="2" rows="10">
<target format="" version="" type="" destination="HOLD" />
- <column_desc>
<col colnum="c0" fieldname="PRODUCT" alias="E01" datatype="char"
width="16" focus_format="A16" description="Product name" accept=""
help_message="" title="Product" within="" property="" reference=""
valign="left" />
<col colnum="c1" fieldname="PRODUCT" alias="E02" datatype="char"
width="16" focus_format="A16" description="Product name" accept=""
help_message="" title="Product" within="" property="" reference=""
valign="left" />
</column_desc>
- <table>
- <tr linetype="data" linenum="1">
<td colnum="c0">Biscotti</td>
<td colnum="c1">Biscotti</td>
</tr>
- <tr linetype="data" linenum="2">
<td colnum="c0">Capuccino</td>
<td colnum="c1">Capuccino</td>
</tr>
- <tr linetype="data" linenum="3">
<td colnum="c0">Coffee Grinder</td>
<td colnum="c1">Coffee Grinder</td>
</tr>
- <tr linetype="data" linenum="4">
<td colnum="c0">Coffee Pot</td>
<td colnum="c1">Coffee Pot</td>
</tr>

Developing Reporting Applications With Graphical Tools 5-69


Using Form Controls to Supply Parameter Values

Example: Retrieving Dynamic Parameter Values With Two Values


The following example shows two different field values being used for the submission
value and display value. In this case, PRODUCT (Product Description) is used for the
display value and PCD (Product Code) is used as the submission value.
TABLE FILE GGSALES
PRINT DST.PRODUCT
BY PCD
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END
The XML output is:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <fxf version="1.0" data="hold">
- <report records="4317" lines="10" columns="2" rows="10">
<target format="" version="" type="" destination="HOLD" />
- <column_desc>
<col colnum="c0" fieldname="PCD" alias="E01" datatype="char" width="4"
focus_format="A04" description="Product Identification code (for sale)"
accept="" help_message="" title="Product ID" within="" property=""
reference="" valign="left" />
<col colnum="c1" fieldname="PRODUCT" alias="E02" datatype="char"
width="16" focus_format="A16" description="Product name" accept=""
help_message="" title="Product" within="" property="" reference=""
valign="left" />
</column_desc>
- <table>
- <tr linetype="data" linenum="1">
<td colnum="c0">C141</td>
<td colnum="c1">Espresso</td>
</tr>
- <tr linetype="data" linenum="2">
<td colnum="c0">C142</td>
<td colnum="c1">Latte</td>
</tr>
- <tr linetype="data" linenum="3">
<td colnum="c0">C144</td>
<td colnum="c1">Capuccino</td>
</tr>
Note: The procedure does not have to follow this FOCUS syntax exactly, but the end result
must be two values per data line in XML format.

5-70 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Example: Retrieving Values for Chained Variables With Caching Disabled


In the following procedures, there are three parameters (REGION, ST, CITY). Caching is
disabled, so each parameter control must be mapped to its own procedures.
Procedure 1 1 (REGION)
TABLE FILE GGSALES
PRINT DST.REGION
BY REGION
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END
Fex 2 (ST)
TABLE FILE GGSALES
PRINT DST.ST
BY ST
WHERE REGION EQ '&REGION';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END
Fex 3 (CITY)
TABLE FILE GGSALES
PRINT DST.CITY
BY CITY
WHERE REGION EQ '&REGION';
WHERE ST EQ '&ST';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END

Example: Retrieving Chained Variable Values With Caching Enabled


In the following example, caching is enabled, so a single procedure is used to populate
the controls.
TABLE FILE GGSALES
PRINT DST.REGION
DST.ST
DST.CITY
BY REGION
BY ST
BY CITY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END

Developing Reporting Applications With Graphical Tools 5-71


Using Form Controls to Supply Parameter Values

The XML output is:


- <table>
- <tr linetype="data" linenum="1">
<td colnum="c0">Midwest</td>
<td colnum="c1">IL</td>
<td colnum="c2">Chicago</td>
<td colnum="c3">Midwest</td>
<td colnum="c4">IL</td>
<td colnum="c5">Chicago</td>
</tr>

Hidden Parameters
You can select a HIDDEN control type in the HTML Layout Painter. This allows parameter
name value pairs to be passed in the form control without the user seeing them. This
option can be chosen in the Parameters tab in the Control Type column. When this control
type is selected, the current control assigned to the parameter will be removed. The value
of the parameter can be entered in the Value column of the Parameters tab.

Automatically Populating Fields With Parameter Values

Example:
Automatically Populating Fields With Parameter Values

When the name of a dynamic parameter matches a corresponding field name in a data
source, the HTML Layout Painter automatically populates the field name for the parameter.
The data source is populated by a default based on the first data source specified by a
TABLE FILE or GRAPH FILE command. The data source field is populated for the Value and
Display field controls in the Parameters tab. This generates a “run ready” Layout report as
long as the parameter names match the field names.

Example: Automatically Populating Fields With Parameter Values


When the following report request is called from the HTML Layout Painter with a push
button control, the Parameters tab is automatically populated, and the dynamic parameter
is ready to run.
TABLE FILE GGSALES
SUM UNITS
BY PRODUCT
WHERE ( PRODUCT EQ '&PRODUCT.Product:.' );
END

5-72 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Adding an ALL Value


The ALL feature allows developers to automatically add an ALL value to a list of parameter
values. An ALL value does the following:
❏ For dynamic parameters, the ALL feature sends a value of FOC_NONE to the reporting
server alerting the server to bypass or ignore the parameter altogether. (Ignoring the
parameter would return all values in the data source.)
An example of dynamic parameters associated with the ALL value are shown in the
following image of the Parameters tab in the Properties dialog box:

Developing Reporting Applications With Graphical Tools 5-73


Using Form Controls to Supply Parameter Values

❏ With static parameters, the ALL value typically uses JavaScript to return all of the
values displayed in the list. This prevents the user having to select every value in the
list manually. When using the ALL feature with static parameters, you can select from
the following options:
❏ Add ignore value. This options sends FOC_NONE to the server at run time and is
intended for use with complex applications.
❏ Add everything value. This option uses JavaScript to send every value present in
the parameter list to the server at run time. The Add everything value option is only
available with a Multiselect OR variable type.
An example of static parameters associated with the ALL value are shown in the
following image of the parameters tab in the Properties dialog box:

5-74 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

When the options are added to the Value list, the display text can be customized, but the
value cannot be changed.
Note: Sending FOC_NONE to a compound WHERE statement will result in the entire
WHERE criteria being ignored. Therefore, when working with multiple parameters that may
be chained together, each parameter should be created in an individual WHERE statement
as follows:
WHERE ( REGION EQ &REGION.(OR(Midwest,Northeast)).Region:. );
WHERE ( ST EQ &STATE.(OR(CA,CT)).State:. );
WHERE ( CITY EQ &CITY.(OR(Atlanta,Boston)).City:. );

Supplying Parameter Values to External Repor ts


How to:
Supply Parameter Values to External Reports With a Push Button
Supply Parameter Values to an External Report With an Image
Supply Parameter Values to an External Report With a Hyperlink
Example:
Supplying Parameter Values to Multiple External Reports

You can supply parameters to external reports the same way you apply them to reports
created with the Report Painter. The report layout can also contain multiple reports
associated with a common set of parameters. Launch mechanisms such as a push
button, hyperlink, or image can be associated to external reports that contain different
sets of parameters. You can also update and target parameters for an external report to a
frame or window directly within your report layout.
Before you can supply parameter values to an external report, you must create a hyperlink
to the report and associate a launch mechanism to it. After you associate a launch
mechanism, such as a push button, hyperlink, or image, to the external report, the report
layout is populated with the parameters.

Developing Reporting Applications With Graphical Tools 5-75


Supplying Parameter Values to External Reports

Procedure: How to Supply Parameter Values to External Reports With a Push Button
In this procedure you will create a push button to launch an external report and target the
output to a window.
1. From the Insert menu, select Push Button.
The cursor changes into a crosshair.
2. Click and drag the crosshair to create a push button and a djust it to the size you
want.
3. Right-click the button and select Create hyperlink.
The Hyperlink Properties dialog box opens.
4. To set the action of the hyperlink to execute an external report, select the New icon,
then select External procedure from the Action drop-down list.
5. Enter the external report’s procedure name in the Source field, or click the browse
button (...) to browse to the procedure.
6. Optionally, direct the output to a specific location by selecting Window or Frame in the
Target Type field.
7. Specify the text you want to display as the hyperlink in the Target Name field, or select
one of the default values from the Target Name drop-down list.
8. Click OK.
The parameters for the report are automatically added to objects in the layout and
displayed in the Parameters tab.
9. From the File menu, click Run.
10. Click the push button to view the external report.

5-76 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

The report opens in a separate window as you specified in the Hyperlink Properties
dialog box for that push button.

Procedure: How to Supply Parameter Values to an External Report With an Image


In this procedure you will insert an image that will launch an external report when you click
it. You will target the output to a window.
1. From the Insert menu, select Image.
The cursor changes into a crosshair.
2. Click and drag the crosshair to position the image.
The Get source file dialog box opens.
3. Navigate to the image using the Look in menu, select the image, and click Open.
4. Adjust the image to the desired size and location.
5. Right-click the image and select Create hyperlink.
The Hyperlink Properties dialog box opens.

Developing Reporting Applications With Graphical Tools 5-77


Supplying Parameter Values to External Reports

6. To set the action of the hyperlink to execute an external report, select the New icon,
then select External procedure from the Action drop-down list.
7. Enter the external report’s procedure name in the Source field, or click the browse
button (...) to browse to the procedure.
8. Direct the output to a window by selecting Window in the Target Type field.
9. Specify the text you want to display as the hyperlink in the Target Name field, or select
one of the default values from the Target Name drop-down list.
10. Click OK.
The parameters for the report are automatically added to objects in the layout and
displayed in the Parameters tab.
11. From the File menu, click Run.
12. Click the image to view the external report.
The report opens in the window you specified in the Hyperlink Properties dialog box for
that hyperlink.

5-78 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Supply Parameter Values to an External Report With a Hyperlink


In this procedure, you will create a frame and target report output from an external report
to it. You will also create a hyperlink to launch the external report.
1. From the Insert menu, select Frame. Click and drag the crosshair to create a frame
and adjust it to the size you want. Enter a name for the frame by double-clicking the
Name field in the Properties tab of the Properties window.
2. From the Insert menu, select Hyperlink. Click and drag the crosshair to create a
hyperlink and adjust it to the size you want.
The Hyperlink Properties dialog box opens.
3. To set the action of the hyperlink to execute an external report, select the New icon,
then select External procedure from the Action drop-down list.
4. Enter the external report’s procedure name in the Source field, or click the browse
button (...) to browse to the procedure.
5. Direct the output to the frame you inserted by selecting Frame in the Target Type field
and entering the name of the frame you created.
6. Specify the text you want to display as the hyperlink in the Target Name field, or select
one of the default values from the Target Name drop-down list.
7. Click OK.
The parameters for the report are automatically added to objects in the layout and
displayed in the Parameters tab.
8. From the File menu, click Run.
9. Click the hyperlink to view the external report.

Developing Reporting Applications With Graphical Tools 5-79


Supplying Parameter Values to External Reports

The report opens in the frame you specified in the Hyperlink Properties dialog box for
that hyperlink.

Example: Supplying Parameter Values to Multiple External Reports


In this example, you will add two reports to a layout. You will associate a push button to
one report and target the output to a window. You will associate a hyperlink to the second
report and target the output to a frame.
1. From the Insert menu, select Push Button.
The cursor changes into a crosshair.
2. Click and drag the crosshair to create a push button and adjust it to the size you want.
A push button is created in the layout and assigned the name buttonn, where n is a
number.
3. Right-click the button, and select Create hyperlink.
The Hyperlink Properties dialog box opens.
4. Set the action of the hyperlink to execute a report by clicking the New icon and
selecting External Report from the Action drop-down list.
5. Enter the external report’s procedure name in the Source field, or click the browse
button (...) to browse to the procedure.
6. In the Target Type field, select Window from the drop-down list.
7. In the Target Name field, select _blank frames from the drop-down list.

5-80 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

8. Click OK.
The parameters for the first report are automatically added to objects in the layout
and displayed in the Parameters tab.
9. From the Insert menu, select Frame. Click and drag the crosshair to create a frame
and adjust it to the size you want. Enter a name for the frame in the name field of the
frame’s Properties dialog box.
10. From the Insert menu, select Hyperlink. Click and drag the crosshair to create a
hyperlink and adjust it to the size you want.
11. Right-click the button, and select Create hyperlink.
The Hyperlink Properties dialog box opens.
12. Set the action of the hyperlink to execute a report by clicking the New icon and
selecting External Report from the Action drop-down list.
13. Enter the external report’s procedure name in the Source field, or click the browse
button (...) to browse to the procedure.
14. In the Target Type field, select Frame from the drop-down list.
15. In the Target Name field, select the name of the frame you created.
16. Click OK.
17. From the File menu, select Run.
18. Click the push button to view the first external report.

Developing Reporting Applications With Graphical Tools 5-81


Supplying Parameter Values to External Reports

The report opens in a separate window as you specified in the Hyperlink Properties
dialog box for that push button.

19. Click the hyperlink to view the second external report. The report opens in the frame
you specified in the Hyperlink Properties dialog box for that hyperlink.

5-82 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Styling Your Layout


In this section:
Adding a CSS or Script to the Layout
Setting HTML Page Properties
How to:
Add a CSS or Script to the Layout
Reference:
HTML Page Properties in the Properties Window

When you create an HTML page in the HTML Layout Painter, the objects in the layout will
display in your browser using the browser’s default styles. You can customize the
appearance of your HTML page by adding a theme or template. A template can be any
HTML file containing styling information and other elements. A theme is a template
accessed through Microsoft FrontPage.

Adding a CSS or Script to the Layout


Cascading Style Sheets (CSS) or scripts can be added to your layout to determine the look
of the Web page. This is a good way to quickly apply corporate styling to your layout or to
assign global styling to a layout. It is also an easy method of assigning default styling to
all elements in the entire layout with one action. Styling included in a CSS or script will
display only in Preview mode.

Procedure: How to Add a CSS or Script to the Layout


1. From the Insert menu, select CSS/Scripts.
The Insert Web Files dialog box opens.
2. Click the New icon and navigate to the directory in which your CSS or script resides,
select the file, and click Open.
3. Add additional files if desired. Click OK to add the specified files.

Setting HTML Page Properties


You can set properties for the HTML page you create in the HTML Layout Painter in the
Properties tab of the Properties window.

Developing Reporting Applications With Graphical Tools 5-83


Styling Your Layout

Properties set for the HTML page will be inherited by most objects added to the layout.
Once a style has been changed for an object in the layout, it cannot be styled with a
template or theme. It is recommended that global styling of the HTML page be set before
properties are set for individual objects.

Reference: HTML Page Properties in the Properties Window


When the background of a report is selected, the Properties tab in the Properties window
contains options that control the body of the HTML page.

Click on a property to display a description of the selected property at the bottom of the
Properties window. These properties adhere to Microsoft standards. For more information
on Microsoft object properties, see your Microsoft documentation.

5-84 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Specifying Browser Defaults with Style Composer


How to:
Access the Style Composer
Reference:
Specifying Font Styles Using the Style Composer
Specifying Background Properties Using the Style Composer
Specifying Text Styles Using the Style Composer
Specifying Position Mode Using the Style Composer
Specifying Layout Styles Using the Style Composer
Specifying Margin Styles Using the Style Composer
Specifying List Styles Using the Style Composer
Specifying Interface Effects Using the Style Composer

You can use the Style Composer to control default settings for font, background
properties, position mode, flow control, margins, list styles, and visual effects.
Note: On the following pages, the images of the Style Composer windows show many
blank fields. You may actually see the words “Not Set” populated in these blank fields
when viewing these Style Composer windows in Developer Studio.

Developing Reporting Applications With Graphical Tools 5-85


Specifying Browser Defaults with Style Composer

Procedure: How to Access the Style Composer


To access the Style Composer, complete the following steps.
1. Right-click the background of an HTML page in the HTML Layout Painter.
2. From the pop-up menu, select Style.
The Style Composer window opens.

5-86 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Specifying Font Styles Using the Style Composer


To specify the font styles that will be used in the browser for your HTML report, make your
selections in the Font window of the Style Composer.
The Font window of the Style Composer is comprised of the following elements:
Font name
Determines the font displayed in a browser. You can specify:
Family - launches the Font Picker dialog box
System Font
Font attributes
Determines the attributes of the font displayed in a browser. The options include:
Color
Italics
Small Caps
Size
Determines the size of the font displayed in a browser. The options include:
Specific
Absolute
Relative
Bold
Determines whether the font is displayed as bold in a browser. The options include:
Absolute
Relative
Effects
Determines whether the font effects displayed in a browser. The options include:
None
Underline
Strikethrough
Overline
Capitalization

Developing Reporting Applications With Graphical Tools 5-87


Specifying Browser Defaults with Style Composer

Reference: Specifying Background Properties Using the Style Composer


To specify the background styles that will be used in the browser for your HTML report,
make your selections in the Background window of the Style Composer.

The Background window of the Style Composer is comprised of the following elements:
Background color
Determines the font displayed in a browser. You can specify:
Color
Transparent

5-88 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Background image
Determines the properties of the background image displayed in a browser. The
options include:
Image
Tiling
Scrolling
Position (Horizontal and Vertical)
Do not use background image

Reference: Specifying Text Styles Using the Style Composer


To specify the text styles that will be used in the browser for your HTML report, make your
selections in the Text window of the Style Composer.

Developing Reporting Applications With Graphical Tools 5-89


Specifying Browser Defaults with Style Composer

The Text window of the Style Composer is comprised of the following elements:
Alignment
Determines the alignment of a text. You can specify:
Horizontal
Vertical
Justification
Spacing Between
Determines the spacing. You can specify spacing between the following text elements:
Letters
Lines
Text Flow
Determines the flow of the text. You can specify:
Indentation
Text Direction

5-90 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Specifying Position Mode Using the Style Composer


To specify the position mode that will be used in the browser for your HTML report, make
your selections in the Position window of the Style Composer.

The Position window of the Style Composer is comprised of the following elements:
Position Mode
From which you can specify:
Position in normal Flow
Offset from normal flow
Absolutely position

Developing Reporting Applications With Graphical Tools 5-91


Specifying Browser Defaults with Style Composer

Height
Width
When Absolutely Position is selected, you can specify the following position indicators in
the measurements you select:
Top
Left
Z-Index (optional). Sets or retrieves the stacking order for absolute or relatively positioned
objects.

Reference: Specifying Layout Styles Using the Style Composer


To specify the layout styles that will be used in the browser for your HTML report, make
your selections in the Layout window of the Style Composer.

5-92 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

The Layout window of the Style Composer is comprised of the following elements:
Flow Control
From which you can specify:
Visibility
Allow Text to Flow
Display
Allow Floating Objects
Content
From which you can specify:
Overflow
Clipping
From which you can specify whether or not to clip the layout from the following
positions:
Top
Bottom
Left
Right
Printing page breaks
From which you can specify:
Before
After

Developing Reporting Applications With Graphical Tools 5-93


Specifying Browser Defaults with Style Composer

Reference: Specifying Margin Styles Using the Style Composer


To specify the margin styles that will be used in the browser for your HTML report, make
your selections in the Margins window of the Style Composer, which is shown in the
following image.

The Edges window of the Style Composer is comprised of the following elements:
Margins
From which you can specify:
Top, Bottom, Left, Right margins
Padding
From which you can specify:
Top, Bottom, Left, Right padding

5-94 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Borders
From which you can specify:
Select the edge to be changed
Style
Width
Color
Note: Borders are displayed as a single solid line in the Style Composer preview window,
regardless of whether you select a single or double line border. Borders are accurately
displayed in the Style Composer Design View and in the HTML output of an application.

Reference: Specifying List Styles Using the Style Composer


To specify the list styles that will be used in the browser for your HTML report, make your
selections in the Lists window of the Style Composer.

Developing Reporting Applications With Graphical Tools 5-95


Specifying Browser Defaults with Style Composer

The Lists window of the Style Composer is comprised of the following elements:
Lists
From which you can specify:
Bulleted
Unbulleted
Bullets
From which you can specify:
Style
Position
Custom bullet

5-96 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Reference: Specifying Interface Effects Using the Style Composer


To specify the interface styles and visual effects that will be used in the browser for your
HTML report, make your selections in the Other window of the Style Composer.

The Other window of the Style Composer is comprised of the following elements:
User Interface
From which you can specify:
Cursor
Tables
From which you can specify:
Borders
Layout

Developing Reporting Applications With Graphical Tools 5-97


Laying Out Objects With the HTML Layout Painter

Laying Out Objects With the HTML Layout Painter


In this section:
Setting Relationships Between Objects
How to:
Set Object Size
Set the Distance Between Objects
Break Relationships
Reference:
Layout Toolbar

You can change the size and position of objects in your layout in the following ways:
❏ Set relationships between objects. This is done by setting relationships between
objects and a controlling, or dominant, object. The controlling object is the last object
selected. For details, see Setting Relationships Between Objects on page 5-98.
❏ Click and drag with your mouse.

Setting Relationships Between Objects


You can set relationships between underlying objects and a controlling, or dominant,
object. The controlling object is the last object or placeholder selected. You can use these
relationships to set properties of the selected objects according to the controlling object.
Any object on the HTML page layout can be the controlling object.
You can set the following types of relationships:
❏ Relationships that maintain a distance between objects. This is useful since a report
or graph may take up more or less room when your procedure is run than is accounted
for in the layout. When setting relationships between objects in this way, you should
select the corners of the objects that are closest to each other. This will ensure that
the reports do not overlap if either report takes up more room than anticipated.
❏ Relationships that affect the positioning of objects. This allows you to ensure that
objects remain aligned regardless of a change in size or position of one of the objects
and that objects remain the same size even when an object’s size is changed.

5-98 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Procedure: How to Set Object Size


1. Highlight multiple objects with your mouse by holding the Shift key to select items
contiguously, or the Control key to select items non-contiguously. The controlling object
is the last object selected.
The size buttons on the layout toolbar are active.
2. Click the button in the layout toolbar that corresponds to what you want:
Make same width sets the width of the highlighted objects to the width of the
controlling object.
Make same height sets the height of the highlighted objects to the current height of
the controlling object.
Make same size sets the height and width of the highlighted objects to the height and
width of the controlling object.
All selected objects change in size according to the size of the controlling object. If an
image becomes distorted when you resize it, you can restore its original size. Right-click
the image, select Image Properties, and then Restore Size.

Procedure: How to Set the Distance Between Objects


1. Highlight multiple elements with your mouse holding the Shift key to select items
contiguously, or the Control key to select items non-contiguously. The controlling object
is the last object selected.
2. Click the button in the layout toolbar that corresponds to the relationship you want.
The selected objects’ position will be set according to the controlling object, which is
the last object selected. The options are:
Relate top left maintains the distance between the controlling object’s top left corner
and the highlighted objects’ top left corners.
Relate top right maintains the distance between the controlling object’s top right
corner and the highlighted objects’ top left corners.
Relate bottom right maintains the distance between the controlling object’s bottom
right corner and the highlighted objects’ top left corners.
Relate bottom left maintains the distance between the controlling object’s bottom left
corner and the highlighted objects’ top left corners.
For details on the buttons in the layout toolbar, see Layout Toolbar on page 5-100.

Developing Reporting Applications With Graphical Tools 5-99


Laying Out Objects With the HTML Layout Painter

Procedure: How to Break Relationships


Click Break in the toolbar.

Reference: Layout Toolbar


The layout toolbar contains the buttons listed in the following table.
For buttons that use relationships, the relationship is controlled by the controlling object,
or dominant object, which is the last object or placeholder selected. These buttons are
only highlighted when more than one object is selected.

Button Descriptions

Toggles the grid on and off. Use the grid to assist in lining up objects in the
layout. This button is recessed when the grids are enabled.

Specifies Tab Order.

Aligns the highlighted objects’ left edge with the left edge of the controlling
object.

Aligns the highlighted objects’ right edge with the right edge of the
controlling object.

Aligns the highlighted objects’ top edge with the top edge of the controlling
object.

Aligns the highlighted objects’ bottom edge with the bottom edge of the
controlling object.

Sets the width of the highlighted objects to the width of the controlling
object.

Sets the height of the highlighted objects to the current height of the
controlling object.

Sets the height and width of the highlighted objects to the height and width
of the controlling object.

Maintains the distance between the controlling object’s top left corner and
the highlighted objects’ top left corners.

Maintains the distance between the controlling object’s top right corner and
the highlighted objects’ top left corners.

5-100 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

Button Descriptions

Maintains the distance between the controlling object’s bottom right corner
and the highlighted objects’ top left corners.

Maintains the distance between the controlling object’s bottom left corner
and the highlighted objects’ top left corners.

Breaks the relationship set between highlighted objects. This button is only
highlighted when selected objects have relationships set.

Toggles the display of arrows illustrating the relationships between objects.


This button is only highlighted when selected objects have relationships set.
This button will stay highlighted when relationships are displayed. It will not
be highlighted when relationships are not displayed.

Adds a parameter to a chain. Chained dynamic values are filtered as


selections are made to each parameter control. Each time a selection is
made, all chained parameters will be dynamically updated. For details about
chained parameters, see Filtering Dynamic Parameter Values on page 5-65.

Removes a chained parameter from a chain. For details about chained


parameters, see Filtering Dynamic Parameter Values on page 5-65.

Activates chained parameters for viewing and editing. For details about
chained parameters, see Filtering Dynamic Parameter Values on page 5-65.

Customizing the Layout


All changes to your layout be can made in the Design mode of the HTML Layout Painter or
the HTML editor. The changes made to a layout in an editor will be preserved when you re-
enter the HTML Layout Painter.

Developing Reporting Applications With Graphical Tools 5-101


Controlling the HTML Layout Painter Environment

Controlling the HTML Layout Painter Environment


How to:
Set Page Properties
Reference:
Settings Dialog Box

You can set properties for the HTML Layout Painter with the Settings dialog box. This
dialog box allows you to set page properties such as the location of reports and graphs,
as well as the display of a grid in your layouts. The changes that are made in the Settings
dialog box are saved to the registry. This allows a customized environment to be created
for various users.

Procedure: How to Set Page Properties


1. Select Settings from the Tools menu. The Settings dialog box opens. For details, see
Settings Dialog Box on page 5-102.
2. Make your changes, and click OK.

Reference: Settings Dialog Box

5-102 WebFOCUS7
Designing a User Interface for a Web Application With the HTML Layout Painter

The Page Properties and Settings dialog boxes contains the following fields/options:
Images
Specifies the default image location of the report and graph object.
Report Item without data
Is the image location for the report object when no report has been created for it.
Report Item with data
Is the image location for the report object after a report has been created for it.
Graph Item without data
Is the image location for the graph object when no graph has been created for it.
Graph Item with data
Is the image location for the graph object after a graph has been created for it.
Grid Settings
Determines the grid display.
Show Grid
Displays a grid. If this is not selected, the grid is turned off for all layouts.
Snap to Grid
Causes objects in the layout to snap to grid lines when being positioned. For
detailed positioning, deselect this option.
Width
Is the width of the grid in pixels.
Height
Is the height of the grid in pixels.
Change current layout only
Applies your settings only to the current layout.

Developing Reporting Applications With Graphical Tools 5-103


Controlling the HTML Layout Painter Environment

5-104 WebFOCUS7
WebFOCUS7

6 Designing an Application With the PDF


Layout Painter

The PDF Layout Painter allows you to Topics:


design PDF reports, and to coordinate
❏ Uses for the PDF Layout Painter
and distribute layouts made up of
multiple reports and graphs in a single ❏ Getting Started With the PDF Layout
PDF file. Painter
You can also position reports and graphs ❏ Creating a Compound Layout Report
anywhere on a single page or combine a in PDF Format
series of layouts within a PDF.
❏ Creating a Coordinated Compound
This topic describes how to create a Report
layout in the local development
❏ Adding a Reporting Object to a PDF
environment. For information on creating
Report
a user interface in Managed Reporting,
see your Managed Reporting
documentation.
Uses for the PDF Layout Painter

Uses for the PDF Layout Painter


When creating a PDF with PDF Layout Painter, you can:
❏ Design complex PDF reports.
❏ Build compound reports.
❏ Coordinate and distribute various free form layouts made up of multiple reports and
graphs in a single PDF file.
❏ Precisely position reports and graphs anywhere on a single page or combine a series
of layouts.
❏ Link reports together by a common sort field so that multiple reports and graphs can
be burst into individual page layouts.

Getting Star ted With the PDF Layout Painter


How to:
Access the PDF Layout Painter
Reference:
PDF Layout Painter Windows and Toolbars
Standard Toolbar
Compound Report Properties Window

You can create compound reports and coordinated compound reports in one integrated
process with the PDF Layout Painter.

6-2 WebFOCUS7
Designing an Application With the PDF Layout Painter

Procedure: How to Access the PDF Layout Painter


To access the PDF Layout Painter, complete the following steps from the Developer Studio
environment.
1. Add a procedure.
❏ From the Quick Links pane, click the Coordinate PDF Reports and Graphs link.
or
❏ With the Procedures folder highlighted, select New from the File menu, then select
Procedure.
The Add Procedure dialog box opens.

2. Enter a name for the new procedure in the File name field.
3. If the Create with drop-down list is displayed, select PDF Layout Painter.
The PDF Layout Painter is the default for the Coordinate PDF Reports and Graphs link.
4. Click Open.
The PDF Layout Painter opens.

Developing Reporting Applications With Graphical Tools 6-3


Getting Started With the PDF Layout Painter

Reference: PDF Layout Painter Windows and Toolbars


When you open the PDF Layout Painter, it appears as shown in the following image.

The main elements of the PDF Layout Painter are:


Menu Bar
Displays pull-down menus for the PDF Layout Painter.
Developer Studio Toolbar
Displays tool buttons such as Open and Run. For details, see the Creating Reports
With Graphical Tools manual.
Standard Toolbar
Displays buttons such as Cut and Paste that allow you edit the layout.
Layout Toolbar
Contains buttons that control the appearance of the layout.
Properties Tab
Displays the properties of objects in the layout.
QuickLinks Window
Displays links to information on Developer Studio Help, configuration options,
metadata creation, and reports and procedures.
Parameters Window
Displays information about the parameters in your report or graph.

6-4 WebFOCUS7
Designing an Application With the PDF Layout Painter

Reference: Standard Toolbar


The Standard toolbar contains the following buttons:

Button Description

Saves the existing procedure (.fex) and PDF files to the current project. This
button is grayed out once the layout is saved and no new changes have been
made. When a change has been made to the layout, the Save button is
active until the report is saved again.

Removes the highlighted object(s) and saves it to the clipboard.

Copies the highlighted object(s) to the clipboard.

Pastes the object(s) to the specified location.

Deletes the highlighted object(s).

Resets the layout by reversing the last action performed.

Repeats the last action performed.

Inserts a report object to the layout.

Inserts a graph object to the layout.

Inserts a placeholder for an image.

Inserts text.

Inserts a line.

Toggles between displaying and hiding the grid.

Aligns objects to the left.

Developing Reporting Applications With Graphical Tools 6-5


Getting Started With the PDF Layout Painter

Button Description

Aligns objects to the right.

Aligns objects by the top of the highest selected object.

Aligns objects by the bottom of the lowest selected object.

Makes two or more objects the same width.

Makes two or more objects the same height.

Makes two or more objects the same size.

Creates a new PDF Layout Report.

Reference: Compound Report Properties Window

The Compound Report Properties window contains options that control the properties of
your report and reporting objects. These properties adhere to the Microsoft standards. For
more information on Microsoft object properties, see your Microsoft documentation.

6-6 WebFOCUS7
Designing an Application With the PDF Layout Painter

Creating a Compound Layout Repor t in PDF Format


In this section:
Controlling Overflow in Compound Layout Reports
How to:
Add an Embedded Report
Add an External Report
Create an Overflow Page and Object(s)
Reference:
Adding External Reports

There are two types of compound reports that can be built in the PDF Layout Painter, a
compound layout report or a coordinated compound report:
❏ Compound Layout Report: Allows absolute positioning of reports and graphs.
❏ Coordinated Compound Layout: Is “coordinated” so that all reports and graphs that
contain a common sort field are burst into separate page layouts. Each value for the
first sort field displays on a separate page.
A compound layout report is comprised of individual component reports or graphs, either
embedded or external. Reports and graphs can be positioned anywhere on the page.

Procedure: How to Add an Embedded Report


You can use the PDF Layout Painter to add embedded reports by either creating a report or
importing an existing procedure:
❏ To create an embedded report, double-click the Report icon.
❏ To import an embedded report, right-click the Report icon and select Import existing
procedure.

Procedure: How to Add an External Report


External reports are reports that are created and saved outside of the PDF Layout Painter.
To reference an external report, right-click the Report icon and select Reference existing
procedure. An EX command will be used to execute the component procedure at run time.

Developing Reporting Applications With Graphical Tools 6-7


Creating a Compound Layout Report in PDF Format

Reference: Adding External Reports


❏ Reports must be saved with PDF output format specified in the procedure. Only the
first report in the procedure must be in PDF format, the other report formats are
ignored.
❏ Graphs must be saved with a HOLD command, and specified as a format of SVG, GIF,
or JPG. SVG will be the most common format since it produces the highest quality
graphs. When creating new graphs from within the tool, SVG and HOLD should
automatically be selected in the Graph Assistant.

Controlling Overflow in Compound Layout Reports


Reports can be sized, and the output must respect this designated size. If a report results
in output that is larger than the designated area, the data that does not fit is called
overflow. There is no overflow for graphs. The graph area always extends to display the
entire graph regardless of the size of the graph icon. The resulting overflow will simply
overlap other objects.
Overflow is handled in the following manner:
❏ Horizontal overflow: A report is rendered from left to right and any output that extends
beyond the right border of the designated report area is truncated. You should control
the width of your report data since there is no way to process horizontal overflow
output. If your output is truncated horizontally, you may want to switch the page
orientation from portrait to landscape.
❏ Vertical overflow: A report is rendered from top to bottom and any data that extends
beyond the bottom border of the designated report area will automatically be rendered
on a subsequent identical layout page.
The overflow appears in the same locations as the report area designated in the initial
layout. If more than one report has vertical overflow, all reports are automatically
rendered on a subsequent page until all the reports have appeared in their entirety.
To customize the vertical overflow, you can create an additional overflow page and you
can size and position report overflow objects on the overflow page. An overflow page
will always follow the page layout it represents and no new objects can be added. If
the data exceeds the overflow objects height, subsequent pages will follow in the
layout as defined in the overflow page layout.

6-8 WebFOCUS7
Designing an Application With the PDF Layout Painter

Procedure: How to Create an Overflow Page and Object(s)


If you want to customize an overflow page for a report, you must create an overflow object.
To do so, right-click on a report that will have overflow and select Customize vertical
overflow to create a new page and a new report overflow object.
Note: For consistency, do not create overflow pages with the New Page option.
The page overflow objects will appear on the next page and can then be sized and
positioned. No formatting objects (graphs, text, lines, boxes) are displayed on the overflow
page.
If a report added to an overflow page exceeds the height of the designated area, there is
no overflow option available to handle this. Subsequent pages will be rendered in the
exact overflow layout (same size and position) until the data has been completely
returned.
Multiple (non-coordinated) layouts can be created by clicking the New Page icon in the
toolbar. This option creates additional pages located vertically below the initial page where
additional reports and graphs can be laid out. The scroll bar can be used to scroll between
pages. There is no limit to the number of layout pages that can be created. The overflow
page will always follow the corresponding layout page and will finish rendering before any
subsequent layout pages are rendered.

Creating a Coordinated Compound Repor t


There are two types of compound reports that can be built in the PDF Layout Painter, a
compound layout report or a coordinated compound report:
❏ Compound Layout Report: Allows absolute positioning of reports and graphs.
❏ Coordinated Compound Layout: Is “coordinated,” meaning all reports and graphs
that contain a common sort field will be burst into separate page layouts. Each value
for the first sort field will display in a separate page.

Developing Reporting Applications With Graphical Tools 6-9


Adding a Reporting Object to a PDF Report

Adding a Repor ting Object to a PDF Repor t


Reference:
Restrictions for Graphs Used in the PDF Layout Painter

The following reporting objects are available for creating a report in the PDF Layout
Painter:
❏ Reports
❏ Graphs
❏ Formatting Objects:
❏ Images
❏ Text
❏ Lines
❏ Boxes
If you want to add a formatting object to a page layout by itself, you must include a report
that generates no visible output.

Reference: Restrictions for Graphs Used in the PDF Layout Painter


❏ Graphs must contain a BY and an ACROSS field.
❏ Graphs must be saved with a HOLD command, and specified as a format of SVG, GIF,
or JPG.
❏ Graphs added to the PDF Layout Painter that were created with the Graph Assistant
require the following considerations:
If a graph contains FOCUS Titles (Page Heading, Page Footing), they are automatically
removed from the graph. To utilize headings or footings in a graph object being added
to the PDF Layout Painter, use the Graph Assistant to create Graph Titles (Chart Title,
Chart Subtitle, Chart Footnote). You can also add Text objects to a graph in the PDF
Layout Painter and position them to function as a heading or footing.
For more information on adding objects to a report in Developer Studio, see Creating a
Report Page Layout in Chapter 5, Designing a User Interface for a Web Application With
the HTML Layout Painter.

6-10 WebFOCUS7
WebFOCUS7

7 Enhancing a User Interface

A WebFOCUS StyleSheet enables you to Topics:


specify a hyperlink to a JavaScript
❏ Displaying a Report in a Helper
function. You will apply this feature to
Application
perform data calculations in a drill-down
report. ❏ Controlling Multiple Reports
How you enable report manipulation is ❏ Adding JavaScript for Drill-Down
an important part of a user interface. Reporting
This topic describes how to use the
❏ Facilitating Report Manipulation
WebFOCUS Viewer in an application for
navigation of a long report. You will also ❏ Using a Cascading Style Sheet to
see how to use an external Cascading Standardize Display
Style Sheet to add scrolls bars to report ❏ Displaying a Previously Run Report
display.
❏ Passing a User ID From HTML for a
You can implement advanced design Custom Menu
features on a launch page. An example
is a menu with customized options for an
individual user.
This topic describes coding capabilities
that extend the functionality and usability
of an interface.
Report presentation is not limited to
HTML. You will see how to display:
❏ A report in a format other than
HTML, such as PDF (Portable
Document Format) or PostScript,
using a helper application.
❏ Multiple reports in different formats
from a single launch page.
Displaying a Report in a Helper Application

Displaying a Report in a Helper Application


How to:
Specify a MIME Type in Microsoft Windows Explorer
Display a Report in a Helper Application
Example:
Displaying a Report in an Excel 2000 Spreadsheet
Offering a Choice of Display Formats
Reference:
Supported MIME Types

A helper application or plug-in is a desktop program used by a browser to open a file with
a format other than standard HTML. An example of a helper application is Adobe®
Acrobat® Reader, which opens a PDF file.
When a Web server sends a special type of file to a browser, it includes MIME
(Multipurpose Internet Mail Extensions) information, indicating the file format. WebFOCUS
determines which helper application to run based on MIME type. You must associate the
content (MIME) type of a file with a helper application using Windows Explorer.
This feature applies to WebFOCUS. You can create the procedure and launch page in
Developer Studio, and deploy them with the Deploy Wizard. Run them in WebFOCUS.

Procedure: How to Specify a MIME Type in Microsoft Windows Explorer


1. Open Windows Explorer.
2. Select Folder Options from the Tools menu.
3. Select the File Types tab.
4. Select a file type in the Registered File Types list box, then click the New Type button.
The Add New File Type dialog box opens.
5. Enter the following information.
❏ In the Description of Type field, enter a description of your choice.
❏ In the Associated Extension field, enter the extension for the file type.
❏ In the Content Type (MIME) field, enter the MIME type for the file type and
extension.
6. Click OK to save your changes.

7-2 WebFOCUS7
Enhancing a User Interface

Reference: Supported MIME Types


WebFOCUS supports the following MIME types.

MIME Type Application File Extension

application/postscript GhostView .PS

application/x-prn Printer (using PCL printer driver) .PRN

application/x-dif Microsoft Excel or other spreadsheet .DIF

application/x-doc Microsoft Word .DOC

application/x-xls Microsoft Excel .XLS, .E97, .WK1,


.XHT
application/vnd.ms-excl

application/pdf Adobe Acrobat Reader .PDF

text/plain Microsoft Notepad or other text editor .WP or .HTS

text/html Native browser format .HTML

text/htm Native browser format .HTM

image/gif Native browser format .GIF

image/jpeg Native browser format .JPG, .JPEG

XML Native browser format .XML

Developing Reporting Applications With Graphical Tools 7-3


Displaying a Report in a Helper Application

Procedure: How to Display a Report in a Helper Application


1. Create a procedure that includes the command
ON TABLE PCHOLD FORMAT fmt
where:
fmt
Is the file format for the data.
For details on formats and complete syntax, see the Creating Reports With
WebFOCUS Language manual.
Caution: Keep in mind that a valid format for browser display in a helper
application requires a supported MIME type.
2. Create a launch page from which a user can run the report.
3. Deploy the procedure and launch page using the Deploy Wizard. See Step 2: Create a
Deployment Scenario in Chapter 8, Partitioning and Deploying Project Files for
instructions. When you run the launch page, WebFOCUS returns the data to the
browser in the format specified. The browser displays it using the appropriate helper
application.

Example: Displaying a Report in an Excel 2000 Spreadsheet


1. Create a procedure named HELPER, which generates a report on product orders:
TABLE FILE GGORDER
SUM QUANTITY BY PCD
WHERE PCD IS 'B141' OR 'B142' OR 'F101' OR 'F102'
ON TABLE PCHOLD FORMAT EXL2K
END
2. Create a launch page from which a user can run the report.
3. Deploy the procedure and launch page using the Deploy Wizard. See Step 2: Create a
Deployment Scenario in Chapter 8, Partitioning and Deploying Project Files for
instructions.

7-4 WebFOCUS7
Enhancing a User Interface

4. Run the launch page, and click the link. WebFOCUS returns the data to the browser in
EXL2K format. The browser calls the helper application, Microsoft Excel 2000, and
displays the report:

Example: Offering a Choice of Display Formats


1. Create a procedure named QASTATUS, which generates a quality assurance report on
a plant (PLANT) of interest, in a format (FMT) of choice:
TABLE FILE CENTQA
ON TABLE SET PAGE-NUM OFF
SUM CNT.PROBNUM AS 'Total Number,of Problems'
SUM CNT.PROBNUM AS 'Problem by,Product' BY PLANT NOPRINT BY PRODNAME
WHERE PLANT EQ '&PLANT'
HEADING CENTER
"QA Report for &PLANT"
ON TABLE PCHOLD FORMAT &FMT
END

Developing Reporting Applications With Graphical Tools 7-5


Displaying a Report in a Helper Application

2. Create a launch page from which a user can run the report. The following sample
launch page is named FORMATS. The letter on the left corresponds to the note
explaining the code.
<HTML>
<HEAD>
<TITLE>Multiple Display Formats</TITLE>
</HEAD>
<BODY BGCOLOR="#E3E3E3">
<FONT FACE="Arial">
<CENTER>
<FONT SIZE="+1">Welcome to the QA Database</FONT>
<HR WIDTH="45%" NOSHADE>
</CENTER>
<FORM ACTION="/ibi_apps/WFServlet" METHOD="get">
<INPUT NAME="IBIF_ex" VALUE="qastatus" TYPE="hidden">
<P>
Select a plant to generate a report on product problems:
</P>
<SELECT NAME="PLANT">
<OPTION>BOS
<OPTION>DAL
<OPTION>LA
<OPTION>ORL
<OPTION>SEA
<OPTION>STL
</SELECT>
<P>
<HR>
a. <TABLE CELLPADDING="2">
<TR>
<TD CLASS="LABEL">Select a display format:</TD>
<TD><INPUT TYPE="RADIO" NAME="FMT" VALUE="HTML" CHECKED>HTML</TD>
<TD><INPUT TYPE="RADIO" NAME="FMT" VALUE="PDF">PDF</TD>
<TD><INPUT TYPE="RADIO" NAME="FMT" VALUE="EXL2K">Excel 2000</TD>
</TR>
</TABLE>
<P>
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Submit">
<INPUT TYPE="RESET" NAME="RESET" VALUE="Reset">
</FORM>
</BODY>
</HTML>
a. Radio buttons in a table prompt the user for the format (FMT), and the value is
passed to the procedure.

7-6 WebFOCUS7
Enhancing a User Interface

3. Deploy the procedure and launch page using the Deploy Wizard. See Step 2: Create a
Deployment Scenario in Chapter 8, Partitioning and Deploying Project Files, for
instructions.
4. Run the launch page.

Developing Reporting Applications With Graphical Tools 7-7


Displaying a Report in a Helper Application

5. Select ORL from the drop-down list. Select PDF for the format. Click Submit.
WebFOCUS returns the data to the browser in PDF. The browser calls the helper
application, Adobe Acrobat Reader, and displays the report:

7-8 WebFOCUS7
Enhancing a User Interface

Controlling Multiple Repor ts


How to:
Control Multiple Reports From a Hyperlink
Control Multiple Reports From a Procedure
Example:
Displaying Two Reports With an Index Value
Displaying Side-By-Side Reports
Displaying Two Reports With Descriptive Names and Sequence Numbers
Displaying Two Reports With Descriptive Names Only
Displaying Two Reports With Sequence Numbers Only
Reference:
Formats of Multiple Reports
WebFOCUS Client Variables

WebFOCUS Client variables give you control over the display of multiple reports on the
same HTML page with multiple frames without coding HTML FRAME syntax. It also allows
you to link multiple reports with a single Table of Contents (TOC) that calls them. For
example, you can use these variables to display different report formats, such as HTML
and PDF, on a single launch page.
You can:
❏ Pass the variables on a call to the WebFOCUS Client from a hyperlink.
❏ Set the variables in a procedure with the Dialogue Manager -TYPE command. If you
use this method, test your application in WebFOCUS. Either create the procedure with
a text editor in WebFOCUS, or create it in Developer Studio, deploy it, and then run it.
Use the variables described in this topic with procedures that generate more than one
report. See Managing Flow of Control in an Application in the Developing Reporting
Applications manual for details on the use of -RUN, -INCLUDE, and EX to code multiple
report requests.
WebFOCUS Client variables apply to WebFOCUS. Developer Studio does not support
multiple reports generated by these variables. Instead, multiple reports can be created
with the Developer Studio HTML Layout Painter. These reports must be run in WebFOCUS.

Developing Reporting Applications With Graphical Tools 7-9


Controlling Multiple Reports

Reference: Formats of Multiple Reports


Two formats of multiple reports are supported:
❏ Multiple reports displayed in a frame set.
❏ Table of content reports where all reports in the procedure are listed in a menu on the
left side, and the first report is displayed on the right. When the user clicks on a
report in the menu, it is executed and appears by default on the right side of the
window.

Reference: WebFOCUS Client Variables


The following are the variables that control multiple reports.
IBIWF_mreports
Controls the multiple report option and creates either a TOC or a frameset with one report
for each frame in the browser.
The syntax is
IBIWF_mreports = {OFF|INDEX|FRAME}
where:
OFF
Disables the multiple report option. OFF is the default value.
INDEX
Creates a TOC that lists all reports in a procedure. Default sequence numbers are
from 1 (for the first report generated) to n (for the last report generated). Used with
IBIWF_mprefix.
FRAME
Creates a default frameset. The number of reports in the frameset is determined by
the IBIWF_mrcolumns variable.

7-10 WebFOCUS7
Enhancing a User Interface

IBIWF_mrcolumns
Is the number of side-by-side reports from left to right across the page when
IBIWF_mreports is set to FRAME. If this variable is not set, reports are displayed top to
bottom.
The syntax is
IBIWF_mrcolumns = {1|n}
where:
n
Is the number of reports. The default value is 1. The maximum value is 9.
IBIWF_mrrows
Is the number of vertically stacked reports when IBIWF_mreports is set to FRAME.
The syntax is
IBIWF_mrrows = n
where:
n
Is the number of reports desired from top to bottom.
IBIWF_mprefix
Is descriptive text that precedes a sequence number and identifies a report on a TOC.
WebFOCUS appends the number 1 (for the first report generated) to n (for the last report
generated), as set by the index value on IBIWF_mreports.
Do not use this variable if IBIWF_mreports = FRAME.
The syntax is
IBIWF_mprefix = {Report|text}
where:
text
Is a character string, up to 50 characters long. The maximum length does not include
the number appended by WebFOCUS. The default value is Report.

Developing Reporting Applications With Graphical Tools 7-11


Controlling Multiple Reports

IBIWF_morder
Is the order in which reports display in the browser. Applies only when IBIWF_mreports =
FRAME. Ignored when IBIWF_mreports = INDEX.
The syntax is
IBIWF_morder = {FORWARD|REVERSE}
where:
FORWARD
Displays reports in the order in which they were coded and executed. This value is the
default.
REVERSE
Displays reports in the reverse order in which they were coded and executed. This is
especially useful if the last report is a summary report you would like to display on the
Web page first.
IBIWF_mframename
Is a name for a frame when IBIWF_mreports = FRAME. If you do not code this variable,
WebFOCUS internally names the frames MREPORT1 through MREPORTn, which may
conflict with other HTML code.
The syntax is
IBIWF_mframename = {MREPORT|text}
where:
text
Is a character string, up to 20 characters long.
IBIWF_index
Controls whether a sequence number (1, 2,...n) is appended to the end of the names on
the TOC when IBIWF_mreports = INDEX.
The syntax is
IBIWF_index = {ON|OFF}
where:
ON
Appends a sequence number of 1 (for the first report generated) to n (for the last
reported generated). ON is the default value.
OFF
Omits a sequence number. Only the text specified by IBIWF_mprefix applies.

7-12 WebFOCUS7
Enhancing a User Interface

Syntax: How to Control Multiple Reports From a Hyperlink


<A HREF="/alias/ibiweb.exe?IBIF_ex=procedure[&var=value
[&var=value]...]"> text</A>

<A HREF="/alias/webapi.dll?IBIF_ex=procedure[&var=value
[&var=value]...]"> text</A>

<A HREF="http://server_name/servlet?WFServlet=procedure[&var=value
[&var=value]...]"> text</A>
where:
alias
Points to the directory in which the WebFOCUS CGI (ibiweb.exe) or ISAPI (webapi.dll) is
located. A Web server uses an alias to provide a logical name for a physical directory.
The default alias is cgi-bin/ibi_cgi. It is set during WebFOCUS installation and
configuration.
To call WebFOCUS on another Web server, specify a fully qualified URL, for example:
http://web_server/alias/ibiweb.exe...
server_name
Is the name of the Web server on which WebFOCUS is installed.
procedure
Is the name of the procedure to run.
var=value
Is a WebFOCUS Client variable and its corresponding value.
You can pass more than one variable-value pair, but do not include a space between
pairs. Use an ampersand (&) as a delimiter to separate each variable-value pair. A
value can be a maximum of 80 characters long.
If a value contains an embedded blank, substitute a plus sign (+) or the characters
%20 for the blank.
See WebFOCUS Client Variables on page 7-10 for a list of variables and valid values.
text
Is the text on the launch page that serves as the hyperlink that runs the procedure.

Developing Reporting Applications With Graphical Tools 7-13


Controlling Multiple Reports

Example: Displaying Two Reports With an Index Value


1. Create a procedure named TWORPTS, which consists of two requests. The first
generates a report on total dollar sales; the second, on total unit and dollar sales.
Procedure:
TABLE FILE GGSALES
SUM DOLLARS BY PRODUCT
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
-RUN
TABLE FILE GGSALES
SUM UNITS DOLLARS BY PRODUCT
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
-RUN
2. Create a launch page named TWOLNCH. It contains a hyperlink that calls the
WebFOCUS Servlet and passes it the name of the procedure to run. It also sets the
variables that provide an identifier (Sales Analysis Report) and sequence number (1
and 2) to each report.
Launch Page:
<HTML>
<BODY>
<A HREF="/ibi_apps/WFServlet?IBIF_ex=tworpts
&IBIWF_mreports=index&IBIWF_mprefix=Sales+Analysis+Report">
Run report.</A>
</BODY>
</HTML>
3. Deploy the procedure and launch page using the Deploy Wizard. See Step 2: Create a
Deployment Scenario in Chapter 8, Partitioning and Deploying Project Files, for
instructions.

7-14 WebFOCUS7
Enhancing a User Interface

4. Run the launch page in the browser, and click Run report to receive the report on total
dollar sales:

Click Sales Analysis Report 2 for the report on total unit and dollar sales:

Developing Reporting Applications With Graphical Tools 7-15


Controlling Multiple Reports

Syntax: How to Control Multiple Reports From a Procedure


-TYPE WEBFOCUS CGIVAR var=value
.
.
.
-RUN
where:
var=value
Is a WebFOCUS Client variable and its corresponding value. You can include only one
variable-value pair per each -TYPE command.
See WebFOCUS Client Variables on page 7-10 for a list of variables and valid values.
Note: Include the command -RUN at the end of each request to execute the previous set
of -TYPE commands.

7-16 WebFOCUS7
Enhancing a User Interface

Example: Displaying Side-By-Side Reports


1. Create a procedure named SIDERPTS, which consists of two requests. The first
generates a report on sales by store; the second, on sales by product.
-TYPE commands create a two-frame page on which the reports display side-by-side.
Procedure:
-TYPE WEBFOCUS CGIVAR IBIWF_mreports=FRAME
-TYPE WEBFOCUS CGIVAR IBIWF_mrcolumns=2
TABLE FILE CENTORD
HEADING
"Sales By Store"
SUM LINEPRICE AS 'Sales'
BY SNAME
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
-RUN

TABLE FILE CENTORD


HEADING
"Sales By Product"
" "
SUM LINEPRICE AS 'Sales'
BY PRODCAT AS 'Product'
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
2. Create a launch page that runs the procedure.
3. Deploy the procedure and launch page using the Deploy Wizard. See Step 2: Create a
Deployment Scenario in Chapter 8, Partitioning and Deploying Project Files for
instructions.

Developing Reporting Applications With Graphical Tools 7-17


Controlling Multiple Reports

4. Access the launch page in the browser, and run the reports:

7-18 WebFOCUS7
Enhancing a User Interface

Example: Displaying Two Reports With Descriptive Names and Sequence Numbers
1. Create a procedure named HTMPDF1, which consists of two requests. The first
generates a report on total dollar sales in HTML format; the second, on total dollar
sales in PDF format.
-TYPE commands set the variables that provide an identifier (HTML Report and PDF
Report) and sequence number (1 and 2) to each report. The command that creates
the TOC is required only once at the beginning of the procedure.
Procedure:
-TYPE WEBFOCUS CGIVAR IBIWF_mreports=INDEX
-TYPE WEBFOCUS CGIVAR IBIWF_mprefix=HTML Report
TABLE FILE GGSALES
SUM DOLLARS BY PRODUCT
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
-RUN
TABLE FILE GGSALES
-TYPE WEBFOCUS CGIVAR IBIWF_mprefix=PDF Report
SUM DOLLARS BY PRODUCT
ON TABLE PCHOLD FORMAT PDF
END
2. Create a launch page that runs the procedure.
3. Deploy the procedure and launch page using the Deploy Wizard. See Step 2: Create a
Deployment Scenario in Chapter 8, Partitioning and Deploying Project Files for
instructions.

Developing Reporting Applications With Graphical Tools 7-19


Controlling Multiple Reports

4. Run the launch page in the browser. The report in HTML format displays.

7-20 WebFOCUS7
Enhancing a User Interface

5. Click PDF Report 2 for the report in PDF using the Acrobat Reader.

Developing Reporting Applications With Graphical Tools 7-21


Controlling Multiple Reports

Example: Displaying Two Reports With Descriptive Names Only


1. Create a procedure named HTMPDF2, which consists of two requests. The command
-TYPE WEBFOCUS CGIVAR IBIWF_index=OFF omits sequence numbers from the names
in the TOC.
Procedure:
-TYPE WEBFOCUS CGIVAR IBIWF_mreports=INDEX
-TYPE WEBFOCUS CGIVAR IBIWF_index=OFF
-TYPE WEBFOCUS CGIVAR IBIWF_mprefix=HTML Report
TABLE FILE GGSALES
SUM DOLLARS BY PRODUCT
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
-RUN
-TYPE WEBFOCUS CGIVAR IBIWF_mprefix=PDF Report
TABLE FILE GGSALES
SUM DOLLARS BY PRODUCT
ON TABLE PCHOLD FORMAT PDF
END
2. Create a launch page that runs the procedure.
3. Deploy the procedure and launch page using the Deploy Wizard. See Step 2: Create a
Deployment Scenario in Chapter 8, Partitioning and Deploying Project Files for
instructions.

7-22 WebFOCUS7
Enhancing a User Interface

4. Run the launch page in the browser. The reports have descriptive names without
sequence numbers.

Example: Displaying Two Reports With Sequence Numbers Only


1. Create a procedure named HTMPDF3, which consists of two requests. The command
-TYPE WEBFOCUS CGIVAR IBIWF_mprefix= omits descriptive names for the reports.
-TYPE WEBFOCUS CGIVAR IBIWF_mreports=INDEX
-TYPE WEBFOCUS CGIVAR IBIWF_mprefix=
TABLE FILE GGSALES
SUM DOLLARS BY PRODUCT
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
-RUN
TABLE FILE GGSALES
SUM DOLLARS BY PRODUCT
ON TABLE PCHOLD FORMAT PDF
END

Developing Reporting Applications With Graphical Tools 7-23


Adding JavaScript for Drill-Down Reporting

2. Create a launch page that runs the procedure.


3. Deploy the procedure and launch page using the Deploy Wizard. See Step 2: Create a
Deployment Scenario in Chapter 8, Partitioning and Deploying Project Files for
instructions.
4. Run the launch page in the browser. The reports have sequence numbers without
descriptive names:

Adding JavaScript for Drill-Down Repor ting


How to:
Specify a Hyperlink to a JavaScript Function
Example:
Creating a Drill-Down Report With JavaScript

This topic illustrates the use of JavaScript to create a drill-down report. It describes how to
call a JavaScript function and pass values to it from the summary component of the
report, to dynamically determine the content of the detailed component.
You will see how to specify a hyperlink to a JavaScript function in a procedure’s
StyleSheet. Once a hyperlink is defined, a user can select the associated object in the
report to execute the function.

7-24 WebFOCUS7
Enhancing a User Interface

For more information on StyleSheets, see the Creating Reports With WebFOCUS Language
manual.
For details on JavaScript capabilities and syntax, see your JavaScript documentation.

Syntax: How to Specify a Hyperlink to a JavaScript Function


TYPE=type, {COLUMN|ACROSSCOLUMN}=fieldname, JAVASCRIPT=func[(value)],$
where:
type
Is the report component that serves as the hyperlink. The TYPE attribute and its value
must be first in the StyleSheet.
For example, use TYPE=DATA to set up a hyperlink from a data field in a report, or use
TYPE=REPORT to set up a hyperlink from any component in a report.
fieldname
Is the name of the field in the data source whose value, when selected, executes the
hyperlink.
func
Is the name of the JavaScript function.
The maximum length of the code for JAVASCRIPT=func, including any passed values,
is 800 characters. The code can span more than one line. If you split it across a line,
use a backslash at the end of the first line as the continuation character. If you split a
line at a point at which a space is required, the space must be before the backslash,
or must be the first character on the next line.
In this example,
JAVASCRIPT=myfunc(COUNTRY \
CAR MODEL),$
the code correctly spans two lines.
value
Is a value or values passed to the JavaScript function. Specify a value in one of the
following ways:
❏ As the name of a report column.
❏ As a constant. You must enclose the value in single quotation marks.
❏ As a Dialogue Manager amper variable. You can only specify an amper variable in a
StyleSheet that is part of the procedure (inline).
An amper variable is typically used to pass a constant value, in which case it must
be enclosed in single quotation marks, for example, '&ABC'.

Developing Reporting Applications With Graphical Tools 7-25


Adding JavaScript for Drill-Down Reporting

Example: Creating a Drill-Down Report With JavaScript


In this example, the summary component of a drill-down report displays orders per month
for each store code. When the user selects a particular store code, a hyperlink calls a
JavaScript function that performs calculations on the data and displays detailed
information for the selected store.
1. Create a procedure named JDRILL. The letters on the left correspond to the notes
explaining the code.
SET MESSAGE = OFF
TABLE FILE GGORDER
SUM QUANTITY BY STORE_CODE ACROSS ORDER_DATE
IF ORDER_DATE GT 12/31/96
a. ON TABLE HOLD
END
-RUN
TABLE FILE HOLD
HEADING CENTER
"Store Sales Analysis Using JavaScript"
b. PRINT E01 AS 'Store,Code' E02 AS 'Jan' E03 AS 'Feb' E04 AS 'Mar'
E05 AS 'Apr' E06 AS 'May' E07 AS 'Jun'
E08 AS 'Jul' E09 AS 'Aug' E10 AS 'Sep'
E11 AS 'Oct' E12 AS 'Nov' E13 AS 'Dec'
FOOTING CENTER
"Please click on the store code to summarize the store's data."
c. ON TABLE HOLD AS JAVATEMP FORMAT HTMTABLE

d. ON TABLE SET STYLE *


TYPE=DATA,COLUMN=STORE_CODE,$
JAVASCRIPT=conprint(E01 E02 E03 E04 E05 E06 E07 E08 E09 E10 E11 \
E12 E13),$
COLOR=GREEN,STYLE=ITALIC,$

TYPE=TITLE,COLOR=RED,STYLE=BOLD,$
TYPE=HEADING,COLOR=BLUE,STYLE=ITALIC,SIZE=11,$
TYPE=FOOTING,COLOR=BLUE,STYLE=ITALIC,$
END STYLE
END

e. -HTMLFORM BEGIN
<HTML>

f. <SCRIPT LANGUAGE="JavaScript">
var spacer = "................................."; var pos=0;
var aaaa;
function conprint(aaax,lsyr,aa1,aa2,aa3,aa4,aa5,aa6,aa7,
aa8,aa9,aa10,aa11,aa12)
{

7-26 WebFOCUS7
Enhancing a User Interface

var spacer=" ";

lsyrave=parseFloat(lsyr);
a1=parseFloat(aa1);
a2=parseFloat(aa2);
a3=parseFloat(aa3);
a4=parseFloat(aa4);
a5=parseFloat(aa5);
a6=parseFloat(aa6);
a7=parseFloat(aa7);
a8=parseFloat(aa8);
a9=parseFloat(aa9);
a10=parseFloat(aa10);
a11=parseFloat(aa11);
a12=parseFloat(aa12);
gotota=eval(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 +
a11 + a12);
goavea=gotota/12;
gotot=Math.round(gotota);
goave=Math.round(goavea);
diffavea=goavea-lsyrave;
diffave=Math.round(diffavea);

g. document.form1.text1.value=gotot;
document.form1.text2.value=goave;
document.form1.store.value=aaax;
arraygo = new Array(13);
arraygo[1]=a1;
arraygo[2]=a2;
arraygo[3]=a3;
arraygo[4]=a4;
arraygo[5]=a5;
arraygo[6]=a6;
arraygo[7]=a7;
arraygo[8]=a8;
arraygo[9]=a9;
arraygo[10]=a10;
arraygo[11]=a11;
arraygo[12]=a12;
minval=100000;
maxval=0;
mnmmax=0;
mnmmin=0;
for(i = 1; i <= 12; i++)
{
if(arraygo[i] > maxval)
{
mnmmax=i;

Developing Reporting Applications With Graphical Tools 7-27


Adding JavaScript for Drill-Down Reporting

maxval = arraygo[i];
}
if(arraygo[i] < minval)
{
mnmmin=i;
minval = arraygo[i];
}
}
rng1=maxval - minval;
rng=Math.round(rng1);
mnms=new Array(13);
mnms[1]="January";
mnms[2]="February";
mnms[3]="March";
mnms[4]="April";
mnms[5]="May";
mnms[6]="June";
mnms[7]="July";
mnms[8]="August";
mnms[9]="September";
mnms[10]="October";
mnms[11]="November";
mnms[12]="December";
document.form1.themax.value=maxval;
document.form1.themin.value=minval;
document.form1.range.value=rng;
document.form1.mnmmax.value=mnms[mnmmax];
document.form1.mnmmin.value=mnms[mnmmin]; }
</SCRIPT>
<BODY>
<FORM name="form1">

h. <!--WEBFOCUS TABLE JAVATEMP>


<INPUT TYPE=text NAME="text1" SIZE="10"> Units sold for store
<INPUT TYPE=text NAME="store" SIZE="10"> Monthly average of
<INPUT TYPE=text NAME="text2" SIZE="10"><BR><BR> Top selling
month is
<INPUT TYPE=text NAME="mnmmax" SIZE="10"> with
<INPUT TYPE=text NAME="themax" SIZE="10">units<BR> Slowest
month was
<INPUT TYPE=text NAME="mnmmin" SIZE="10"> with
<INPUT TYPE=text NAME="themin" SIZE="10">units<BR> Range
between best and slowest months
<INPUT TYPE=text NAME="range" SIZE="10">units </FORM>
</BODY>
</HTML>
i. -HTMLFORM END
-EXIT

7-28 WebFOCUS7
Enhancing a User Interface

a. This command saves the report output with 1997 data to a temporary file named
HOLD in native machine format. Since this is the only data necessary for the
report, this server extract file is created to speed subsequent processing.
b. This code formats the report, providing descriptive column titles. The store code is
the first column. The following columns contain total monthly quantity for each
store.
c. This command saves the report output to a temporary file in HTML format. The file
is named JAVATEMP. It will be merged with the HTML page created later
(see item e).
d. The StyleSheet specifies a hyperlink to a JavaScript function named conprint. The
code passes the store code and monthly values to the function.
e. The Dialogue Manager command -HTMLFORM BEGIN indicates the start of an
HTML page in which the JavaScript function is defined. The report output will be
embedded on this page.
f. The HTML code declares the JavaScript function and passes values to it.
g. JavaScript assigns variable names to values displayed on the HTML page.
h. WebFOCUS reads the HTML comment and replaces it with the report output held
in JAVATEMP.
i. The Dialogue Manager command -HTMLFORM END indicates the end of the HTML
page.
2. Create a launch page from which a user can run the report.

Developing Reporting Applications With Graphical Tools 7-29


Adding JavaScript for Drill-Down Reporting

3. Run the launch page, and click the link. The summary component displays.

4. Click store code R1019 for the detail component.

7-30 WebFOCUS7
Enhancing a User Interface

Facilitating Repor t Manipulation


In this section:
Using the WebFOCUS Viewer
Opening and Closing the WebFOCUS Viewer
Printing With On-Demand Paging
WebFOCUS Viewer Navigation

Normally, a Web server returns an entire report to a browser. The browser waits until it
receives all of the report before displaying it.
On-demand paging allows you to download one page of a report to a browser instead of
the entire report. The Web server holds the remaining pages until the user requests them.
This feature shortens the time the user waits to see the first page of a report. It is
especially effective for long reports.
On-demand paging is implemented in the WebFOCUS Viewer. It requires that report output
be formatted as HTML, which is the default setting for a request submitted through the
WebFOCUS Client.

Developing Reporting Applications With Graphical Tools 7-31


Facilitating Report Manipulation

The following is a report displayed in the WebFOCUS Viewer.

Using the WebFOCUS Viewer

How to:
Enable the WebFOCUS Viewer
Example:
Enabling the WebFOCUS Viewer

The WebFOCUS Viewer is a browser window divided into two frames:


The Report Frame is the larger upper frame that contains one page of output.
The Control Frame contains the controls used to navigate the report and to search for a
string in the report. The navigational controls allow you to display the next or previous
page, the first or last page, or a specific page.

7-32 WebFOCUS7
Enhancing a User Interface

Syntax: How to Enable the WebFOCUS Viewer


SET WEBVIEWER = {OFF|ON}
or
ON TABLE SET WEBVIEWER {OFF|ON}
where:
OFF
Disables on-demand paging; WebFOCUS downloads the entire report to a standard
browser window. OFF is the default value.
ON
Enables on-demand paging. WebFOCUS downloads the first page of a report to the
browser in the WebFOCUS Viewer. The number of lines displayed at one time depends
on Windows desktop settings (resolution).

Example: Enabling the WebFOCUS Viewer


The procedure and launch page for this example are run in WebFOCUS. They must be
tested and run in this environment.
1. Create a procedure named ONDEMAND, which displays an order report for a store in
the WebFOCUS Viewer.
Procedure:
SET WEBVIEWER=ON
TABLE FILE CENTORD
PRINT ORDER_NUM ORDER_DATE
BY STORE_CODE
WHERE STORE_CODE EQ '1003DC'
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF,$
ENDSTYLE
END
2. Create a launch page from which a user can run the report.

Developing Reporting Applications With Graphical Tools 7-33


Facilitating Report Manipulation

3. Run the launch page, and click the link. The report displays in the WebFOCUS Viewer.

Opening and Closing the WebFOCUS Viewer

How to:
Open the WebFOCUS Viewer in a Target Frame
Display a Home Page When You Close the WebFOCUS Viewer
Reference:
Closing the WebFOCUS Viewer

You can specify a target frame in which to open the WebFOCUS Viewer, and a home page
that displays when you close the WebFOCUS Viewer.

7-34 WebFOCUS7
Enhancing a User Interface

Syntax: How to Open the WebFOCUS Viewer in a Target Frame


SET WEBVIEWTARG = {target_frame|OFF}
where:
target_frame
Is the name of an existing frame in the browser or one of the following reserved HTML
target frames:
_blank opens the WebFOCUS Viewer in a new browser window. This is the default.
_self opens the WebFOCUS Viewer in the same frame as the anchor.
_parent opens the WebFOCUS Viewer in the immediate parent frame that contains
the anchor.
_top opens the WebFOCUS Viewer in the current browser window.
OFF
Opens the WebFOCUS Viewer in the frame from which you ran the report.

Syntax: How to Display a Home Page When You Close the WebFOCUS Viewer
SET WEBVIEWHOME = {home_URL|OFF}
where:
home_URL
Is a valid URL that displays an HTML page when you close the WebFOCUS Viewer.
OFF
Displays a blank browser window when you close the WebFOCUS Viewer. You must
enter another URL to run another report. OFF is the default value.

Reference: Closing the WebFOCUS Viewer


The Close button, located on the Control Frame, closes the WebFOCUS Viewer and
removes the report from the Web server. The page the browser displays next depends on
the WEBVIEWTARG and the WEBVIEWHOME settings, as follows:
❏ If you set WEBVIEWTARG to _blank, the window that contained the WebFOCUS Viewer
is removed. The browser does not display any page in any frame, and the
WEBVIEWHOME setting has no effect.
❏ If you set WEBVIEWTARG to any other value, the result of clicking Close depends on
the WEBVIEWHOME setting:
❏ If you set WEBVIEWHOME to a URL, the browser displays the page associated with
the URL in the frame that the WebFOCUS Viewer occupied.
❏ If you set WEBVIEWHOME to OFF, the browser displays a blank page.

Developing Reporting Applications With Graphical Tools 7-35


Facilitating Report Manipulation

Printing With On-Demand Paging


You must clear the browser cache before printing a report locally using the Print button on
the browser toolbar. You must also activate the window by clicking it before using the Print
button.
Use the procedure that applies to your browser to clear the cache.

Procedure: How to Clear the Cache in Microsoft Internet Explorer


1. Select Internet Options from the Tools menu.
2. On the General tab, for Temporary Internet Files, select Delete Files.

WebFOCUS Viewer Navigation


To enable the Goto Last Page button in the WebFOCUS Viewer with certain versions of
Microsoft Internet Explorer (for example, Version 4.01 with Service Pack 2), complete the
following procedure.

Procedure: How to Enable the Goto Last Page Button


1. From Internet Explorer, click the Tools menu and select Internet Options.
2. The Internet Options dialog box opens.
3. From the Temporary Internet files box, click Settings.
The Settings dialog box opens.
4. Click the Every visit to the page radio button.
5. Click OK to apply the change and exit the Settings dialog box.
6. Click OK to exit the Internet Options dialog box.

7-36 WebFOCUS7
Enhancing a User Interface

Using a Cascading Style Sheet to Standardize Display


Example:
Adding Scroll Bars to a Report

A Cascading Style Sheet is an extension to HTML that allows you to specify formatting for
an HTML page. A Cascading Style Sheet can reside either in the HTML page that it
formats, or in a separate file (with the extension .CSS), which can be shared by multiple
pages. When it is in a separate file, it is known as an external Cascading Style Sheet.
This topic illustrates the use of an external Cascading Style Sheet to add scroll bars to
reports when necessary and set standard fonts, font sizes, colors, and other display
characteristics.
For details on Cascading Style Sheets, see the Creating Reports With WebFOCUS Language
manual.

Example: Adding Scroll Bars to a Report


1. Create a procedure named SCROLL, which consists of two report requests and two
graph requests. Each request uses a WebFOCUS StyleSheet to add individual styling
features. The WebFOCUS StyleSheets for the reports call an external Cascading Style
Sheet to add standardized application styling. See the Creating Reports With
WebFOCUS Language manual for details on WebFOCUS StyleSheets and graph
formatting options.
The letters on the left correspond to the notes explaining the code.
Procedure: SCROLL
SET PAGE-NUM=OFF

TABLE FILE CENTORD


HEADING
"Sales By Store"
SUM LINEPRICE AS 'Sales'
BY SNAME
a. ON TABLE SET STYLE *
b. TYPE=HEADING, CLASS=HEAD, $

Developing Reporting Applications With Graphical Tools 7-37


Using a Cascading Style Sheet to Standardize Display

b. TYPE=TITLE, CLASS=TITLE, $
TYPE=REPORT, GRID=OFF, $
TYPE=DATA,COLUMN=SNAME,COLOR=RED,STYLE=BOLD,
WHEN=LINEPRICE LT 10000000,$
TYPE=DATA,COLUMN=LINEPRICE,COLOR=RED,STYLE=BOLD,
WHEN=LINEPRICE LT 10000000,$
ENDSTYLE
ON TABLE HOLD AS CREPORT1 FORMAT HTMTABLE
END

GRAPH FILE CENTORD


SUM LINEPRICE
ACROSS SNAME
a. ON GRAPH SET STYLE *
UNITS=IN, LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000, TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000, SQUEEZE=ON, ORIENTATION=PORTRAIT, $
DEFMACRO=COND0001, MACTYPE=RULE, WHEN=N1 LE 100000.00, $
TYPE=REPORT, FONT='VERDANA', SIZE=10, BACKCOLOR=NONE,
STYLE=NORMAL, $
TYPE=DATA, ACROSSCOLUMN=N1, COLOR=RGB(144 24 24), $
TYPE=DATA, ACROSSCOLUMN=N1, COLOR=YELLOW, MACRO=COND0001, $
ENDSTYLE
ON GRAPH SET LOOKGRAPH 3D_BAR
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET GRAPHSTYLE *
setConnectLineMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(false);
setO1MinorGridDisplay(false);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(false);
setY1MinorGridDisplay(false);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setFootnoteString("Store Sales");
setTextJustHoriz(getFootnote(),1);
setFontStyle(getFootnote(),2);
ENDSTYLE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D ON
ON GRAPH SET GRID ON
ON GRAPH SET VAXIS 200
ON GRAPH SET HAXIS 300
ON GRAPH HOLD AS CGRAPH1 FORMAT HTMTABLE

7-38 WebFOCUS7
Enhancing a User Interface

END

SET LOOKGRAPH=PIE
SET GRAPHEDIT=OFF
SET GRID=ON
SET BARNUM=ON
SET 3D=ON
SET VAXIS=250
SET HAXIS=250
GRAPH FILE CENTORD
SUM LINEPRICE
BY PRODCAT

a. ON GRAPH SET GRAPHSTYLE *


setLegendDisplay(true);
setTitleDisplay(true);
setTextRotation(getO1Label(),0);
setY1LabelFormat(10);
setO1LabelAutofit(false);
setO1LabelStagger(false);
setTextRotation(getO1Label(),0);
setFontSizeVC(getO1Label(),1500);
setY1LabelAutofit(false);
setFontSizeVC(getY1Label(),1800);
setTextWrap(getLegendText(0),true);
setRect(getLegendArea(), new Rectangle(9000, -8000,8000, 15000));
setAutofit(getLegendText(0),false);
setFontSizeVC(getLegendText(0),850);
setGroupLabel(0,"Sales By Product");
setPieTilt(45);
ENDSTYLE
ON GRAPH HOLD AS CGRAPH2 FORMAT HTMTABLE
END

TABLE FILE CENTORD


HEADING
"Sales By Product"
SUM LINEPRICE AS 'Sales'
BY PRODCAT AS 'Product'
a. ON TABLE SET STYLE *
b. TYPE=HEADING, CLASS=HEAD, $
b. TYPE=TITLE, CLASS=TITLE, $
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
ON TABLE HOLD AS CREPORT2 FORMAT HTMTABLE
END

c. -HTMLFORM scrollpg

Developing Reporting Applications With Graphical Tools 7-39


Using a Cascading Style Sheet to Standardize Display

a. These commands indicate the start of a WebFOCUS StyleSheet.


b. The CLASS attribute in the WebFOCUS StyleSheet refers to a set of styling
characteristics in an external Cascading Style Sheet (SCROLLSS.CSS, which you
create in step 3).
c. This command calls an HTML display page named SCROLLPG, which you create in
step 2. It will incorporate the report output.
2. Create an HTML display page named SCROLLPG.HTM. The WebFOCUS Reporting
Server must be able to locate this page using APP PATH or EDAPATH. See Storing and
Searching for Application Files in the Developing Reporting Applications manual for
details on search paths.
In Windows and UNIX, an HTML file called by a -HTMLFORM command must have the
extension .HTM.
The display page links to an external Cascading Style Sheet you create in step 3.
HTML Display Page: SCROLLPG.HTM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Cent Corp Demo KPI Template</title>
<link rel="stylesheet"
href="/ibi_html/NewCentCorp/scrollss.css" type="text/css">
</head>
<body>
<div class="report1">!IBI.FIL.CREPORT1;</div>
<div class="graph1">!IBI.FIL.CGRAPH1;</div>
<div class="graph2">!IBI.FIL.CGRAPH2;</div>
<div class="report2">!IBI.FIL.CREPORT2;</div>
<div id="toolbar">
<img src="/ibi_html/NewCentCorp/images/wflogo.gif" width="96"
height="14" border="0" alt="" style="position: relative;
top: 2px;">
&nbsp;
</div>
</body>
</html>

7-40 WebFOCUS7
Enhancing a User Interface

3. Create a Cascading Style Sheet named SCROLLSS, which positions the reports and
graphs on the display page, creates the scroll bars for report display, and sets text
and background colors. The Web server must be able to locate the Cascading Style
Sheet.
The letters on the left correspond to the notes explaining the code.
Cascading Style Sheet: SCROLLSS.CSS
a. { color: Navy;
font-weight : bold;
}
/* the following rule controls the default styling for fonts in
the application */
body, td {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 12px;
font-style : normal;
font-variant : normal;
font-weight : normal;
/* width : 10%; */
/* the rule below allows the scroll bars to be customized */
scrollbar-base-color : Blue;
scrollbar-arrow-color : white;
}
#toolbar {
position: relative;
top: 500;
left: 0;
width: 430px;
height: 20pt;
padding: 6px;
background: 0033ff;
border : thin outset;
}
/* the following defines position and properties of top left
report */
.report1 { position: absolute;
a. top: 30;
left: 60;
width: 200;
height: 200;
border: thin outset;
b. overflow: auto;
}
/* the following defines position and properties of top right
graph */
.graph1 { position: absolute;

Developing Reporting Applications With Graphical Tools 7-41


Using a Cascading Style Sheet to Standardize Display

c. top: 0;
left: 440;
overflow: auto;
}

/* the following defines position and properties of bottom left


graph */
.graph2 { position: absolute;
top: 246;
left: 60;
overflow: auto;
}
/* the following defines position and properties of bottom right
report */
.report2 { position: absolute;
top: 245;
left: 455;
width: 200;
height: 200;
border: thin outset;
overflow: auto;
}
/* this class sets the styling for a WebFOCUS heading */
.HEAD {
d. font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 14pt;
font-weight: bold;
color: #333366;
position: relative;
top: -13px;
}
/* this class sets the styling for WebFOCUS column titles */
.TITLE {
e. font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 11pt;
font-weight : bold;
color: Navy;
/*position: relative;
top : 3px; */
}
/* this rule controls the defaults for all tables */
TABLE {
border-collapse: collapse;
/* table-layout : fixed; */
}
/* the two rules below controls styling for various headings */
h2 { font-size: 14pt; color: gold; }
h3 { font-size: 14pt; color: white; }

7-42 WebFOCUS7
Enhancing a User Interface

/* this rule sets the style for the mouse over effect on an
anchor */
a:hover { color: red; }
a. Position the first report on the HTML page.
b. Create scroll bars if the report cannot be entirely displayed at one time in a frame.
c. Position the first graph on the HTML page.
d. Set styling characteristics that are applied to WebFOCUS report headings.
e. Set styling characteristics that are applied to WebFOCUS column titles.
4. Create a launch page that runs the procedure SCROLL to generate the following:

Developing Reporting Applications With Graphical Tools 7-43


Displaying a Previously Run Report

Displaying a Previously Run Repor t


How to:
Set Report Duration

You can display a previously run report in a browser without re-executing the request.
WebFOCUS holds a report in a cache for a set period of time. If the output for a new
request is the same as the output for a previous request, and it is still in the cache, the
browser displays the previous report with the Back, Refresh, or Reload button.
The EXPIRE_REPORTS parameter sets the period of time for which a report is held in the
cache. It is customizable for a WebFOCUS installation and affects all WebFOCUS output.
You can change the EXPIRE_REPORTS parameter in the following ways:
❏ Set the EXPIRE_REPORTS value in the CGIVARS.WFS file, which is located by default
as follows:
Windows: install_ drive:\ibi\client71\conf\etc
UNIX: /ibi/client71/conf/etc
OS/390: /ibi/client71/conf/etc
❏ Add EXPIRE_REPORTS and its revised value to the SITE.WFS file, which overrides
values in other .WFS files.

Syntax: How to Set Report Duration


EXPIRE_REPORTS = {n|300}
where:
n
Is the number of seconds for which a report is held in the cache. The default value is
300.
To ensure that a report is re-executed, set EXPIRE_REPORTS to 1.
To view a browser’s cached output using the Back, Refresh, or Reload button, set
EXPIRE_REPORTS to a large number, such as 4,000,000,000 seconds.

7-44 WebFOCUS7
Enhancing a User Interface

Passing a User ID From HTML for a Custom Menu


How to:
Customize a Menu
Example:
Step 1: Creating the HTML Logon Page
Step 2: Creating the Home Page
Step 3: Creating the Frame Pages
Step 4: Modifying the SITE.WFS Files
Step 5: Creating the User Data Source
Step 6: Creating the Menu Data Source
Step 7: Creating the Procedure
Step 8: Creating the HTML Display Page
Step 9: Creating the Forms That Call the Report Selections on the Menu
Step 10: Creating the Procedures

You can capture a user ID on an HTML logon page and pass it to a procedure. Use this
technique to create menus that display only those application functions that a user is
permitted to execute. For instance, one user may access menu options that apply to a
particular role in the organization, and another user may access certain sensitive
capabilities. The choice of menu options is based on the user ID.
The example in this topic runs on WebFOCUS for Windows.

Developing Reporting Applications With Graphical Tools 7-45


Passing a User ID From HTML for a Custom Menu

Procedure: How to Customize a Menu


The following is a summary of steps that you will complete in the example. You can modify
the steps for your own application requirements. The specified file locations are the
Windows file locations used in this example.

Step File Name File Location

1 Create an HTML logon page. A SIGNON.HTM WebFOCUS71\ibi_html


cookie is created after successful
logon, containing the user ID
(IBIC_user) entered on the page.

2 Create a home page with a HOME.HTM WebFOCUS71\ibi_html


frameset that displays custom
menu options and a report when
run.

3 Create the frame pages. MENU.HTM WebFOCUS71\ibi_html


LOADMEM.HTM
WELCOME.HTM

4 Modify the file CGIVARS.WFS to CGIVARS.WFS ibi\client71\conf\etc


assign the value of the user ID to
a Dialogue Manager amper
variable.

5 Create a user data source that USERLST.MAS srv71\ggdemo


contains user names and their USERLST.DAT
allowed menu options.

6 Create a menu data source that MENULST.MAS srv71\ggdemo


identifies and supplies a label for MENULST.DAT
all available menu options, the
location of the file accessed by an
option, and the target frame for
the output of an option. You can
customize the contents of this file
for your application.

7 Create a procedure that FHSUB.FEX srv71\ggdemo


generates a custom menu for a
user.

7-46 WebFOCUS7
Enhancing a User Interface

Step File Name File Location

8 Create an HTML display page on SUBMENU.HTM srv71\ggdemo


which the custom menu is
displayed.

9 Create the forms that call the 1MYGRAPH.THM WebFOCUS71\ibi_html


report selections on the menu. 2MYGRAP.HTM

10 Create the procedures that FHSUB.FEX srv71\ggdemo


generate the user-specific
reports.

Note:
❏ Procedures used by the WebFOCUS Reporting Server to create output, and HTM files
in which the output is embedded, must be accessible to the WebFOCUS Reporting
Server.
❏ Launch pages, menus that request reports, and images are stored in the WebFOCUS
Client on the Web server.

Developing Reporting Applications With Graphical Tools 7-47


Passing a User ID From HTML for a Custom Menu

Example: Step 1: Creating the HTML Logon Page


1. The following file is named SIGNON.HTM. Modify the lines in bold to apply to the Web
server at your site.
SIGNON.HTM:
<html>
<head>
<meta http-equiv="Content-Language" content="nl-be">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Please Identify yourself!</title>
</head>
<body stylesrc="submenu.htm" bgcolor="#CECF9C">
<p>&nbsp;</p>
<form method="POST" action="/ibi_apps/WFServlet"
name="Signon">
<table border="0" width="100%" height="112">
<tr>
<td width="66%" height="19" align="right" colspan="2">
<p align="center"><img border="0"
src="http://localhost/ibi_html/IB_LOGO.GIF"></p>
<p align="center">&nbsp;</td>
</tr>
<tr>
<td width="66%" height="19" align="right" colspan="2">
<p align="center"><b><u><font face="Verdana" size="3">Log on to
WebFOCUS reporting</font></u></b></p>
<p align="center">&nbsp;</td>
</tr>
<tr>
<td width="31%" height="19" align="right"><font face="Verdana"
size="2"><b>User ID</b></font></td>
<td width="35%" height="19"><input type="text" name="IBIC_user"
size="20"></td>
</tr>
<tr>
<td width="31%" height="18" align="right"><font face="Verdana"
size="2"><b>Password</b></font></td>
<td width="35%" height="18"><input type="password"
name="IBIC_pass" size="20"></td>
</tr>
<tr>
<td width="31%" height="57">
<p align="right"><input type="reset" value="Reset"
name="B2"></td>

7-48 WebFOCUS7
Enhancing a User Interface

<td width="35%" height="57"><input type="submit" value="Submit"


name="B1"></td>
</tr>
</table>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<input type="hidden" name="IBIWF_action" value="WF_SIGNON">
<input type="hidden" name="IBI_random" value=''>
<input type="hidden" name="WF_SIGNON_MESSAGE"
value="http://localhost/IBI_HTML/HOME.HTM">
</form>
<p>&nbsp;</p>
</body>
</html>
2. The following is the SIGNON.HTM page when accessed in the Web browser:

Developing Reporting Applications With Graphical Tools 7-49


Passing a User ID From HTML for a Custom Menu

Example: Step 2: Creating the Home Page


In this example, you create the home page with a frameset. The following HTML files
supply the content for each frame used: MENU.HTM (banner frame), LOADMEN.HTM
(contents frame), and WELCOME.HTM (query frame).

7-50 WebFOCUS7
Enhancing a User Interface

The following file is named HOME.HTM. Modify the lines in bold to apply to the Web server
at your site.
HOME.HTM:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Webfocus Reporting</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Border" content>
<meta base href="http://localhost/">
</head>

<frameset id="header" rows="68,*" framespacing="0" border="0"


frameborder="0">
<frame name="banner" scrolling="no" noresize target="contents"
src="MENU.HTM" marginwidth="0" marginheight="0" NOBORDER>
<frameset id="bodypart" cols="146,*">
<frame name="contents" target="main" src="LOADMEN.HTM"
scrolling="auto" marginwidth="3" marginheight="11">
<frameset id="querypart" rows="80,*">
<frame name="QueryFrame" src="WELCOME.HTM" target="bottom"
marginwidth="0" marginheight="0" scrolling="no" noresize>
<frame name="ReportFrame" src="WELCOME.HTM" scrolling="auto"
noresize marginwidth="12" marginheight="1" target="_self">
</frameset>
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>

Developing Reporting Applications With Graphical Tools 7-51


Passing a User ID From HTML for a Custom Menu

Example: Step 3: Creating the Frame Pages


1. The following file is named MENU.HTM. It supplies the content for the top frame
(banner). Modify the lines in bold to apply to the Web server at your site.
MENU.HTM:
<HTML>
<HEAD>
<meta base href="http://localhost/ibi_html" target="contents">
<TITLE>The JavaScript Menu Object</TITLE>
<script language="Javascript"><!---
function doprint()
{
parent.document.frames.bodypart.all("Reportframe").focus();
window.print();
}
function Show_query()
{
if (parent.frames('QueryFrame').document.title == 'Query')
{
x=parent.frames('QueryFrame').document.all('Query').offsetHeight-10;
parent.document.all("header").all("bodypart").all("QueryPart")
.rows=x+",*";
}
}

function Hide_A_query()
{
if (parent.document.all("header").all("bodypart").all("QueryPart")
.rows =='0,*')
{
resize()
}
else
{
parent.document.all("header").all("bodypart").all("QueryPart")
.rows='0,*';
}
}

function resize(){
var
x=parent.frames('QueryFrame').document.all('Query').offsetHeight-10;
parent.document.all("header").all("bodypart").all("QueryPart")
.rows=x+",*";
}

7-52 WebFOCUS7
Enhancing a User Interface

The following code validates the query.


function dovalidation(Checktype){
var boodschap=''
var frm=parent.frames('QueryFrame').frminput

// Check Required !!!


for (x=0;x<Checktype.length;x++) {
if (Checktype[x][2]=='R') {
if (frm.elements(Checktype[x][0]).value == '') {
boodschap=boodschap + '"'+Checktype[x][1]+'" is mandatory ! \n'
} } }
// End Check Required
if (boodschap != '') {return boodschap};
// Check Type !!!
for (x=0;x<Checktype.length;x++)
{
if (Checktype[x][3]=='N')
{
var anum=/(^\d+$)|(^\d+\,\d+$)/
if (anum.test(frm.elements(Checktype[x][0]).value))
{
if ((Checktype[x][4] > frm.elements(Checktype[x][0]).value) ||
(Checktype[x][5] < frm.elements(Checktype[x][0]).value))
{
boodschap=boodschap+'"'+Checktype[x][1]+'" must be within range
('+Checktype[x][4]+'-'+Checktype[x][5]+')! \n';
}
else
{}
}
else
{
boodschap=boodschap+'"'+Checktype[x][1]+'" must be a number !
\n';
}
}
else
{
if (Checktype[x][3]=='T')
{
if (frm.elements(Checktype[x][0]).value.length < Checktype[x][4]
||
frm.elements(Checktype[x][0]).value.length > Checktype[x][5])
{
boodschap=boodschap+'"'+Checktype[x][1]+'"length must be within
range ('+Checktype[x][4]+'-'+Checktype[x][5]+')! \n';
}

Developing Reporting Applications With Graphical Tools 7-53


Passing a User ID From HTML for a Custom Menu

}
else
{

if((Checktype[x][3]=='D')&&(frm.elements(Checktype[x][0]).value.length
> 0))
{
var dateStr = frm.elements(Checktype[x][0]).value;
var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;
// To require a 4 digit year entry, use this line instead:
// var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;

var matchArray = dateStr.match(datePat);


if (matchArray == null) {
boodschap=boodschap+'"'+Checktype[x][1]+'" is not a valid date!
\n';
return boodschap;
}
day = matchArray[1];
month = matchArray[3];
year = matchArray[4];
if (month < 1 || month > 12) {
boodschap=boodschap+'"'+Checktype[x][1]+'" :month must be
between 1 and 12.';
return boodschap;
}
if (day < 1 || day > 31) {
boodschap=boodschap+'"'+Checktype[x][1]+'" :day must be between
1 and 31.';
return boodschap;
}
if ((month==4 || month==6 || month==9 || month==11) && day==31) {
boodschap=boodschap+'"'+Checktype[x][1]+'" : month '+month+'
does not have 31 days!';
return boodschap;
}
if (month == 2) {
var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400
== 0));
if (day>29 || (day==29 && !isleap)) {
boodschap=boodschap+'"'+Checktype[x][1]+'" : february ' + year
+ 'does not have ' + day + ' days!';
return boodschap;
}
}
}
}
}

7-54 WebFOCUS7
Enhancing a User Interface

}
return boodschap
}

function breakout() {
mywindow=window.open("","Titel","scrollbars=yes,status=no");
mywindow.location.href=parent.frames('ReportFrame').location.href;
}
//-->
</script>
<style fprolloverstyle>A:hover {color: #FFFF00; font-family: Verdana;
font-size:8pt; font-weight: bold}
</style>
<base target="contents">
</HEAD>

<BODY style="font-family: Verdana; font-size: 8pt" class="regular"


bgcolor="#000000" link="#CECF9C" vlink="#CECF9C" alink="#CECF9C">

<table border="0" width="600" bgcolor="#000000" cellspacing="0"


cellpadding="0" bordercolor="#000000" height="62">
<tr>
<td>&nbsp</td>

<td width="57" align="center" height="1">


<p align="center"><font color="#CECF9C" size="1">
<b>
<a href='javascript:void 0' onclick='doprint();'>Print</a>
</b></font>
</td>

<td width="86" height="1" align="center">


<p align="center"><font color="#CECF9C" size="1">
<b><a href='javascript:void 0' onclick='breakout();'>
Full screen</a></b></font>
</td>

<td width="138" align="center" height="1">


<p align="center"><font color="#CECF9C" size="1">
<b><a href='javascript:void 0'onclick='Hide_A_query();'>
Hide/show Param</a></b></font>
</td>

</tr>
</table>
</BODY>

Developing Reporting Applications With Graphical Tools 7-55


Passing a User ID From HTML for a Custom Menu

2. The following file is named LOADMEN.HTM. It supplies the content for the left-hand
frame (contents). Modify the lines in bold to apply to the Web server at your site.
LOADMEN.HTM:
<html>
<head>
<title>Welcome text</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function loadmenu() {
IBI_random=Math.random()*Math.random()*Math.random()*100 ;
loadurl="http://localhost/ibi_apps/
WFServlet?IBIF_ex=fhsub&IBI_random="+IBI_random
parent.frames[1].location.href=loadurl
}
// -->
</SCRIPT>
</head>
<body bgcolor="#E0E0BE" onload="loadmenu()">
<p align="center">Loading Menu ....</p>
<p align="center">Stand by ..</font></p>
</SCRIPT>
</body>
</html>
3. The following file is named WELCOME.HTM. It provides the initial blank frame that will
be replaced by report output. No modification is required.
WELCOME.HTM:
<html>
<head>
<meta http-equiv="Content-Language" content="nl-be">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Welcome text</title>
<base target="_self">
</head>
<body bgcolor="#E0E0BE"></body>
</html>

7-56 WebFOCUS7
Enhancing a User Interface

Example: Step 4: Modifying the SITE.WFS Files


1. Open the file SITE.WFS, located by default as follows
Windows: drive:\ibi\client71\conf\etc
UNIX: /ibi/client71/conf/etc
OS/390: /ibi/client71/conf/etc
Note: At many locations, developers will not have access to the .WFS files on the Web
server. Contact your systems administrator or other appropriate staff.
2. In IBICOMMD.WFS, add the following lines after the code <ifndef>EDACS3... <endif>:
<sendvar>
RUSER=&IBIC_user
<endsendvar>
If you are modifying SITE.WFS, add these lines after the comment.
This step will send the user ID to a Dialogue Manager variable named &RUSER, which
will be used for selecting menu options in the FHSUB procedure.
3. Save the file and exit.

Example: Step 5: Creating the User Data Source


The following Master File for the user data source is named USERLST.MAS. This file must
be created in the WebFOCUS Reporting Server’s search path, either the APP PATH or
EDAPATH in EDASPROF.PRF. For details, see Storing and Searching for Application Files in
the Developing Reporting Applications manual.
FILENAME=USERLST, SUFFIX=FIX,
SEGNAME=USERLST,SEGTYPE=S0,$
FIELD=USER ,ALIAS=USER, USAGE=A8 , ACTUAL=A8 ,$ user ID
FIELD=MKEY ,ALIAS=MKEY, USAGE=A2 , ACTUAL=A2 ,$ menu key
FIELD=DUMM ,ALIAS=DUMM, USAGE=A70 , ACTUAL=A70 ,$ filler
The data source is USERLST.DAT:
CEO 01
ADMIN 02
The user ID CEO has access only to menu option 01. The user ID ADMIN has access to
menu option 02.

Developing Reporting Applications With Graphical Tools 7-57


Passing a User ID From HTML for a Custom Menu

Example: Step 6: Creating the Menu Data Source


The following Master File for the menu data source is named MENULST.MAS:
FILENAME=MENULST, SUFFIX=FIX,
SEGNAME=TCSTAB04,SEGTYPE=S0,$
FIELD=MKEY , ALIAS=MKEY, USAGE=A2 , ACTUAL=A2 , INDEX=I ,$ menu key
FIELD=RAP , ALIAS=RAP , USAGE=A25 , ACTUAL=A25 ,$ menu text
FIELD=HTM , ALIAS=HTM , USAGE=A35 , ACTUAL=A35 ,$ HTML page
FIELD=FRM , ALIAS=FRM , USAGE=A12 , ACTUAL=A12 ,$ target frame
FIELD=DUMM , ALIAS=DUMM , USAGE=A6 , ACTUAL=A6 ,$ filler
The data source is MENULST.DAT:
01REPORT1 ibi_html/1myqrap.htm QueryFrame
02REPORT2 ibi_html/2myqrap.htm QueryFrame

7-58 WebFOCUS7
Enhancing a User Interface

Example: Step 7: Creating the Procedure


The following file is named FHSUB.FEX. The JOIN command associates users with their
permitted menu options. The DEFINE command dynamically defines the hyperlinks that will
appear on the custom menu.
The value for the Dialogue Manager variable &RUSER is passed to the procedure by the
<sendvar> block in the file SITE.WFS.
Modify the lines in bold to apply to your site.
-************************************************************************
-* Calling from : LOADMEN.htm
-* Files called : sub.htm
-* Used &VARS : &RUSER -> Web user ID (IBIC_user or equivalent)
-* Files used : MENULIST.DAT -> fixed file with menu items
-* USERLST.DAT -> fixed file with users and privileges
-* Files created: rlist.htm -> temporary file with menu list
-* H1.FOC -> temporary file used in JOIN
-************************************************************************
-************************************************************************
-* Change these for customization:
-* &HOMEURL : Web server URL
-* &LSTDIR : Location of userlst.dat and menulst.dat
-* &LSTDIR : Location of rlist.htm
-************************************************************************
-*SET &ECHO=ALL;
-SET &HOMEURL='HTTP://localhost/';
-SET &LSTDIR='drive\IBI\APPS\GGDEMO\';
-SET &EDAHTMDIR='drive\IBI\APPS\GGDEMO\';
-SET &USERDAT='&LSTDIR.EVAL' || 'userlst.dat' ;
-SET &MENUDAT='&LSTDIR.EVAL' || 'menulst.dat' ;
-SET &LISTLOC='&EDAHTMDIR.EVAL' || 'rlist.htm' ;
-SET &RUSERL=&RUSER.LENGTH;
-SET &OLENGTH='A' || &RUSERL.EVAL;
-SET &UPUSER=UPCASE(&RUSERL.EVAL,'&RUSER.EVAL','&OLENGTH.EVAL');
FILEDEF USERLST DISK &USERDAT.EVAL
FILEDEF MENULST DISK &MENUDAT.EVAL
FILEDEF RLIST DISK &LISTLOC.EVAL
-RUN
-************************************************************************
-* This code creates temporary file containing all menu items
-* with index on MKEY fields needed in JOIN.
-************************************************************************
TABLE FILE MENULST
PRINT *
ON TABLE HOLD AS H1 FORMAT FOCUS INDEX MKEY
END
-RUN

Developing Reporting Applications With Graphical Tools 7-59


Passing a User ID From HTML for a Custom Menu

-************************************************************************
-* This will build the HTML syntax needed for dynamic user menu
-* with selection on user ID.
-************************************************************************
JOIN MKEY IN USERLST TO ALL MKEY IN H1 AS A
DEFINE FILE USERLST
TAGP1/A25='<TR> <TD WIDTH="100%" >' ;
TAGP2/A150=
'<A HREF=' || '&HOMEURL.EVAL' || HTM ||
' TARGET="' || FRM || '" ONCLICK="Prepare();" >' ;
TAGP3/A80='<FONT SIZE="1" COLOR="#000000" >'|| RAP ||
'</FONT></A></TD></TR>';
END
TABLE FILE USERLST
PRINT TAGP1 TAGP2 TAGP3
WHERE USER EQ '&UPUSER.EVAL';
ON TABLE HOLD AS RLIST FORMAT ALPHA
END
-RUN
-************************************************************************
-* This will call the HTM file that contains the !IBI.FIL syntax.
-************************************************************************
-HTMLFORM SUBMEN

7-60 WebFOCUS7
Enhancing a User Interface

Example: Step 8: Creating the HTML Display Page


The HTML display page is called by the procedure, and must be accessible by the
WebFOCUS Reporting Server. In Windows and UNIX, the extension is always .HTM.
The following file is named SUBMEN.HTM. It is merged with the report output generated by
the procedure FHSUB. Modify the lines in bold to apply to the Web server at your site.
<html>
<head>
<meta http-equiv="Content-Language" content="nl-be">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Submenu</title>

<SCRIPT LANGUAGE='JavaScript'>
<!-- shields up!

function Prepare () {
parent.document.all("header").all("bodypart").all("QueryPart")
.all("Reportframe").src="welcome.htm"
parent.document.IBI_random=Math.floor((Math.random()*100000));
}

function Hide_query()
{
parent.document.all("header").all("bodypart").all("QueryPart")
.rows="26,*";
parent.document.all("header").all("bodypart").all("QueryPart")
.all('QueryFrame').src='welcome.htm';
}

function set_rand()
{
parent.document.IBI_random=Math.floor((Math.random()*100000));
}
// -->
</SCRIPT>

<style fprolloverstyle>A:hover {color: #808000; font-size: 10pt;


font-family: Verdana; font-weight: bold}
</style>
<meta base href="http://localhost/ibi_html" target="main">
<base target="main">
</head>

<body style="font-family: Verdana; font-size: 8pt" bgcolor="#CECF9C"

Developing Reporting Applications With Graphical Tools 7-61


Passing a User ID From HTML for a Custom Menu

onload="set_rand()">

<table border="0" width="100%" cellspacing="0" cellpadding="0">


<tr>
<td width="100%" bgcolor="#000000">
<p align="left"><b><font size="1" color="#FFFFFF">Prototype
</font></b>
</td>
</tr>
!IBI.FIL.RLIST;
<tr>
<td width="100%"><font size="1" color="#CECF9C">.</font></td>
</tr>
</table>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p align="center"><img border="0" src="http://localhost/ibi_html/
template/powered.gif" align="baseline"></p>
</body>
</html>

7-62 WebFOCUS7
Enhancing a User Interface

Example: Step 9: Creating the Forms That Call the Report Selections on the Menu
1. The following file is named 1MYQRAP.HTM. No modification is required. The file must
be stored in the WebFOCUS client under the directory ibi\WebFOCUS\ibi_html.
1MYQRAP.HTM:
<html>
<head>
<title>Query</title>
<meta name="Microsoft Border" content>
</head>
<body name="test" topmargin="1" style="font-family: Verdana;
font-size:8pt" bgcolor="#D8D9B0" onload="resize()">

<DIV ID="Query" style="width: 713; height: 159">


<script Language="JavaScript">
<!--

function Form1_Validator(theForm){
var boodschap = ''
var terug = true
//
//Checktype[[Fieldname,Text, Required, Type,rangefrom,rangeto]]
// Type=(T,N,D), T -> Rangefrom & rangeto = length, N > range= real
range !!! - Daterange not yet supported
//
var Checktype=[[],[]];
//
// End of Validation definition
//
//
parent.frames("Reportframe").document.write('<br><p align="center">
<b><font face="Verdana" size="2">Please Wait...<BR>WebFocus is
working for you</font></b></p>');

fun1()
return (terug)

function Hide_query()
{
parent.document.all("header").all("bodypart").all("QueryPart")
.rows="26,*";
}

function resize(){
var x=document.all("Query").offsetHeight-10;

Developing Reporting Applications With Graphical Tools 7-63


Passing a User ID From HTML for a Custom Menu

parent.document.all("header").all("bodypart").all("QueryPart")
.rows=x+",*";
}

function checkaction(){
if
(parent.document.all("header").all("bodypart").all("QueryPart").rows
== '26,*') {
resize()
}
else {
parent.document.all("header").all("bodypart").all("QueryPart")
.rows='26,*';
}
}

function fun1()
{
document.frminput.IBI_random.value=Math.floor((Math.random()*100000));

}
//--></script>

<form method="GET" action="/ibi_apps/WFServlet"


style="font-weight:bold" name="frminput"
onsubmit="return Form1_Validator(this)" target="ReportFrame">
<input type="hidden" name="IBIF_ex" value="REPORT1">
<input type="hidden" name="IBI_random" value="">

<table name="tble" border="0" width="759" cellspacing="1"


style="font-family:Verdana; font-size: 8pt" height="94">
<tr>
<td width="759" align="right" bgcolor="#CFD09F" colspan="4"
height="11">
<p align="left"><font face="Verdana" size="1"><u><b>
Please provide Parameters for Report 1 </b></u></font>
</td>
</tr>
<tr>
<td width="82" align="right" bgcolor="#D8D9B0" height="25">
<font face="Verdana" size="1">Variable 1&nbsp;&nbsp;</font></td>
<td width="212" bgcolor="#D8D9B0" height="25">
<font face="Verdana" size="1">
<select size="1" name="AMP_VAR1" style="font-family:Verdana;
font-size: 8pt">
<option value="ACTION">ACTION</option>
<option value="MYSTERY">MYSTERY</option>
<option value="CLASSIC">CLASSIC</option>

7-64 WebFOCUS7
Enhancing a User Interface

<option value="CHILDREN">CHILDREN</option>
<option value="MUSICALS">MUSICALS</option>
</select></font></td>
<tr>
<td width="70" align="right" bgcolor="#D8D9B0" height="1">

<p></p>
</td>
<td width="104" bgcolor="#D8D9B0" height="27">
<font face="Verdana" size="1">
<input type="submit" value="Run" name="B1"></font>
</td>
</tr>
</table>
</form>
</DIV>
</body>
</html>

Developing Reporting Applications With Graphical Tools 7-65


Passing a User ID From HTML for a Custom Menu

2. The following file is named 2MYQRAP.HTM. No modification is required.


2MYQRAP.HTM:
<html>
<head>
<title>Query</title>
<meta name="Microsoft Border" content>
</head>

<body name="test" topmargin="1" style="font-family:Verdana;


font-size:8pt" bgcolor="#D8D9B0" onload="resize()">

<DIV ID="Query" style="width: 713; height: 159">


<script Language="JavaScript">
<!--
function Form1_Validator(theForm){
var boodschap = ''
var terug = true
//
//Checktype[[Fieldname,Text, Required, Type,rangefrom,rangeto]]
// Type=(T,N,D), T -> Rangefrom & rangeto = length, N > range= real
range !!! - Daterange not yet supported
//
var Checktype=[[],[]];

// End of Validation definition

parent.frames("Reportframe").document.write('<br>
<p align="center"><b><font face="Verdana" size="2">Please
Wait...<BR>WebFocus is working for you</font></b></p>');

fun1()
return (terug)
}

function Hide_query()
{
parent.document.all("header").all("bodypart").all("QueryPart")
.rows="26,*";
}

function resize(){
var x=document.all("Query").offsetHeight-10;
parent.document.all("header").all("bodypart").all("QueryPart")
.rows=x+",*";
}

function checkaction()

7-66 WebFOCUS7
Enhancing a User Interface

{
if (parent.document.all("header").all("bodypart").all("QueryPart")
.rows =='26,*') {
resize()
}
else {
parent.document.all("header").all("bodypart").all("QueryPart")
.rows='26,*';
}

function fun1()
{
document.frminput.IBI_random.value=Math.floor((Math.random()*100000));
}
//--></script>
<form method="GET" action="/ibi_apps/WFServlet"
style="font-weight: bold" name="frminput"
onsubmit="return Form1_Validator(this)" target="ReportFrame">
<input type="hidden" name="IBIF_ex" value="REPORT2">
<input type="hidden" name="IBI_random" value="">

<table name="tble" border="0" width="759" cellspacing="1"


style="font-family:Verdana; font-size: 8pt" height="94">
<tr>
<td width="759" align="right" bgcolor="#CFD09F" colspan="4"
height="11">
<p align="left"><font face="Verdana" size="1">
<u><b>Please provide Parameters for Report 2</b></u></font>
</td>
</tr>
<tr>
<td width="82" align="right" bgcolor="#D8D9B0" height="25">
<font face="Verdana" size="1">Variable 1&nbsp;&nbsp;</font></td>
<td width="212" bgcolor="#D8D9B0" height="25">
<font face="Verdana" size="1">
<select size="1" name="AMP_VAR1" style="font-family:Verdana;
font-size: 8pt">
<option value="ACTION">ACTION</option>
<option value="MUSICALS">MUSICALS</option>
<option value="CLASSIC"> CLASSIC</option>
<option value="CHILDREN">CHILDREN</option>
<option value="FOREIGN">FOREIGN</option>
<option value="MYSTERY">MYSTERY</option>
</select></font></td>

<td width="82" align="right" bgcolor="#D8D9B0" height="1">

Developing Reporting Applications With Graphical Tools 7-67


Passing a User ID From HTML for a Custom Menu

<font face="Verdana" size="1">Variable 2</font>


<td width="212" bgcolor="#D8D9B0" height="25">
<font face="Verdana" size="1">
<select size="1" name="AMP_VAR2" style="font-family:Verdana;
font-size: 8pt">
<option value="ACTION">ACTION</option>
<option value="MUSICALS">MUSICALS</option>
<option value="CLASSIC"> CLASSIC</option>
<option value="CHILDREN">CHILDREN</option>
<option value="FOREIGN">FOREIGN</option>
<option value="MYSTERY">MYSTERY</option>
</select></font></td>
</tr>

<tr>
<td width="70" align="right" bgcolor="#D8D9B0" height="1">
<p></p>
</td>
<td width="104" bgcolor="#D8D9B0" height="27">
<font face="Verdana" size="1">
<input type="submit" value="Run" name="B1"></font></td>
</tr>
</table>
</form>
</DIV>
</body>
</html>
The following is the 1MYQRAP.HTM page when accessed in the Web browser:

7-68 WebFOCUS7
Enhancing a User Interface

The following is the 2MYQRAP.HTM page when accessed in the Web browser:

Example: Step 10: Creating the Procedures


The following file is named REPORT1.FEX.
DEFINE FUNCTION SUBTRACT (VAL1\/D8, VAL2/D8)
SUBTRACT/D8.2 = VAL1 - VAL2;
END
TABLE FILE MOVIES
PRINT TITLE LISTPR IN 35 WHOLESALEPR AND COMPUTE
PROFIT/D8.2 = SUBTRACT(LISTPR,WHOLESALEPR);
BY CATEGORY
WHERE CATEGORY EQ '&AMP_VAR1';
ON TABLE HOLD FORMAT HTMTABLE AS REPORT1
END

-HTMLFORM BEGIN
<HTML>
<BODY>
<H2>MOVIE SALES PROFIT</H2>
<!--WEBFOCUS TABLE REPORT1>
<HR>
<P>Parameters selected </P>
<UL>
<LI> CATEGORY: &AMP_VAR1
<LI> CURRENT DATE : &DATEDMYY
<LI> CURRENT TIME : &TOD
<LI> CURRENT USER : &RUSER
</UL>
</BODY>
</HTML>
-HTMLFORM END

Developing Reporting Applications With Graphical Tools 7-69


Passing a User ID From HTML for a Custom Menu

7-70 WebFOCUS7
WebFOCUS7

8 Partitioning and Deploying Project Files

After you create, test, and debug a Topics:


project in the development environment,
❏ Deployment Basics
you are ready to make it available as a
live application on the Web environment. ❏ Summary of Steps
This process involves moving certain
❏ Step 1: Identify the Target Servers
project files to selected target servers in
a WebFOCUS environment. Developer ❏ Step 2: Create a Deployment
Studio automates the process for you. Scenario
This section describes the steps you will ❏ Step 3: Partition the Project Files
perform for successful deployment of
❏ Step 4: Deploy the Project Files
your project files to the Web
environment. ❏ Configuring the Target Servers
(Optional)
Deployment Basics

Deployment Basics
Once you create project files as described in Chapter 3, Creating a Reporting Application,
you can partition and deploy them to a WebFOCUS environment.
A WebFOCUS environment consists of:
❏ A Web server
❏ A WebFOCUS Reporting Server
❏ Alternate server nodes defined in the Data Servers area
Note: The Web environment may be a Web server or application server or a combination
of both, depending on your environment. This topic refers to deployment while using a Web
server to hold the static content, for example, .html and .gif files and required
configuration for such an environment.
If you need to place static content on the application server, you must define an
Application Root directory (APPROOT) context root for deploying files and perform required
configuration steps. The APPROOT context root is used during the deploy process and
when you run the deployed Web-based application.
Partitioning the files means that you identify the target Web server on which the Web-
based files will reside, and the WebFOCUS Reporting Server on which files such as
procedures will reside. You define the partitioning of files in a deployment scenario.
Deployment means that Developer Studio moves the files to the target servers, where
they make up an application that users run on the Web.
The Developer Studio deployment feature allows you to:
❏ Create multiple deployment scenarios. You can define multiple deployment scenarios
and save them for future use. For example, you might have two deployment scenarios
for a project, one that maps the project files to a test environment, and another that
maps the files to a production environment.
❏ Deploy files to multiple servers. You can deploy project files to multiple WebFOCUS
Reporting Servers or Maintain servers. This capability enables you to access data on
multiple servers, run report components in the most suitable environment, and
accelerate application processing.

8-2 WebFOCUS7
Partitioning and Deploying Project Files

Summar y of Steps
To take your project live, you will do the following:
❏ Step 1: Identify the target servers.
❏ Step 2: Create a deployment scenario.
❏ Step 3: Define the partitioning of the project files in the scenario.
❏ Step 4: Move the project files to a Web server and WebFOCUS Reporting Server as
defined in the scenario.
You can optionally configure the target servers for your site. For details, see Configuring
the Target Servers (Optional) on page 8-24.

Step 1: Identify the Target Ser vers


You must identify the target servers that are going to receive the project files. For details
on identifying servers, see Managing the WebFOCUS Environment in the Developing
Reporting Applications manual, and the installation and configuration documentation for
Developer Studio.

Step 2: Create a Deployment Scenario


How to:
Create a Deployment Scenario
View the Deploy Namespace Properties

A deployment scenario provides a means of identifying project files for distribution to


target servers in a WebFOCUS environment.
You can create more than one deployment scenario for a project, and you can view and
modify the properties of an existing scenario.
Developer Studio supplies a deployment scenario named Local Deploy, which it uses to
prepare files to run on a local server. Do not modify or remove Local Deploy.

Developing Reporting Applications With Graphical Tools 8-3


Step 2: Create a Deployment Scenario

Procedure: How to Create a Deployment Scenario


1. Select and right-click the project.
2. From the shortcut menu, select Project Deployment, then select New Scenario.
The New Deployment Scenario dialog box opens.

3. Respond as follows:
❏ Scenario name. Type a name for the new deployment scenario. You can change
the name at a later time with the Rename option.
❏ Use smart deploy. Choose this option to deploy only the files that have changed
since the last time you deployed the application. This option can significantly
increase the speed of deployment.
When Smart Deploy is active for a Deployment Scenario, after its first successful
deployment, date/time information is stored in your Project GFA file for each file
being deployed. Each subsequent Deploy action then compares the date-time
stamp of the source files in your project against the date/time stamps stored in
the Deployment Scenario. With Smart Deploy, only newer files will be deployed to
the destination, where the source file has a newer time stamp than the one stored
in the GFA.

8-4 WebFOCUS7
Partitioning and Deploying Project Files

Note:
The date/time information is stored uniquely in each deployment scenario, so if
your project has multiple deployment scenarios, there is no ambiguity about when
the files were last deployed using a specific scenario. Take note that each time you
first use a new deployment scenario, Smart Deploy performs a full deployment of
all files referenced for deployment in your project; subsequently only changed files
will be deployed.
Also note that Smart Deploy stores file date/time stamps in the GFA after a
successful deployment. If an error occurs during a first deployment of a new
scenario, the date/time stamps are rolled back.
If you add a new file to be deployed to a Deployment Scenario, the GFA has no
date/time stamp for a file, so it will always be deployed the first time.
❏ Ignore unresolved items. This option ensures that deployment is completed in a
case where the project deployment scenario contains an unresolved file. An
unresolved file can be either:
A project file that was used in a deployment scenario and deleted outside of
Developer Studio (or from another project in which it was shared).
or
A file located in a directory that changed and can no longer be found.
If this option is selected, the deployment scenario will not fail if it contains
unresolved files. However, when the deployment process completes, it will display
information about files skipped during the process because they were unresolved.
❏ Compile maintain procedures. Choose this option to compile Maintain
procedures during deployment. Compilation improves application performance. For
more information, see the Developing WebFOCUS Maintain Applications manual.
❏ Compile for verbose maintain trace (debug). This option is reserved for
debugging purposes. It can affect performance. For more information, see the
Developing WebFOCUS Maintain Applications manual.
❏ Include Server Paths. Choose this option to allow the deployment process to
include server paths in the Call and Exec statements within Maintain procedures.
Do not choose this option when deploying Maintain applications to platforms that
do not support APP PATH commands (for example, VM).

Developing Reporting Applications With Graphical Tools 8-5


Step 2: Create a Deployment Scenario

Click Next to proceed to the next Scenario Wizard window.

4. Respond as follows:
❏ Default partition environment. From the drop-down list, select a WebFOCUS
environment that will be used by default when you partition files. Developer Studio
automatically partitions project files for you based on the following:
HTML, GIF, JPG, VBScript, and JavaScript files are partitioned to the default Web
server. Executable WebFOCUS procedures (.FEX and .MNT files) are partitioned to
the default WebFOCUS Reporting Server.
By default, Developer Studio does not partition Master Files and Access Files in
order not to overwrite production files with the same name on the deployment
server.
Selecting an environment from this list does not force the deployment of files as
defined in the scenario.
You can change the definition of the scenario.

8-6 WebFOCUS7
Partitioning and Deploying Project Files

❏ Default reporting server. From the drop-down list, you can select which
WebFOCUS Reporting Server to use as your Default partition environment.
This list is not active if you choose the value NONE for the Default partition
environment.
❏ Target application name. Optionally, type an application name that will be used
on the Web server and WebFOCUS Reporting Server deployment paths, or use the
default value (the current project name).
If you are deploying files to your development server, you must provide a target
application name other than your development directory.
If you are deploying files to a WebFOCUS Reporting Server on OS/390 and z/OS,
the target application name can be up to 8 characters. For deployment servers on
all other supported platforms, the name can be up to 18 characters. Spaces are
not allowed. (If a space is entered, it is converted to an underscore.)
❏ Automatically partition the project files. This sets default locations based on
file types.
Click Next to proceed to the next Scenario Wizard window.

Developing Reporting Applications With Graphical Tools 8-7


Step 2: Create a Deployment Scenario

5. Respond as follows:
❏ No starting object.
❏ Select from project items. From the drop-down list, you can select a file from
the application as the starting object.
This option is enabled only when files are added to the application and when the
option to partition files has been selected.
❏ Select From WebFOCUS Environments. Allows you to select a starting object
from an existing configured WebFOCUS Environment, for example, a general launch
page.
You must ensure that the deployed application has access to the file to avoid an
error at run time.
❏ Select a web page. Allows you to select a URL as a starting object. To specify a
Web page, type the URL as a complete path to a file.
You must ensure that the deployed application has access to the file to avoid an
error at run time.
Click Next to proceed to the next Scenario Wizard window.

8-8 WebFOCUS7
Partitioning and Deploying Project Files

6. Click Finish to complete the deployment process. The following screen appears.

7. Close or minimize the deployment scenario window, known as the Scenario Editor to
return to the Explorer. The project displays a new folder labeled Deploy. Later, when
you have defined deployment scenarios, you can display them by clicking the folder.

Developing Reporting Applications With Graphical Tools 8-9


Step 3: Partition the Project Files

Procedure: How to View the Deploy Namespace Properties


1. Right-click the Deploy namespace and choose Properties.
The Deploy Properties dialog box opens, displaying the General and Comment tabs.
The General tab is selected by default. It displays the CLSID, ProgID, and a
description.
2. Optionally, type a descriptive comment for the deploy namespace in the Comment
field.

Step 3: Par tition the Project Files


In this section:
Working in a Default Partition Environment
Setting Running Paths
How to:
Partition the Project Files
Reference:
Guidelines for Deploying Files

After creating a deployment scenario, you define the details of that scenario by identifying
project files for distribution to target servers in a WebFOCUS environment.
This topic applies to deployment scenarios that you create in Step 2: Create a Deployment
Scenario on page 8-3. It does not apply to the supplied scenario Local Deploy. Developer
Studio uses Local Deploy to prepare files for Maintain and to run on a local server. This
option is visible only after you create the first deployment scenario. Do not modify or
remove Local Deploy.

8-10 WebFOCUS7
Partitioning and Deploying Project Files

Procedure: How to Partition the Project Files


1. Open the Deploy folder for the project. Right-click the deployment scenario that you are
defining, and select Open.
2. The left window pane displays information about the individual files that are visible
from the project’s search path.
The icons next to some files are grayed out. This indicates that the files are available,
but not active for your project. You can click the binoculars icon to show the files that
you added to your project and hide the inactive files. However, you can deploy even the
files that you did not add to your project.
The value of Assigned is No if the file has not been assigned to a server for
deployment. Assigned is Yes if you have assigned the file to a server for deployment.
(If you cannot see the value in the Assigned column or the full application path in the
Location column, drag your cursor to the right to expand the Application Files window.)
3. The right window pane displays the environments you have identified and optionally
configured to accept project files.
For a Web server, you can create one or more subfolders on the deployment path. For
example, you might separate HTML files from image files by creating an individual
folder, or central location, for each type:
a. Select and right-click the current Web server deployment path (for example, WEB/
APPROOT/Sales).
b. Select New Folder from the shortcut menu. At the cursor location in the entry field,
enter the name of the new folder.
Note: You must design the application properly in order to take advantage of a
multilevel directory structure on the deployment environment.

Developing Reporting Applications With Graphical Tools 8-11


Step 3: Partition the Project Files

4. In the right pane, open the environment on which you are partitioning the files. In this
example, the Test Environment includes a Web server and a server node that can be
used for deployment.

In the example:
❏ The Web server is defined by the node WEB, followed by the descriptive name
APPROOT and the name of the directory that will be created when the files are
deployed (Sales).
❏ A WebFOCUS Reporting Server is defined by the node EDA and the name of the
server (for example, EDASERVE), followed by the descriptive name APPPATH and
the name of the directory that will be created when the files are deployed (Sales).
The developer selected NONE as the default partition environment when creating the
new deployment scenario. For an example of the window that opens when you select a
default partition environment, see Working in a Default Partition Environment on
page 8-15.

8-12 WebFOCUS7
Partitioning and Deploying Project Files

5. Drag one or more files from the left window pane and drop them into the right window
pane on the applicable server.
See Guidelines for Deploying Files on page 8-14 for information that will help you
deploy files to the applicable server.
To remove a partitioned file from the right window pane, right-click it and select
Remove.
In this example, the file named launch_qty.htm is an HTML page from which a user
can run a report named stockqty.fex. To partition these files appropriately, you would
drag launch_qty.htm to the Web server, and stockqty.fex to the WebFOCUS Reporting
Server.
On the toolbar, these buttons enable you to do the following while you remain in the
Scenario Editor:

Button Description

Deploys (moves) the files to the servers based on the


- Deploy scenario partitioning defined in the current deployment scenario.

Deploys the files to the servers and then runs the


- Deploy and run starting object defined in the current deployment
scenario scenario.

Runs the starting object defined in the current


- Run scenario deployment scenario.

Displays available items in the project’s path. The icons


- Displays all next to some files are grayed out. This indicates that the
files in the project files are available, but not active for your project. You can
path click the binoculars icon to show the files that you added
to your project and hide the inactive files. However, you
can deploy even the files that you did not add to your
project.

These buttons are also available on the toolbar in the Explorer.


6. When you have finished partitioning files, choose one of the options in step 5, or
close the window. You can perform any of the options in step 5 outside the Scenario
Editor. See Step 4: Deploy the Project Files on page 8-19.

Developing Reporting Applications With Graphical Tools 8-13


Step 3: Partition the Project Files

Reference: Guidelines for Deploying Files


❏ Typically you will deploy HTML, GIF, JPG, VBScript, and JavaScript files to a Web server.
Executable WebFOCUS procedures (.fex, .mnt, and .sty files) will go to a WebFOCUS
Reporting Server.
If the deployed FOCUS procedure has a reference to a stylesheet (.sty) file, or if you
have created a report with the Report Assistant and the generated procedure uses a
stylesheet different from the default. You must deploy the stylesheet to the Reporting
Server, or else the report will not run.
To view and deploy the .sty file, you must add the filter for this file to the project level
or an available virtual folder (for example, Procedures) to view files of this type in the
project and in the Scenario Editor.
Usually you will not deploy Master Files (.MAS) or Access Files (.ACX). Master Files
and Access Files may already reside on the deployment WebFOCUS Reporting Server
or subserver in applications configured to contain them. If you deploy these types of
files, you may overwrite production files with the same name on the deployment
server.
Proprietary FOCUS data sources (.FOC) files cannot be deployed. If you try to drag and
drop an invalid file type to the Reporting Server, the following error message appears:

❏ For files containing the command -HTMLFORM filename:


❏ If you are deploying a procedure that contains -HTMLFORM filename (including
procedures created with the HTML Layout Painter), also deploy the referenced
HTML file to the WebFOCUS Reporting Server.
In this scenario, the procedure must be launched in order to execute the report.
❏ When you use the HTML Layout Painter to create reports with parameters, you
must deploy the referenced HTML file containing the launch form to both the Web
server and the WebFOCUS Reporting Server.
In this scenario, the HTML file must be launched from the Web server.

8-14 WebFOCUS7
Partitioning and Deploying Project Files

Working in a Default Partition Environment

How to:
Modify Properties of Partitioned Files

In this example, the developer selected the Test Environment as the default partition
environment when creating the deployment scenario.
Developer Studio automatically partitions the .jpg and .htm files to the Web server, and
the .fex files to the WebFOCUS Reporting Server.

Files in the Name display field that have a check icon next to them have been
partitioned.

Developing Reporting Applications With Graphical Tools 8-15


Step 3: Partition the Project Files

Procedure: How to Modify Properties of Partitioned Files


1. In the Scenario Editor, right-click a file that has been assigned to a server in the
Available Servers window and select Properties.

2. Click the Advanced tab to see the following two options:


❏ Always deploy this file.
or
❏ Never deploy this file.

8-16 WebFOCUS7
Partitioning and Deploying Project Files

3. Choose one of the options. They are unchecked by default.


Always deploy this file. Use this option when Smart Deploy is in effect to designate
specific files to be deployed even though they have not changed since the last
deployment. You can use this option for a file that has not changed but references
another file that has been assigned to a different server within the scenario.
For example, if Smart Deploy is enabled and a WebFOCUS Maintain procedure with
forms has not changed since the last deployment, by default it would not be
redeployed. But if a new Web server has been assigned for a Web-based file that is
used by one of the Maintain forms, the Maintain file (.mnt) with the form needs to be
updated with the new URLs. In this case, you would select this option for the .mnt file,
so that the form would be generated with the new Web server information.
The following are examples of other situations when you might want to use this
option:
❏ When script files are embedded in Maintain forms rather than linked, and changes
are made to the script code but not to the Maintain procedure and forms.
❏ When CALLed or EXECed procedures are assigned to different WebFOCUS servers
since the last deployment, but the calling procedure has not changed.
Never deploy this file. Use this option when you do not want to deploy a file but
information about the assigned server location is needed by other files in the
application.
In WebFOCUS Maintain applications, this option is useful when Web-based files
already reside on the target Web server and you do not need to edit files there or do
not have write access. The correct URLs will be used in the forms, without writing the
Web resource files to the Web server.
If you are also using Smart Deploy, you would need to assign the Always deploy files option
to any .mnt files that have not changed but have any associated forms that need to
reference the new Web server location.

Developing Reporting Applications With Graphical Tools 8-17


Step 3: Partition the Project Files

Setting Running Paths

How to:
Set Running Paths

You can set the execution search path for a deployed application on a Reporting Server.
The Reporting Server will use the path specified to locate the resources for that
application.
This feature is useful if you set up common resources shared by multiple applications. It
allows you to point a server to a common location to find the resources it needs to run a
specific application.

Procedure: How to Set Running Paths


1. In the Scenario Editor, expand a WebFOCUS environment under Available Servers in
the right pane. Then select and right-click a WebFOCUS Environment.
Select Paths from the shortcut menu. The Set Running Paths for Server dialog box
opens.

8-18 WebFOCUS7
Partitioning and Deploying Project Files

2. The Available Paths list box displays the application directories you can add to the
execution search path for the current application.
Select a directory or directories and click Add, or click Add All to include all directories
in the execution search path.
You can also use the Remove and Remove All buttons to make the desired
assignments.
3. In the Additional Path field, optionally enter another path to add to the execution
search path.
4. Click OK to close the dialog box.

Step 4: Deploy the Project Files


How to:
Deploy Project Files in the Explorer Using the Shortcut Menu
Reference:
Scenario Editor
Deploying Application Dialog Box

Developer Studio automates the process of moving the files to the target servers.
In addition to deploying files as described in this topic, you can deploy them in the
Scenario Editor. See Step 3: Partition the Project Files on page 8-10. The buttons on the
toolbar in the Scenario Editor are also available in the Explorer.

Developing Reporting Applications With Graphical Tools 8-19


Step 4: Deploy the Project Files

Procedure: How to Deploy Project Files in the Explorer Using the Shortcut Menu
1. Select the project. From the drop-down list on the toolbar, select the deployment
scenario.
2. Right-click the project. Select Deploy from the shortcut menu. Then select:
❏ Deploy to move the files to the servers based on the partitioning defined in the
deployment scenario.
❏ Deploy and Run to move the files to the servers and then run the starting object
defined in the deployment scenario.

The option Run on the shortcut menu runs the starting object defined in the
deployment scenario.

8-20 WebFOCUS7
Partitioning and Deploying Project Files

3. During deployment, a dialog box tracks the status. You can click Cancel to terminate
the process.
The following image shows the Deployment Progress window detailing successful
deployment of HTML files to the Web server and procedures to the WebFOCUS
Reporting Server.

Tip: You can click the Details button if you do not want to view messages during the
deployment process.
After deployment, the ACTION field indicates that one of the following occurred:
❏ Deployment Status: Succeeded, 0 warning(s), 0 error message(s).
❏ Deployment Status: Failed to complete. (The reasons for failure are shown, such
as unresolved files, etc.)
❏ Deployment Status: Cancelled by user.
During the deployment process, the File field shows the names of objects as they are
deployed to a server.
The progress bar indicates how much of the process is complete, as it takes place.
The Status field displays the events that took place in the deployment process.

Developing Reporting Applications With Graphical Tools 8-21


Step 4: Deploy the Project Files

Reference: Scenario Editor

Application Files
Displays the files in the selected project and their properties.
The value of Assigned is No if the file was not assigned to a server for deployment.
Assigned is Yes if you assigned the file to a server for deployment.
Available Servers
Displays the WebFOCUS environments to which you can deploy files.

8-22 WebFOCUS7
Partitioning and Deploying Project Files

Reference: Deploying Application Dialog Box

Tip: You can click the Cancel button during the deployment process. When deployment
ends, the Cancel button becomes a Close button.
❏ After deployment the ACTION field indicates that one of the following occurred:
❏ Deployment Status: Succeeded, 0 warning(s), 0 error message(s).
❏ Deployment Status: Failed to complete. (The reasons for failure are shown, such
as unresolved files, etc.)
❏ Deployment Status: Cancelled by user.
❏ During the deployment process, the File field shows the names of objects as they are
deployed to the server.
❏ The progress bar indicates how much of the process is complete, as it takes place.
❏ The Status field displays the events that took place in the deployment process.

Developing Reporting Applications With Graphical Tools 8-23


Configuring the Target Servers (Optional)

Configuring the Target Ser vers (Optional)


How to:
Set the Web Server Deployment Path Using the WebFOCUS Administration Console
(Windows)
Set the WebFOCUS Reporting Server Deployment Path Using the Reporting Server
Console (Windows)
Set the Web Server and WebFOCUS Reporting Server Deployment Path Using a Text
Editor (Windows and UNIX)
Set the Deployment Path (OS/390 and z/OS)
Set the Deployment Path (AS/400)
Create an Alias on the Web Server (Windows 2000)
Restrict Authorization to Deploy Files Using the WebFOCUS Administration Console
(Windows)
Restrict Authorization to Deploy Files Using a Text Editor (Windows and UNIX)
Example:
Allocating Base Application Files (OS/390 and z/OS)
Reference:
APPROOT Variable for Setting the Deployment Path
APPROOT Alias
DEVELOPERS Variable for Restricting Authorization

During installation, Developer Studio and WebFOCUS set certain variables that affect the
implementation of the deployment feature. You have the option of changing the values for
these variables to meet site-specific needs. Most sites use the default values supplied
during installation.
You can optionally specify the path in which files will reside on the Web server and the
WebFOCUS Reporting Server. The path is defined by the APPROOT variable, which you can
set in two different files, one for the Web server and one for the Reporting Server.
You also have the option of restricting the users authorized to deploy files. You can set the
DEVELOPERS variable to restrict authorization.
Follow the instructions in this topic to review or change the settings. You can use the
WebFOCUS Administration Console and the Reporting Server Console to edit the files that
contain the variables, or you can edit them manually.

8-24 WebFOCUS7
Partitioning and Deploying Project Files

You need read and write access to the Web server and WebFOCUS Reporting Server in
order to deploy files.
Note: The Application Root (APPROOT) directory of the WebFOCUS Client and Reporting
Server do not need to point to the same physical location and you can install them on
different servers or platforms.

Reference: APPROOT Variable for Setting the Deployment Path


The cgivars.wfs file contains the APPROOT variable for the path in which deployed files
will reside on the Web server. Typically these files include HTML pages, graphic images,
Cascading Style Sheets, and JavaScript files.
The cgivars.wfs file is located in:

Type of Installation Location of cgivars.wfs

Developer Studio with localhost install_drive:\ibi\srv71\wfs\etc

WebFOCUS install_drive:\ibi\client71\wfc\etc

The edaserve.cfg file contains the APPROOT variable for the path in which deployed files
will reside on the WebFOCUS Reporting Server. Typically these files include procedures,
WebFOCUS StyleSheets, and customized HTML pages that require processing on the
Reporting Server.
The edaserve.cfg file is located in:

Type of Installation Location of edaserve.cfg

Developer Studio with localhost install_drive:\ibi\srv71\wfs\bin

WebFOCUS install_drive:\ibi\srv71\wfs\bin

Developing Reporting Applications With Graphical Tools 8-25


Configuring the Target Servers (Optional)

Procedure: How to Set the Web Server Deployment Path Using the WebFOCUS
Administration Console (Windows)
1. Access the WebFOCUS Administration Console from the Start menu, choose
Programs, WebFOCUS, and WebFOCUS Administration Console.
2. On the WebFOCUS Administration Console, click Configuration from the left pane and
under Client Settings, click General.
3. Locate the APPROOT variable in cgivars.wfs. Change the setting to a directory that
exists on the Web server.
Ensure that this directory is also configured as a virtual directory on the Web server,
to allow users access to the application. For details, see APPROOT Alias on page 8-29
and How to Create an Alias on the Web Server (Windows 2000) on page 8-29.
When specifying the setting, use forward slashes (/) to separate directories, as shown
in the default setting:
APPROOT=install_drive:/ibi/apps
An example is:
APPROOT=d:/ibi/apps
During deployment Developer Studio creates a new subdirectory on the Web server
under APPROOT. For example, d:\ibi\apps\Sales.
You can add one or more subfolders to the Web server deployment path. For details,
see Step 3: Partition the Project Files on page 8-10.
4. Click Save and exit the WebFOCUS Administration Console.
Note: You must have Administrator privileges in order to modify WebFOCUS Client
configuration privileges.

Procedure: How to Set the WebFOCUS Reporting Server Deployment Path Using the
Reporting Server Console (Windows)
1. Access the Reporting Server Console:
❏ From the Start menu, choose Programs, WebFOCUS Server, and Web Console.
or
❏ In Developer Studio, expand the applicable environment under WebFOCUS
Environments. Expand Data Servers. Select the remote WebFOCUS Reporting
Server. Click the WebFOCUS Reporting server console icon on the toolbar.
2. Select Workspace from the left pane, then select Configure.

8-26 WebFOCUS7
Partitioning and Deploying Project Files

3. On the Workspace Configuration window, click the Edit edaserve.cfg button in the
upper part of the right pane.
4. Locate the APPROOT variable. Change the setting to a directory that exists on the
WebFOCUS Reporting Server.
During deployment Developer Studio creates a new subdirectory on the WebFOCUS
Reporting Server under APPROOT. For example, c:\ibi\apps\Sales.
5. Click Save and Restart and exit the Reporting Server Console.
Note: You must have Administrator privileges in order to modify WebFOCUS Reporting
Server configuration privileges.

Procedure: How to Set the Web Server and WebFOCUS Reporting Server Deployment
Path Using a Text Editor (Windows and UNIX)
1. Open the cgivars.wfs file in a text editor such as Windows Notepad.
2. Locate the APPROOT variable. Change the setting to a directory that exists on the Web
server.
Ensure that this directory is also configured as a virtual directory on the Web server,
to allow users access to the application. For details, see APPROOT Alias on page 8-29
and How to Create an Alias on the Web Server (Windows 2000) on page 8-29.
When specifying the setting, use forward slashes (/) to separate directories, as shown
in the default setting:
APPROOT=install_drive:/ibi/apps
An example is:
APPROOT=d:/ibi/apps
During deployment Developer Studio creates a new subdirectory on the Web server
under APPROOT. For example, d:\ibi\apps\Sales.
You can add one or more subfolders to the Web server deployment path. For details,
see Step 3: Partition the Project Files on page 8-10.
3. Save the changes and close cgivars.wfs.
4. Open the edaserve.cfg file in the text editor.
5. Locate the APPROOT variable. Change the setting to a directory that exists on the
WebFOCUS Reporting Server.
During deployment Developer Studio creates a new subdirectory on the WebFOCUS
Reporting Server under APPROOT. For example, c:\ibi\apps\Sales.
6. Save the changes and close edaserve.cfg.

Developing Reporting Applications With Graphical Tools 8-27


Configuring the Target Servers (Optional)

Procedure: How to Set the Deployment Path (OS/390 and z/OS)


To configure the WebFOCUS Reporting Server, set the APPSNS (application name space)
parameter to YES in the EDACFGF configuration routine. In the
qualif.INSTALL.DATA(FFSSERV) server configuration file (service block EDAAPPS), the
APPROOT variable will be set to the qualif.APP used to install and configure the server.
For example:
APPROOT=EDAYHC.V5R2M01.APP
For more information on the APPSNS parameter, see the iWay Server for MVS Configuration
and Operations Manual and the iWay Server Administration for UNIX, Windows, OpenVMS,
OS/400, OS/390, and z/OS Manual.
If you are using WebFOCUS Reporting Server for OS/390 and z/OS for deployment, the
base application files are allocated during configuration (APPSNS=YES).

Example: Allocating Base Application Files (OS/390 and z/OS)


The following is an example of base files allocated for the application:
EDAYHC.V5R2M01.APP.BASEAPP.ACCESS.DATA
EDAYHC.V5R2M01.APP.BASEAPP.FOCEXEC.DATA
EDAYHC.V5R2M01.APP.BASEAPP.FOCSTYLE.DATA
EDAYHC.V5R2M01.APP.BASEAPP.GIF.DATA
EDAYHC.V5R2M01.APP.BASEAPP.HTML.DATA
EDAYHC.V5R2M01.APP.BASEAPP.MASTER.DATA

Procedure: How to Set the Deployment Path (AS/400)


1. In the CGI_BIN/EXPORT(WEBEXPORT) directory, set the APPROOT variable to the
APPNAME defined during installation of the WebFOCUS Reporting Server for AS/400.
This value is the same one defined for APPROOT in the xxxBIN/CONFIG(EDASERVE)
file.
2. In the Web server’s HTTP configuration file, add the following lines for APPROOT:
Pass /APPROOT/* /IBI/APPS/*
Pass /approot/* /ibi/apps/*

8-28 WebFOCUS7
Partitioning and Deploying Project Files

Reference: APPROOT Alias


After you set the APPROOT variable, you may need to create an alias for it. The alias
allows browsing of the application directory and read permission.
The following will help you determine if you need to create an alias:
❏ If you are using Internet Information Server (IIS), an alias is automatically created for
you. During installation of Developer Studio or WebFOCUS, you can choose automatic
configuration of IIS.
❏ The APPROOT alias must correspond to the APPROOT path in cgivars.wfs.

Procedure: How to Create an Alias on the Web Server (Windows 2000)


1. From the Start menu, select Settings to open the Control Panel.
2. Choose Administrative Tools.
3. Choose Internet Services Manager. This selection opens a tool that allows you to
manage the IIS (the Web server).
4. In the Internet Information Services window, locate and expand the Default Web Site
node.
Right-click the Default Web Site node and choose New, followed by Virtual Directory.
5. Follow the instructions of the Virtual Directory Creation Wizard to create a new virtual
directory for APPROOT on the selected Web site.
Note: The Windows Challenge/Response is supported.

Reference: DEVELOPERS Variable for Restricting Authorization


The ibiweb.cfg file contains the DEVELOPERS variable, which identifies users with
authorization to deploy files. By default, all users can deploy files:
DEVELOPERS=*
The ibiweb.cfg file is located in:

Type of Installation Location of ibiweb.cfg

Developer Studio with localhost install_drive:\ibi\srv71\wfs\web\cgi

WebFOCUS install_drive:\ibi\client71\wfc\web\cgi

Developing Reporting Applications With Graphical Tools 8-29


Configuring the Target Servers (Optional)

Procedure: How to Restrict Authorization to Deploy Files Using the WebFOCUS


Administration Console (Windows)
1. Access the WebFOCUS Administration Console from the Start menu, choose
Programs, WebFOCUS, and then WebFOCUS Administration Console.
2. The WebFOCUS Administration Console opens. Select Configuration from the options
on the left.
3. Select Startup Parameters.
4. On the ibiweb.cfg configuration window, select the DEVELOPERS variable and click
Modify.
5. In the Usage field on the next window, enter the new value for the variable.
For an individual user, supply the user’s logon ID. The user must have write access.
For example:
DEVELOPERS=admin
For multiple users, separate IDs with a semicolon. For example:
DEVELOPERS=admin;power_user1;power_user2
6. Click Save and exit the WebFOCUS Administration Console.

Procedure: How to Restrict Authorization to Deploy Files Using a Text Editor (Windows
and UNIX)
1. Open the ibiweb.cfg file in a text editor such as Windows Notepad.
2. Locate the DEVELOPERS variable.
For an individual user, supply the user’s logon ID. The user must have write access.
For example:
DEVELOPERS=admin
For multiple users, separate IDs with a semicolon. For example:
DEVELOPERS=admin;power_user1;power_user2
3. Save and close ibiweb.cfg.

8-30 WebFOCUS7
WebFOCUS7

9 Editing Application Components as Text in


Developer Studio

Developer Studio provides a fully Topics:


integrated text editor that you can use to
❏ Text Editor
create, view, and edit the source code
for procedures, procedure components, ❏ The Other Component
Master and Access files, and other types
❏ Creating a Text File or a Procedure
of files required by your applications. The
Component as Text
text editor enables you to use familiar
Windows editing techniques, such as ❏ Opening Application Components as
cut, copy, paste, undo/redo, and drag- Text
and-drop.
❏ Finding and Replacing Text
In addition, you can: ❏ Changing Text Color and Case Size
❏ Take advantage of color-coded ❏ Adding Headings and Footings
syntax designed to make writing,
editing, and debugging procedures ❏ Using Bookmarks to Move Within a
easier. File

❏ Bookmark lines of a file for quick ❏ Running a Procedure From the Editor
editing and easy reference. ❏ Opening a Graphical Tool From the
❏ Find and replace text. Text Editor

❏ Run procedures or procedure


components directly from the Editor.
Within applications, you can open and
edit multiple procedure components in
separate Editor windows. You can also
open a supplementary text editing
window called the Other component in
order to type fragments of code (such as
Dialogue Manager syntax) or text (such
as comments) that you may wish to
incorporate into a procedure.
Text Editor

Text Editor
In this section:
Accessing Text Editors
How to:
Set Up the Default Action for the Open Option

Since the text editor is fully integrated with the graphical toolset, changes you make to
source code are immediately reflected in the graphical tools, and vice versa.
The text editor window includes:
❏ A menu bar, which provides access to all options available in the text editor.
❏ The editor window, which contains the open file, displaying color-coded text.
❏ The editor toolbar, which contains icons for frequently performed tasks such as saving
and printing; cutting, copying, and pasting; undoing and redoing; finding text; toggling
bookmarks, finding bookmarks, and clearing bookmarks; and accessing online help.
❏ When you are editing a procedure, the following additional icons appear: Report,
Graph, Define, Join, Set, Let, Filedef, Use. These icons enable you to launch graphical
tools from the Text Editor. For details, see Opening a Graphical Tool From the Text
Editor on page 9-15.
❏ A status bar that shows a help message, line and column positions, and the status of
four functions—insert, caps lock, num lock, and scroll lock.

9-2 WebFOCUS7
Editing Application Components as Text in Developer Studio

When you open a Master File, procedure, or HTML file in the Editor window, syntax
elements in the text appear color-coded for easy viewing and editing. For example, the
commands in a procedure appear in red. You can change default colors or remove text
coloring to suit your preferences. For details, see Changing Text Color and Case Size on
page 9-9.
Depending on where you place the cursor in the editor window, you can click the Open
FOCUS tool button on the text editor toolbar or right-click and select Open tool whenever
you want to edit code in a graphical tool. See Opening a Graphical Tool From the Text Editor
on page 9-15 for details.
You can access any text editor that is registered with your operating system based on the
program that is set up to be the default program that opens the selected file type. For
example, in Windows Explorer, select a .fex file, then right-click and select Properties from
the context menu. Click Change and select Notepad as the default program to open this
file type if it is not already associated with an application. The option to open procedures
(.fex files) with Notepad will now be available through Developer Studio.
This option is valuable for developers who want to take advantage of the WebFOCUS
language and use the editor of their choice.

Accessing Text Editors


You can access any text editor by right-clicking a file within the Developer Studio Explorer.
A context menu for the file appears with the following default options:
❏ Open in (Task Viewer/Text Editor/Registered Program) to edit the procedure’s
components. Depending on this setting, the following options order will change.
❏ Open in (Task Viewer). Depending on the product settings, this option may show
Open in (Text Editor) or Open in (Registered Program), for example, Notepad.
❏ Open in Text Editor to edit the procedure’s code using the Developer Studio text
editor.
❏ Open in (Registered Program) to edit the procedure’s code using an external editor,
such as Notepad.
❏ Open in auto detected tool to open the procedure in the tool used to create it (for
example, the Report Painter, HTML Layout Painter, etc.). You must use this option
if you need to open the file in the HTML Layout Painter or Compound Report
Constructor because it is the only way to open procedures created in the tool used
to create them. You cannot open procedures created with those tools from the
Task Viewer.

Developing Reporting Applications With Graphical Tools 9-3


The Other Component

Procedure: How to Set Up the Default Action for the Open Option
1. In the Explorer window, select Options from the Window menu. The Developer Studio
Options dialog box opens at the General tab.
2. From the Default file editor drop-down list, select one of the following:
❏ Edit in DevStudio tool to edit a procedure in the Developer Studio Task Viewer.
❏ Edit in Text Editor to edit a procedure in Developer Studio’ s text editor.
❏ Edit in Windows registered tool to edit a procedure in Notepad, Wordpad, or other
program as registered with the operating system.

The Other Component


In this section:
The Comment Component
How to:
Use the Other Component
Create a Comment Component

The Other component uses the text editor as a scratch pad on which you can create and
edit a procedure or a component of a procedure. You access the Other component from
the following icon on the component toolbar.
The Other component is particularly useful when you want to add code that is not
represented by a graphical tool—for example, Dialogue Manager code for managing the
flow of control within a procedure. For information on Dialogue Manager, see Managing
Flow of Control in an Application in the Developing Reporting Applications manual.
If Developer Studio recognizes the code you type as a report or graph request or a Define
or Join command, the next time the procedure opens, the appropriate component type (for
example, Report, Graph, Define, or Join) displays in the Procedures window. Similarly, if
you type text that is preceded by the characters -*, which denote a comment, when you
update the FOCEXEC, the text appears as a Comment component (see How to Create a
Comment Component on page 9-6). However, if you type Dialogue Manager code, it
appears in a component called Other. For related information, see Chapter 4, Creating a
Reporting Procedure.
Although you cannot create and save complete text files in the Other component, this
facility gives you the same text editing options as the Editor. You can also cut or copy text
to the clipboard, then paste it into a text file in the Editor window or into another Other
window.

9-4 WebFOCUS7
Editing Application Components as Text in Developer Studio

Procedure: How to Use the Other Component


1. Right-click the procedure in the Procedures folder and choose Open from the shortcut
menu. The Procedure window opens.
2. Click and hold a component connector (yellow diamond), then drag the arrow pointer
to the Other button on the component toolbar.
The text editor opens.
3. Type your code or other text. When you close the tool, your text is saved as a
procedure component.

The Comment Component


When you create and open a WebFOCUS graphical procedure, a component called
Comment appears by default in the Procedure window. It contains the name you assigned
to the procedure.

The type of component and the information contained in it are previewed below the -* icon.
The characters -* are required to identify text as a comment.
By default, the Comment component includes a comment containing the name of the
procedure. This comment is not necessary for your application, and if you wish, you can
delete it. You can also expand it by typing additional comments, introducing each new line
with the comment characters -*.

Developing Reporting Applications With Graphical Tools 9-5


Creating a Text File or a Procedure Component as Text

Procedure: How to Create a Comment Component


In the Procedure window:
1. Click and hold a component connector (yellow diamond), then drag the arrow pointer
to the Other button on the component toolbar. The text editor opens.
2. Type your comment, beginning with the characters -*. Each line of the comment must
begin with -*.
3. Close the editor and update the procedure when prompted. The text is added to the
procedure as a new Comment component.

Creating a Text File or a Procedure Component as Text


How to:
Create a Text File
Create a Text Component in a Procedure

You can use the Developer Studio text editor to create a text file from scratch using any
language. If the file you create contains an executable procedure, you can run it directly
from the text editor. See Running a Procedure From the Editor on page 9-14.
You also can create a text component in a Procedure using the Other component.

Procedure: How to Create a Text File


1. Choose TED (text editor) from the Command menu.
2. In the Open dialog box, enter a new file name in the File name box. For a file other
than a procedure (.FEX) or a Master File (.MAS) include an extension.
3. Choose a file type from the File of type list. For a procedure (.FEX) or a Master File
(.MAS), the file extension is picked up from this selection.
4. Click the Open button. The text editor opens.
Type your text and close the text editor. When prompted, save your file.
The new file is saved in the selected folder with the appropriate extension.

9-6 WebFOCUS7
Editing Application Components as Text in Developer Studio

Procedure: How to Create a Text Component in a Procedure


1. Create a new procedure:
❏ With the Procedures folder highlighted, select New from the File menu.
or
❏ Right-click the Procedures folder and select New from the pop-up menu, then
select Procedure.
The Add Procedure dialog box opens.

2. Enter a name for the new procedure in the File name field.
3. Select Procedure Viewer from the Create with drop-down list.
The Component Connector toolbox opens.
4. Click and hold a component connector (yellow diamond), then drag the arrow pointer
to the Other button on the component toolbar. The text editor opens.
5. Type your text and close the Other component. When prompted to update the
procedure (FOCEXEC), click Yes.
6. Close the procedure.

Developing Reporting Applications With Graphical Tools 9-7


Opening Application Components as Text

Opening Application Components as Text


You can view or edit one or more procedures or other text files in the text editor. If you
open multiple editor windows at the same time, you can move between them as you work.
For example, you can drag-and-drop text between open windows. You can open existing
files from the TED (text editing) option in the Command menu or from a project folder.

Procedure: How to View an Application Component as Text


You can use any of the following three methods to expose the underlying code or text for
the selected file in the editor.
1. Right-click a file, such as a procedure or Master File, in an Explorer folder.
2. Select Edit As Text from the shortcut menu.
or
1. Highlight a file, such as a procedure or Master File, in an Explorer folder.
2. Select Edit as Text from the File menu.
or
1. Choose TED from the Command menu. The Open dialog box appears.
2. Specify the type of file you want to view or edit. FOCEXEC is the default.
3. Select a file, then click Open.

Procedure: How to View a Procedure Component as Text


In addition to viewing the code for an entire procedure from a folder, you can examine and
edit the code for an individual procedure component.
1. Right-click a procedure folder in the Explorer and select Open from the shortcut menu.
2. Right-click a procedure component (for example, Report, Graph, Other), then select
Edit As Text.
You will see the underlying code for the selected procedure component in an Editor
window.

9-8 WebFOCUS7
Editing Application Components as Text in Developer Studio

Finding and Replacing Text


The Find dialog box enables you to search a file for specified text or numbers. You can
also include special characters—for example, paragraph marks and symbols—in your
search criteria. Replace enables you to search for a word and replace it with another.
Options available to narrow or speed your search are:
❏ Match Case. Finds only those occurrences with the exact combination of uppercase
and lowercase letters specified in the Find What box.
❏ Regular Expression. Searches for text using the wildcard characters “*” (matches
any number of characters) and “?” (matches any single character).
❏ Wrap around search. Searches the entire file from the current insertion point.
❏ Direction (to search). “Up” searches from the insertion point to the beginning of the
document. “Down” searches from the insertion point to the end of the document.
❏ Mark All. Marks all of the lines with instances of your search text with a bookmark.
For more information see Using Bookmarks to Move Within a File on page 9-13.

Changing Text Color and Case Size


How to:
Change the Foreground and Background Text Color
Change the Font
Change Text to Use Uppercase Letters
Change Text to Use Lowercase Letters

You can change the text editor fonts, default colors and case size in a file. This is referred
to as syntax coloring and is used in three file types: Master File (.MAS), procedure (.FEX)
and HTML (.HTM).

Developing Reporting Applications With Graphical Tools 9-9


Changing Text Color and Case Size

In addition, you can apply text color to uppercase or lowercase text using the case-
sensitive option.

Syntax Coloring Option Description

Text Regular or default text in the Text Editor.

Text Selection Text that has been highlighted in the Text Editor.

Number Numbers in the text editor.

Operator Operators in the text editor.

Comment Any text that follows a hyphen (-) and an asterisk (*). For
Master Files (.MAS), any text that follows a dollar sign ($).

Keyword Words in the FOCUS language.

End of Line Text designating the last line of syntax.

Double Quoted String Any text between double quotation marks.

Single Quoted String Any text between single quotation marks.

Quotes Any text between a single or double quotation marks.

Default Text All other text.

Background The space that all text displays on.

Procedure: How to Change the Foreground and Background Text Color


1. With the text editor open, select Options from the View menu.
The Editor Options dialog box opens.
2. Click Font/Color. The Font and Color Settings dialog box opens.
3. Under the Color group box, highlight the syntax coloring option you want to change.
4. Deselect the Automatic check box next to the Foreground and Background drop-down
lists.
The drop-down lists become active.
5. Select a Foreground color and Background color from the respective drop-down lists.
6. Click OK.
7. Click OK to close the Font and Color Settings dialog box.
8. Click OK to close the Editor Options dialog box.

9-10 WebFOCUS7
Editing Application Components as Text in Developer Studio

Procedure: How to Change the Font


1. With the text editor open, select Options from the View menu.
The Editor Options dialog box opens.
2. Click Font/Color. The Font and Color Settings dialog box opens.
3. Click Choose Font.
The Font dialog box opens
4. Select a font and type from the Font drop-down list and a size from the Size drop-down
list.
5. Click OK.
6. Click OK to close the Font and Color Settings dialog box.
7. Click OK to close the Editor Options dialog box.

Procedure: How to Change Text to Use Uppercase Letters


1. In the text editor, highlight the text you want to change.
2. Do one of the following:
❏ Select Upper Case from the Edit menu.
or
❏ Click the AB button on the Text Editor toolbar.

Procedure: How to Change Text to Use Lowercase Letters


1. In the text editor, highlight the text you want to change.
2. Do one of the following:
❏ Select Lower Case from the Edit menu.
or
❏ Click the Ab button on the Text Editor toolbar.

Developing Reporting Applications With Graphical Tools 9-11


Adding Headings and Footings

Adding Headings and Footings


You can add text that repeats at the top (heading) or bottom (footing) of every page in a
file. You can also insert the file time (the time a file was changed) and system time (the
current time) or page numbers in a file heading and/or footing.
These headings and footings settings apply to reports displayed on a printed paged. They
do not appear when the report is displayed in the Web browser.

Procedure: How to Add Headings and Footings


1. From the File menu, select Header and Footer. The Header and Footer dialog box
displays.
2. Enter the heading text in the Header field or the footing text in the Footer field. You
can do this by typing text you want included, or by clicking one of the buttons located
on the right of the dialog box:
Insert Filename includes the name of the procedure.
Insert Page Number includes the page number.
Insert Number of Pages includes the total number of pages.
Insert Date includes the date.
Insert Time includes the time.
Default restores the Header and Footer fields to the default display.
3. Select a justification for the heading and footing from the Header and Footer section:
Left left-justifies the heading or footing.
Center centers the heading or footing.
Right right-justifies the heading or footing.
4. Click OK.

9-12 WebFOCUS7
Editing Application Components as Text in Developer Studio

Using Bookmarks to Move Within a File


How to:
Apply or Remove a Bookmark
Jump to a Bookmark
Apply Multiple Bookmarks
Remove Multiple Bookmarks

The bookmark option places a bullet next to or removes a bullet from any line in a file. You
can place multiple bookmarks in a file by using the Mark All function in the Find dialog
box. Once a bookmark is added, you can jump to that bookmark from anywhere in a file. If
you have multiple bookmarks, the cursor jumps to the very next bookmark.
Bookmarks are temporary; they disappear when you close the text editor.

Procedure: How to Apply or Remove a Bookmark


1. Position the cursor anywhere in a line that you want the bookmark to appear next to.
2. Click the Toggle Bookmark icon on the editor toolbar.
or
Position the cursor on the line to be marked, then press and hold down the Ctrl key
and the F2 function key simultaneously.

Procedure: How to Jump to a Bookmark


To jump to another bookmark, click the Next Bookmark or Previous Bookmark icon on the
editor toolbar or press the F2 function key.
The cursor jumps to the very next bookmark in that file.

Procedure: How to Apply Multiple Bookmarks


1. From the Edit menu, select Find.
The Find dialog box opens.
2. In the Find What field, type the word or phrase you want to find, then click Mark All to
mark all lines that contains this text.

Developing Reporting Applications With Graphical Tools 9-13


Running a Procedure From the Editor

Procedure: How to Remove Multiple Bookmarks


Click the Clear All Bookmarks icon on the editor toolbar or close the editor window and
reopen it.

Running a Procedure From the Editor


How to:
Run a Full Procedure as Code
Run a Procedure Component as Code
Run Several Components From the Text Editor

You can run a procedure from the text editor. You also can run executable procedure
components (such as Defines and Joins) by placing the cursor within the specific section
of code or by highlighting all code applying to each component. A report or graph’s results
display in the browser. For other types of components, results simply take effect (for
example, virtual fields and fields from the joined data sources will be available for
selection in the Fields windows).

Procedure: How to Run a Full Procedure as Code


1. Open the procedure in the text editor.
2. Select Run from the File menu.
or
Click the Run icon on the toolbar. The results appear in the appropriate viewer.

Procedure: How to Run a Procedure Component as Code


1. Select the procedure, right-click it and select Edit as Text from the pop-up menu.
2. Place the cursor within or highlight the specific text you wish to run.
3. Right-click and select Run tool (where the tool corresponds to the type of code you
have selected—Report, Define, Join, Set, etc.).

Procedure: How to Run Several Components From the Text Editor


1. Open a procedure in the text editor or Other component.
2. Highlight the code to be run.
3. Right-click and select Run.

9-14 WebFOCUS7
Editing Application Components as Text in Developer Studio

Opening a Graphical Tool From the Text Editor


How to:
Add Code With a Graphical Tool From the Text Editor
Edit Code With a Graphical Tool From the Text Editor

Since the text editor is fully integrated with the graphical toolset, you can open the
following tools from the editor or the Other component: Set, Filedef, Use, Let, Join, Define,
Report, Graph. The location of the cursor in the procedure code determines where the
code is returned in the editor window. When you close a tool that you opened from the Text
editor, you return to the text editor. Any edits you saved in the graphical tool are reflected
in the code.

Procedure: How to Add Code With a Graphical Tool From the Text Editor
In the text editor or the Other component:
1. Open a procedure or a procedure component.
2. Position the cursor on a blank line at the point where you want to insert the code
generated by the tool you are about to open.
Tip: If the cursor is not located on a blank line, the new code will be inserted before
the block of contiguous code in which the cursor is positioned.
3. Click one of the following icons on the toolbar: Set, Filedef, Use, Let, Join, Define,
Report, Graph. The corresponding graphical tool opens.
4. Create the procedure component and close the tool.
5. When you are asked if you want to update the procedure, click Yes.
You return to the text editor, where the new code has been inserted.

Procedure: How to Edit Code With a Graphical Tool From the Text Editor
In the text editor or the Other component:
1. Open a procedure or a procedure component.
2. Position the cursor on the line containing the code you want to edit, and click the
Launch FOCUS Tool icon on the toolbar.
The appropriate graphical tool opens.
3. Edit the procedure component and close the tool.
4. When you are asked if you want to update the procedure, click Yes.
You return to the text editor, where the code has been revised.

Developing Reporting Applications With Graphical Tools 9-15


Opening a Graphical Tool From the Text Editor

9-16 WebFOCUS7
WebFOCUS7

10 Creating an Update Application With Update


Assist

Update Assist provides a simple way to Topics:


create Web-based data source file
❏ Update Assist (Step 1 of 6):
browsers and data maintenance
Selecting Segments to Update
applications in just a few minutes
without having to write code. ❏ Update Assist (Step 2 of 6):
Selecting Fields to Update
You can create applications with the
Update Assist that add records, update ❏ Update Assist (Step 3 of 6):
records, or perform a combination of Selecting Navigation Options
add, update, delete, and search
❏ Update Assist (Step 4 of 6):
functions against any data source for
Selecting a Color Scheme
which you have read/write access. Data
navigation and input validation are ❏ Update Assist (Step 5 of 6):
automatic. This means you get an Selecting Output File Options
update application with no need to ❏ Update Assist (Step 6 of 6):
design forms, or to write navigation, Confirming Selections
validation or update procedures.
❏ About Your Update Assist Application
To start using Update Assist, do the
following: ❏ Editing Your Update Assist
Application
1. Open a project.
❏ Calling an Update Assist Procedure
2. Right-click any Master File in the From a WebFOCUS Report
project’s path and click Update
Assist.
3. Follow the directions in the Update
Assist dialog boxes.
The six Update Assist dialog boxes
correspond to the six steps for
generating Update Assist applications.
Update Assist (Step 1 of 6): Selecting Segments to Update

Update Assist (Step 1 of 6): Selecting Segments to Update


The first window of Update Assist shows you the structure of the master file and prompts
you to select the segments you want to update.

This window contains the following fields/options:


1. Select lowest segment or hierarchy you would like to auto update...
Contains a list of all the segments in the Master File you selected. If this is a flat file
or a relational file, you will only see one segment.
If this is a hierarchical file or a joined view, you will see more than one segment.
Select the lowest segment containing fields that you want to update (the one farthest
down in the list).
2. Check the segment(s) to generate auto update logic...
Contains the selected segment, plus any segments that are above it. If this is a:
❏ Flat file or a relational file, only one segment will appear. Select the segment.
❏ Hierarchical file, there may be more than one segment. Select the segments that
contain the fields you want to update.

10-2 WebFOCUS7
Creating an Update Application With Update Assist

Update Assist (Step 2 of 6): Selecting Fields to Update


In this section:
Change in When User-Supplied Data Is Validated
How to:
Rename a Segment or a Field
Resort Fields in the Segment & Field Options Window
Enable the Search Button in Your Application
Use a Range to Validate a Field
Use a Static List to Validate a Field
Use a Dynamic List to Validate a Field

In the second window of Update Assist, you select the fields you want to update.

Developing Reporting Applications With Graphical Tools 10-3


Update Assist (Step 2 of 6): Selecting Fields to Update

This window contains the following fields/options:


Update Segment Options
Contains a list of the segments you selected in the previous window. In order to
enable changes to any of the fields in a segment, select the segment and turn on the
Add, Update, Delete and Partial Key options.
If you want to add a Search button to your application, turn on Partial Key. For more
information, see How to Enable the Search Button in Your Application on page 10-6.
Field View Options
Contains the fields in the segment that you selected in the Update Segment Options
section. Once you have enabled changes to the segment as a whole, you can set
change options for each individual field in the segment.
Visible
Determines whether the field is visible to the user.
Changeable
Determines whether the user can change the field. This option is available only if
Add or Update was selected in the Update Segment Options section.
Note: A key field cannot be changed.
Tip: You can select multiple fields and then click once to change the Visible or
Changeable settings.

10-4 WebFOCUS7
Creating an Update Application With Update Assist

Validation
Applies a validation technique which verifies the value a user enters in the field.
This option is available only if Changeable is set to Yes.
The options for Validation are:
Automatic, the default validation option, validates the user’s entry against the
field format defined in the Master File. This automatically supports validation for
Alphanumeric, Numeric (including Floating Point and Integer), and Date formats.
The validation is performed using client-side JavaScript and doesn’t require the
server to validate the data.
Range allows you to define a numeric range between which data is valid for the
field. See How to Use a Range to Validate a Field on page 10-7 for details. This
option is best used for numeric fields.
Static List allows you to supply a list of valid values from which the user selects
at run time. When Static List is selected, the Field Validation - List dialog box
opens. See How to Use a Static List to Validate a Field on page 10-8 for details.
Dynamic List allows you to supply a list of valid values for the field that are
retrieved from a specified data source at run time. When Dynamic List is
selected, you are prompted for the Master File and field from which to retrieve
values. See How to Use a Dynamic List to Validate a Field on page 10-9 for details.
None does not perform a validation.
Required field specifies that the user must supply a value for the field.

Change in When User-Supplied Data Is Validated


Before Version 5 Release 2.3, applications generated with Update Assist performed field-
level validation of user entries any time a user tabbed or clicked their mouse to move from
one field to another on the form. As of Version 5 Release 2.3, rather than performing
validation as users enter data into each field, applications generated with Update Assist
validate data only when the user submits the information, for example, by clicking Save if
the form contains a Save button. If the form does not contain a Save button, data is
submitted when the user clicks Next to go to the next step.

Procedure: How to Rename a Segment or a Field


You can easily rename a segment or field as it is displayed to the user (this is called the
Display Name).
1. Right-click the segment or field.
2. Click Rename.
3. Type the new name and press Enter.

Developing Reporting Applications With Graphical Tools 10-5


Update Assist (Step 2 of 6): Selecting Fields to Update

Procedure: How to Resort Fields in the Segment & Field Options Window
You can change the order of the fields as they appear in the window.
1. In the upper right corner of the Field View Options pane, click the pull-down arrow to
the right of the the alphabetical sort icon.
2. To sort fields by:
❏ Display name, select Display Name from the drop-down menu.
❏ Original name, select Name from the drop-down menu.
❏ The order in which they appear in the Master File, select Original order from the
drop-down menu.
Note: This does not affect the order of the fields in your application. In the application,
the fields are sorted according to their order in the Master File.

Procedure: How to Enable the Search Button in Your Application


You can use the Partial-Key option to place a Search button in your application. At run
time, the user can click the Search button, enter a key value to select a record, and then
display field values for that record.
1. Select the segment for which you want to enable Search.
2. Set Partial-Key to Yes.
A Partial-Key View tab is added to the window.
3. Click the Partial-Key tab.
4. Select the fields that you want to appear in the table at run time.
Tip: If you entered Display Names in the Single Record View tab, you can click any entry in
the Display Name column here to use those entries.

10-6 WebFOCUS7
Creating an Update Application With Update Assist

Procedure: How to Use a Range to Validate a Field


When you choose the Range option to validate a field, Update Assist opens the Field
Validation - Range dialog box. You use this option with numeric fields to specify a range of
values for any information the user enters.

1. Enter a From value to indicate the beginning of the acceptable range of values.
2. Enter a To value to indicate the end of the acceptable range of values.
3. Click OK.

Developing Reporting Applications With Graphical Tools 10-7


Update Assist (Step 2 of 6): Selecting Fields to Update

Procedure: How to Use a Static List to Validate a Field


When you choose the Static List option to validate a field, the Field Validation - List dialog
box opens. Use this option to specify a static list of values that the user can select from a
pull-down list.

1. To enter new acceptable field values, click the button, type the text for the value
and press Enter.
2. To edit an existing value, select it, make any changes, and press Enter.

3. To delete an existing value, select it and click .

4. To change the order of the values, use the and buttons.


5. When you are done, click OK.
Note: When populating a Static list, make sure you scan the data source for all possible
values and enter them into the list. If you leave a value off the list that’s in a current
record and that record is selected for update, the value for the bound column will change
to the first item on the Static List.
Tip: If a field is not required and you want to give your user the option to leave it blank,
put an empty entry in as the first item in your Static list.

10-8 WebFOCUS7
Creating an Update Application With Update Assist

Procedure: How to Use a Dynamic List to Validate a Field


When you choose the Dynamic List option to validate a field, you specify a field in the data
source that contains the possible values. At run time, a list of values is retrieved from that
data source and the user can then select one of these values from a pull-down list.
The real power of Dynamic Lists is that you can add items to the lists in your Update
Assist applications without having to make changes to the application’s forms code. Static
lists require you to edit the forms in your Maintain application using the Maintain
Development Environment. For example, if you choose to use a flat file as the source of
items in your lists, you can simply add items to the flat file or export a new flat file from
your data source to change the list; you do not need to change a line of application code.
1. In the Open dialog box, select a Master File for the data source containing the values
for the field and click OK. You can use any data source type supported by WebFOCUS.

Developing Reporting Applications With Graphical Tools 10-9


Update Assist (Step 2 of 6): Selecting Fields to Update

2. The Field Validation - File dialog box opens. Select the name of the field in the data
source that contains the values you want to validate against and click OK. (If you want
to select a different data source, click Browse.)

Important:
❏ If you use a flat file as the data source for a dynamic list, remember that you will need
to FILEDEF the DAT or FTM file to be used or WebFOCUS will not be able to find the
data. (If you do not FILEDEF this file, when you run your application, the pull-down list
will be empty.)
You can use FILEDEF APP or standard FILEDEF to accomplish this. If you are deploying
the application to a remote server, using FILEDEF APP rather than DISK is
recommended, as FILEDEF APP is able to locate resources when the WebFOCUS
Server is in the same directory or disk, or is on a different platform. For more
information on the FILEDEF command, see Defining and Allocating WebFOCUS Files in
the Developing Reporting Applications manual.
You can either place the FILEDEF statement into the EDASPROF for the remote server,
or add it as the first line to the listfill.fex that gets created for your application.
(Update Assist automatically generates listfill.fex every time you select Dynamic List.)
❏ You cannot deploy a flat file, which is a data file, to a remote target server. You must
either create the file on the target server or transfer it using FTP or another file
transfer method.

10-10 WebFOCUS7
Creating an Update Application With Update Assist

Tips:
❏ We recommend you do not use the same column as the column that will be bound to
the data source for update. Not only does this limit your user’s entries to those
already in the data source, but it could cause unnecessary performance issues for
your application if there are thousands of records in the data source. If there is no
existing data source column that can be used, we recommend you set up a flat file as
the list source for that field.
❏ Make sure that listfill.fex gets deployed properly with your application.

Update Assist (Step 3 of 6): Selecting Navigation Options


The third window of Update Assist is where you determine what the user interface for your
Update Assist application will look like.

Developing Reporting Applications With Graphical Tools 10-11


Update Assist (Step 3 of 6): Selecting Navigation Options

This window contains the following fields/options:


Do not generate any user interface for this project
Generates a project with no user interface.
Prompt user to enter database security information (DBA)
Generates a page prompting the user to enter a password to access the data in the
data source. Use this option if data source security is enabled.
The application will store the password in a cookie, so the user will only be prompted
for it once.
Generate results page
Displays a new window with the phrase “Your changes have been saved” when a user
performs a Save or Delete action (which is what most users expect from a Web
application).
This option is most appropriate when you select Do not generate any user interface for
this project. The best use of the results page is in an application that calls the
Maintain procedure directly using a URL and displays the Maintain form in a frame or
iFrame of the application’s workspace, as opposed to presenting a full navigation
using the Tree, Combo, or Edit box. The results page might seem counterintuitive for
users who are using Tree, Combo, or Tidbits navigation, as it takes the user out of the
context of the edit forms and requires them to re-navigate to their information or click
the browser’s Back button to return to a form with controls.
Key values selected via tree
Generates a form in which the user selects records using a hierarchical tree control.
Key values selected via combobox
Generates a form in which the user selects records using a combo box.
Key values entered by user
Generates a form in which the user selects records by entering key values.
Note: This requires that the user knows the actual values for the key values.
No key values required
Generates a Maintain procedure to be called by another procedure (usually a
WebFOCUS report) with the appropriate values to fill out the screen. To see how to
create the WebFOCUS report that calls this type of Update Assist project, see Calling
an Update Assist Procedure From a WebFOCUS Report on page 10-25.

10-12 WebFOCUS7
Creating an Update Application With Update Assist

Update Assist (Step 4 of 6): Selecting a Color Scheme


The fourth window of Update Assist is where you select the color scheme for your Update
Assist application.
Select a color scheme and click Next. To see a preview of the color scheme and more
information about it, select the particular color scheme and click Show details.

Tip: If you have detailed knowledge of WebFOCUS Maintain, are familiar with Cascading
Style Sheets, and are able to write in XML, you may choose to create a customized color
scheme and appearance for your application. For technical documentation on how to do
so, contact your Information Builders representative.

Developing Reporting Applications With Graphical Tools 10-13


Update Assist (Step 5 of 6): Selecting Output File Options

Update Assist (Step 5 of 6): Selecting Output File Options


In the fifth window of Update Assist, the names of the files that Update Assist will
generate are listed. You can rename these files if necessary.

This window contains the following fields/options:


Output Filenames:
Lists the files that will be created by Update Assist.
Rename
Allows you to change the selected file name.

10-14 WebFOCUS7
Creating an Update Application With Update Assist

Update Assist (Step 6 of 6): Confirming Selections


In the last window of Update Assist, you confirm all of your settings and generate the
application files.

This window contains the following fields/options:


Project summary
Lists the files that Update Assist is creating and summarizes the operations the
project can perform on the data source. To make changes, press the Back button until
you reach the screen containing the information you want to change.
Make this project use compiled Maintain procedures
Select this option when you are finished debugging your project. Compiled procedures
run more quickly, but it takes time to compile them.
Automatically run this project when you press the ‘Finish’ button
Deselect this option if you do not wish to run the project immediately, for instance, if
you wanted to perform further editing on your project files.

Developing Reporting Applications With Graphical Tools 10-15


About Your Update Assist Application

About Your Update Assist Application


How to:
Run Your Update Assist Application
Use the Search Button
Reference:
Files Generated By Update Assist
Working With Empty or New Data Sources

Once you click Finish in the last Update Assist window, Update Assist generates the files
needed for your application and deploys and runs the application, if specified. This section
describes how to run your application from outside this window and about how Update
Assist applications work.

Procedure: How to Run Your Update Assist Application


Once you have generated an Update Assist application, you can run it any time your
WebFOCUS Server is running. To do this, navigate to the URL:
http://yourmachine/approot/appname/launchname.htm
where:
yourmachine
Is the name of your machine on the network. If you are at the machine where the
WebFOCUS Server is running, you can type localhost.
appname
Is the name of your project.
launchname.htm
Is the name of the HTML launch file for the Update Assist application. The default
value for launchname is the name of your Master File.

10-16 WebFOCUS7
Creating an Update Application With Update Assist

Reference: Files Generated By Update Assist


Update Assist generates the following files:

File name Purpose


MasterFileName.htm Is the launching HTML file for your application and
where: contains user interface information.

MasterFileName
Is the name of your Master
File.
MasterFileName_navbar.htm Contains more user interface information and
determines the appearance of the Tree, Combo Box
and Edit Box options. For more information on ways
you can edit this file, see Changing the Search Field
for Tree and Combo Box Navigation on page 10-19
and Customizing the Tree Control on page 10-22.
mntSignon.htm Contains the window prompting you for your data
source password (only if you selected Prompt user
to enter database security information (DBA) in Step
3).
SegmentName.mnt Contains the Maintain language code to display and
where: modify the fields in that segment of the data
source. You will see a Maintain procedure for each
SegmentName segment that you selected in Step 1.
Is the name of one of the
segments in your Master
File.
SegmentName_validationInit Contains the JavaScript code to automatically
.js validate user-entered values (only if you selected
where: Automatic validation for any field).

SegmentName You will see a JavaScript file for each segment that
Is one of the segments in you selected in Step 1.
your Master File.

Developing Reporting Applications With Graphical Tools 10-17


About Your Update Assist Application

File name Purpose


color_name.gif (multiple) Are used in the user interface.
where:
color
Is the color scheme you
selected in Step 4.
name
Is the user interface
element.
listfill.fex Contains code to extract values for a dynamic list
(for more information, see How to Use a Dynamic
List to Validate a Field on page 10-9).

Procedure: How to Use the Search Button


If you turn on Partial-Key for any segment in your Master File, a Search button is placed in
your application.
The user can click this button and enter any key field value in the box. Use $ to represent
any character; * to represent multiple characters.
For example, entering 1$* retrieves all records where the key field begins with a 1 and is
at least 3 characters long.

Reference: Working With Empty or New Data Sources


❏ In tree navigation: If you have selected the Add option for any data segments that
do not contain data, the Tree will display a dot for the null segment. You can right-click
on the dot to enter new data for that segment.
❏ In combo box navigation: For any data segments that do not contain data, the
combo boxes display a [New] command. This option enables you to enter new records.

10-18 WebFOCUS7
Creating an Update Application With Update Assist

Editing Your Update Assist Application


In this section:
Changing the Search Field for Tree and Combo Box Navigation
Customizing the Tree Control
Calendar Control for Date-Formatted Fields
Date-Stamping Fields
Auto-numbering Fields in Update Assist Applications
Continuing Displaying Currently Displayed Values After a New Action

When you click Finish in the Update Assist (Step 6 of 6) - Summary dialog box, the files
that comprise your Update Assist project are generated (for a list of files, see Files
Generated By Update Assist on page 10-17).
If you wish, you can perform further editing on these files.

Changing the Search Field for Tree and Combo Box Navigation

How to:
Change the Search Field for Tree and Combo Box Navigation
Generate Folders for Non-Unique Search Fields
Define a New Unique Field in a Master File
Example:
Creating a Unique Field for the MOVIES Data Source

If you select either Tree or Combo Box navigation for your Update Assist project, by default
the navigation displays the keys for each selected segment. This is a safe choice because
keys are always unique. Tree and Combo Box navigation code automatically ensures that
duplicates will be removed.
Not all users find keys friendly. In many cases, the record key is an integer or a unique
alphanumeric code. When users are trying to locate a particular record, they seldom do so
by scanning a list of key code values.
You can easily change the search field from the key field to a more friendly field by editing
the segname_navbar.htm file. However, if the new friendly field is not unique, you will only
be able to select the first instance of each value. For example, suppose your database
contains a list of movies, and there are two movies named Airplane.

Developing Reporting Applications With Graphical Tools 10-19


Editing Your Update Assist Application

There are two methods to solve this problem:


❏ Specify a folder for each friendly field that will contain duplicate titles, and show each
unique key for the duplicate inside that folder.
❏ Create a DEFINE field that concatenates the friendlier field with the key field (which as
you know is always unique). Use that as the display field for the tree or combo box.

Procedure: How to Change the Search Field for Tree and Combo Box Navigation
1. Open the file segname_navbar.htm in a text editor.
2. Find the constructFields() function at the bottom.
3. For the call to fieldInfo.AddField(), change the sixth parameter (the displayfield) to the
field name you want to use on display. Make sure to leave the quotes around the field
name.

Procedure: How to Generate Folders for Non-Unique Search Fields


1. Open the file segname_navbar.htm in a text editor.
2. Find the constructFields() function at the bottom.
3. Above the existing call to fieldinfo.addfield(), add a call as follows:
fieldInfo.addField("friendlyfield",
"friendlyfield",
"segname",
null,
false,
"friendlyfield",
false,
true,
true,
"friendlyfield",
"segname",
null);
where:
friendlyfield
Is the name of your friendly field.
segname
Is the name of the segment in which the friendly field resides.

10-20 WebFOCUS7
Creating an Update Application With Update Assist

Procedure: How to Define a New Unique Field in a Master File


To use a DEFINE field as the displayed value:
1. Edit the Master File for the data source as text.
2. Create a DEFINE field by adding the following line to the end of the fields in the
segment:
DEFINE newfield/An=keyfield | friendlyfield
where
newfield
Is the name of your new field.
An
Is the format for your new field. n is the sum of the format for your key field and the
format for your friendly field.
keyfield
Is the name of your unique key field
friendlyfield
Is the name of the friendly field
Tip: You may wish to add some punctuation between the two fields, for example, a
comma or dash. Don’t forget to increase the size of your new field by the appropriate
number of characters.

Example: Creating a Unique Field for the MOVIES Data Source


Adding the following code to the end of the MOVIES Master File defines a field that
concatenates the TITLE field with the MOVIECODE field, which will appear in parentheses:
DEFINE TITLEKEY/A50 = TITLE | ' (' || MOVIECODE || ')';$

Developing Reporting Applications With Graphical Tools 10-21


Editing Your Update Assist Application

Customizing the Tree Control


The Tree control option for Update Assist applications enables users to find the record
they are looking for by navigating through a tree hierarchy. You can edit the following
JavaScript variables in the segname_navbar.htm file to control this hierarchy:
❏ maxNodesPerFolder: an integer value that controls the maximum number of nodes
that can be displayed in each folder. If the number of nodes exceeds this number, the
Tree control automatically splits the nodes up using sub-folders labeled with a range
of the node values contained within.
❏ maxFolders: an integer value that determines the maximum number of folders that
can be rendered. The total number of nodes that will be rendered will be divided up
amongst these folders.
Note: If the maxNodesPerFolder and maxFolders values are set in a way that would cause
a conflict, the setting for maxFolders takes precedence over maxNodesPerFolder.

Calendar Control for Date-Formatted Fields


A calendar icon appears next to changeable date-formatted fields. When a user clicks the
calendar icon, a calendar appears; any date selected on this calendar is entered into the
date field. Users can also enter dates into the date field manually.

10-22 WebFOCUS7
Creating an Update Application With Update Assist

Date-Stamping Fields

How to:
Date-Stamp a Field in an Update Assist Application
Example:
Date-Stamping a Field in the MOVIES Data Source

Many DBMSs allow you to create a “time stamp” field. This automatically fills the field
with the current date and/or time and saves the user having to do it. There are many
reasons at an application level for doing this; the most common is to give reporting
applications some way to track when a record was first created or when each change was
entered.
Note: If you are using an external DBMS that directly supports Date and Time Stamp field
types, you won’t need to use this technique. Instead, make sure the field that contains
the time stamp is set to Changeable = No to prevent Update Assist from even touching
that field.

Procedure: How to Date-Stamp a Field in an Update Assist Application


To date-stamp a field in an Update Assist application, so that when a user clicks New, your
application can set the initial value of the field to today’s date in the stack before it’s
displayed in the form:
1. Open the SegmentName.mnt file in the Maintain Development Environment.
2. Add this line of code to the top of the maintain, just above Case Top:
MODULE IMPORT(MNTUWS);
This imports the library of functions shipped with WebFOCUS Maintain.
3. Scroll down to the newrecord case and add this code right below the first Stack Clear
statement:
COMPUTE TheDate/MDY = Today();
COMPUTE stack.datefield = TheDate;
Where stack and datefield are the stack name and field name to which you want to
assign the current date.
Note: If you have multiple fields that need to be set to today’s date, you only need to set
the variable TheDate once and can re-use it as many times as you need.

Developing Reporting Applications With Graphical Tools 10-23


Editing Your Update Assist Application

Example: Date-Stamping a Field in the MOVIES Data Source


If you wanted the Release Date field from the MOVIES data source to contain the current
date, your code would look like this:
COMPUTE TheDate/MDY = Today();
COMPUTE Movinfo_stack.RELDATE = TheDate;

Auto-numbering Fields in Update Assist Applications


Some DBMSs allow you to create an “auto-number” field. This automatically fills the field
with a sequence number that’s the last record’s index plus one. This saves the user having
to make up an arbitrary key for the record, so it’s a popular feature.

Procedure: How to Auto-Number a Field in an Update Assist Application


To auto-number a field in an Update Assist application, so that when a user clicks New,
your application can set the initial value of the field to the next sequence number in the
stack before it’s displayed in the form:
1. Open the SegmentName.mnt file in the Maintain Development Environment.
2. Scroll down to the newrecord case and add this code right below the first Stack Clear
statement:
Stack clear SegmentNameStk;
For all next MasterFileName.SegmentName.autonum into SegmentNameStk;
NextVal/I5 = SegmentNameStk(SegmentNameStk.FOCCOUNT).val + 1;
Stack clear SegmentNameStk;
Note: If you are using an external DBMS that directly supports Date Stamp field types,
you won’t need to use this technique.

Continuing Displaying Currently Displayed Values After a New Action


By default, Update Assist clears all text boxes and controls in the form on a New action.
You can have the values stay in the text boxes by editing the SegmentName.MNT file.
For example, users of some types of applications may be entering many similar records,
one after another, and would like to display a record, then essentially have the New action
display a copy of the record which they can tweak and edit before clicking Save.

Procedure: How to Continue Displaying Currently Displayed Values After a New Action
1. Open the SegmentName.MNT file and go to the newrecord case.
2. Comment out the line that clears the stack, using a double dollar sign.

10-24 WebFOCUS7
Creating an Update Application With Update Assist

Calling an Update Assist Procedure From a WebFOCUS Repor t


In this section:
Calling an Update Assist Project From a WebFOCUS Report Example
How to:
Call an Update Assist Maintain Procedure From a WebFOCUS Report
Example:
Creating an Update Assist Project For the Videotrk Data Source
Creating a Report With the Videotrk Data Source

One way to use an Update Assist procedure is to call it from a WebFOCUS report. You can
set up the WebFOCUS report so that a user can click on a row in the report and open the
Update Assist procedure with the data from the row of the report.

Procedure: How to Call an Update Assist Maintain Procedure From a WebFOCUS Report
1. Create an Update Assist procedure that includes the following selections:
a. In the Update Assist (Step 3 of 6) - Navigation Options window, select No key
values required for your user interface.
b. In the Update Assist (Step 5 of 6) - Output File Options window, note the names of
your procedures. By default, Update Assist names them after the segments they
are modifying in the data source.
2. In the Report Painter, create a report using the same data source you used for the
Update Assist project. The report must contain the key fields in the segment you want
to update (if you don’t want to view them in the results, you can make them invisible).
3. Select the column you want to make “clickable” in the report, then select Options from
the Properties menu.
The Field Properties dialog box opens.
4. Click the Drill Down tab and select Column Data from the Active Object drop-down list.
This means the users can’t drill down from the title of the column in the report, only by
clicking on the column’s data.
5. In the Drilldown Definition drop-down list, select Maintain Procedure. This specifies
that when the user clicks on one of the last names in the report, a Maintain procedure
is executed.
6. Enter the name of the Maintain procedure you want to execute in the Procedure name
field.

Developing Reporting Applications With Graphical Tools 10-25


Calling an Update Assist Procedure From a WebFOCUS Report

7. Specify the parameters that get passed to the Maintain procedure:


a. Click Add in the With Parameters section.
The Drill Down Parameter dialog box opens.
b. For each key field in the segment, enter the following in the Parameter name field:
segname_fieldname_Edit

where:
segname is the name of the segment that contains the key field.

fieldname is the name of the key field (a key field uniquely identifies a record in
a segment).
_Edit must be typed exactly as shown. This is Update Assist’s convention for
naming variables.
c. Click OK.
d. Repeat for each parameter that is to be passed to the Maintain procedure.
Note: You must pass all key fields needed to locate the record you want to update;
otherwise the Maintain procedure will not have enough information to uniquely identify
a record. For example, in the CAR file, if you wanted to update a particular car model,
you would need to pass the country and car as well as the model type to locate the
model field.
8. In the Drill Down tab, ensure the key field is selected in the list of parameters.
9. Click OK.
10. Close your procedure and save it.
When you run your report, you will see that all of the items in the selected column of the
report are underlined and clickable. Clicking any item on the report opens the Update
Assist form with the information for that item already filled in.

10-26 WebFOCUS7
Creating an Update Application With Update Assist

Calling an Update Assist Project From a WebFOCUS Report Example


This example describes how to create a report in the Report Painter and then create a link
to a simple Update Assist application that will update information in the report.
This example is broken down into two steps:
1. Create an Update Assist project that updates a customer from the Videotrk data
source. See Creating an Update Assist Project For the Videotrk Data Source on page 10-
28.
2. Create a report in the Report Painter that contains a simple list of the customers in
the Videotrk data source. See Creating a Report With the Videotrk Data Source on
page 10-31.
When you are done, you will have a WebFOCUS report that displays a list of customers in
the Videotrk data source. Clicking on the last name of someone in this report will bring up
a form where you can change information about a customer, or delete the customer from
the data source. The result is shown in the following image:

Clicking here ... opens this

Developing Reporting Applications With Graphical Tools 10-27


Calling an Update Assist Procedure From a WebFOCUS Report

Example: Creating an Update Assist Project For the Videotrk Data Source
1. Create a project.
2. Add the IBISAMP directory to the viewable directories for the project.
3. Add the Videotrk Master File to your project.
4. Right-click the Videotrk Master File and click Update Assist in the pop-up menu.
The Update Assist (Step 1 of 6) - Select Segment(s) for Auto Update window opens.
For details, see Update Assist (Step 1 of 6): Selecting Segments to Update on page 10-
2.
5. In the Select lowest segment or hierarchy you would like to auto update section, select
the CUST segment.
The CUST segment appears in the Segments section.
6. In the Segments section, select the CUST segment again. The window appears as
follows:

10-28 WebFOCUS7
Creating an Update Application With Update Assist

7. Click Next.
The Update Assist (Step 2 or 6) - Segment & Field Options window opens.
8. In the Update Segment Options section, set Update and Delete to Yes.
9. In the Field View Options section, set Changeable to Yes for all fields except CUSTID,
which is a key field. The window appears as follows:

10. Click Next.


The Update Assist (Step 3 of 6) - Navigation Options window opens.
11. Select No key values required, then click Next.
The Update Assist (Step 4 of 6) - Template and Style Options window opens.
12. Select a color scheme from the supplied examples, and click Next.
The Update Assist (Step 5 of 6) - Output File Options window opens.

Developing Reporting Applications With Graphical Tools 10-29


Calling an Update Assist Procedure From a WebFOCUS Report

13. Review the list of files that your application will update. You should only see one file
here, cust.mnt. Update Assist derived the file name from the segment name. You can
change it if you wish, but if you do, make a note of the name you use, since you will
need it when you create your report. Click Next.
The Update Assist (Step 6 of 6) - Summary window opens.
14. Review the summary of options you have chosen, and ensure Automatically run this
project when you press the ‘Finish’ button is selected.
15. Click Finish.
WebFOCUS Maintain creates the cust.mnt file, based on the options you selected in
Update Assist, and deploys it. During deployment, the Deploying Application window
opens.
16. When the button at the bottom of the Deploying Application window turns to Close
instead of Cancel, click Close.
WebFOCUS Maintain displays the first screen of the application you created and
displays the message “Record not found.” This is because the Maintain procedure
that Update Assist created is expecting to be passed a parameter containing a value
for CUSTID (the key field).

10-30 WebFOCUS7
Creating an Update Application With Update Assist

Example: Creating a Report With the Videotrk Data Source


1. Create a procedure that uses the Report Painter:
a. Right-click the Procedures folder in the project that contains the Update Assist
procedure, and select New from the pop-up window, then select Procedure.
The Add Procedure dialog box opens.
b. Enter update in the File Name field and click Open.
The Open dialog box opens.
c. Select Videotrk and click Open.
The Report Painter opens.
2. Place the LASTNAME, FIRSTNAME, CUSTID, and PHONE fields in the report. Optionally,
select the LASTNAME field and click By to sort by the LASTNAME field.
3. Select the LASTNAME field on the report, and select Options from the Properties
menu.
The Field Properties dialog box opens.
4. Click the Drill Down tab.
5. In the Active Object drop-down list, select Column Data so that the users can’t drill
down from the column title LASTNAME, only from the data in the report.
6. In the Drilldown Definition drop-down menu, select Maintain Procedure. This specifies
that when an user clicks on one of the last names in the report, a Maintain procedure
is executed.

Developing Reporting Applications With Graphical Tools 10-31


Calling an Update Assist Procedure From a WebFOCUS Report

7. Enter cust in the Procedure name entry box (or, if you renamed your procedure when
you created your Update Assist application, enter the new name).
The Field Properties window appears as follows:

10-32 WebFOCUS7
Creating an Update Application With Update Assist

8. Specify the parameter that gets passed to the Maintain procedure cust:
a. Click Add in the With Parameters section.
The Drill Down Parameter dialog box opens.
b. Enter CUST_CUSTID_Edit in the Parameter name box.
c. Select CUSTID from the drop-down list in the Parameter value section.
The window appears as follows:

d. Click OK.

Developing Reporting Applications With Graphical Tools 10-33


Calling an Update Assist Procedure From a WebFOCUS Report

9. Close your procedure and save it.


When you run your report, you will see all of the last names in the report are
underlined and clickable, as in the following example:

Clicking any name on the report opens the Update Assist form with the information for
that name already filled in.

10-34 WebFOCUS7
WebFOCUS7

A Creating a Report Template for the Report


Wizard

The following topics describe how to Topics:


create content for the Report Wizard tool
❏ Creating a Report Template for the
using a Reporting Template.
Report Wizard
Creating a Report Template for the Report Wizard

Creating a Repor t Template for the Repor t Wizard


How to:
Create a Report Template With an Existing Report Procedure
Create a Report Template for the Report Wizard
Example:
Creating a Report Template From a Procedure
Reference:
Template Translations From FOCUS to Template Procedure

You can create content for the Report Wizard by creating a report template, a template
overview file, and an optional sample report. The report template executes an HTML
overview file, and if included, executes a static report displaying an example of the
contents of the report template.
The following topics describe the XML tags used in the template, and provide examples
that demonstrate how to create a report template from an existing FOCUS procedure, and
how to create an HTML file that displays in the overview tab of the first Report Wizard
screen. After the template has been applied to a procedure, it can be used as content in
the Report Wizard.

Syntax: How to Create a Report Template With an Existing Report Procedure


Use the following syntax to customize a FOCUS report for use with the Report Wizard.
Some XML tags are optional, as indicated in the definitions for each tag.
<TemplateOverview>
templateoverview.html
</TemplateOverview>

<AutoAssign type=”autoassigntype” />

<TemplateMasterFilename>
masterfile

<TemplateFields>
fields

<field description = “description text”


keyword = “keyword”
ampername = “ampername”
fld_eyecatcher = “fieldvariable”
proc_eyecatcher = procedurevariable

A-2 WebFOCUS7
Creating a Report Template for the Report Wizard

fieldtype = “fieldtype”
limit = limit />

<TemplateFilters>
filters
</TemplateFilters>
<TemplateOutputFormat>
format
<RecursiveTemplate>
recursivevariable
</RecursiveTemplate>
where:
templateoverview
Is the file that is displayed in the Overview tab on the first screen of the Report
Wizard.
autoassigntype
Is the value specified for the AutoAssign parameter. Valid values are:
1
Activates the AutoAssign behavior.
0
Specifies standard behavior. (Deactivates AutoAssign.)
Certain templates always have a single field name assigned as the value of the
parameter. If a developer sets a single relationship between the parameter and the
data source field, users do not have to perform any actions for this parameter at run
time. This behavior is controlled by the AutoAssign property (AutoAssign type = “1”).
AutoAssign is specified at the template level so all parameters in the template are
associated with one, and only one, database field. No prompts for Report Wizard
parameters in the template will appear on the generated HTML launch page. (Prompts
for standard dialog manager variables will still be displayed in the HTML launch page.)
Note: If a developer assigns multiple alternate database fields to a parameter in an
AutoAssign controlled template, a control will appear on the launch page so the user
can select a value.
masterfile
Is placeholder for the Master File name. This name should be unique and should not
use a restricted keyword. The Report Wizard will replace the placeholder when a
Master File is selected by the user. This completes the TABLE FILE request found in
the <TemplateProcedure> tag.

Developing Reporting Applications With Graphical Tools A-3


Creating a Report Template for the Report Wizard

fields
Are the fields to be specified. Fields include the following:
description text
Is the text displayed in the Report Wizard indicating field type requirements, data
usage, etc.
keyword
Is the FOCUS statement accompanying the selected field: SUM, BY, ACROSS,
SORT, and so on.
ampername
The Wizard takes the single-word variable placed in this section and displays it to
the user when they assign MASTER file fields to the report template. The variable
MUST be preceded by &amp;
fieldvariable
The Wizard stores the MASTER file – ampername assignment in this single-word
variable.
procedurevariable
Combines the keyword with the fld_eyecatcher to complete table requests.
fieldtype
Is either 0 or 1; where one means the field can be indexed (repeatable), and 0 means
it cannot.
limit
A positive whole number indicating how many times the Wizard will duplicate fields
which can be indexed.
filter
The Wizard uses the single-word variable in this tag, replaces it with the limits defined
in the Wizard, and replaces the relevant sections of the <TemplateProcedure> section
of the template.
format
Either “NO_OUTPUT” meaning the template designer has specified the &WFFMT
variable requirements within the <TemplateProcedure>, thus turning off the Output
Format section of the Wizard; or a single word variable used in the relevant sections of
the <TemplateProcedure> section of the template.
recursivevariable
Having this single-word variable in place creates an additional .FEX along with the
HTML Layout Painter document of the same name. Use only in special cases where
the report drills into itself.

A-4 WebFOCUS7
Creating a Report Template for the Report Wizard

Example: Creating a Report Template From a Procedure


The following example illustrates the use of the report template with a FOCUS procedure.
The FOCUS request:
TABLE FILE INVOICES
SUM
EXTENDEDPRICE
BY
COUNTRY
ACROSS
SALESPERSON
ACROSS-TOTAL
WHERE &COUNTRY…
&WFFMT
END

Developing Reporting Applications With Graphical Tools A-5


Creating a Report Template for the Report Wizard

Is converted to the following:


<?xml version="1.0" ?>
<Template>

<TemplateOverview>
TemplateOverview.html
</TemplateOverview>

<AutoAssign type=”1” />

<TemplateMasterFilename>
FILENAME
</TemplateMasterFilename>

<TemplateFields>
<field description = "Summation"
keyword = "SUM"
ampername = "&amp;MEASURE"
fld_eyecatcher = "MEASURE_PARAM"
proc_eyecatcher = "MEASURE_SELECT"
fieldtype = "1" limit = "3" />

<field description = "Dimension"


keyword = "BY"
ampername = "&amp;DIMENSION"
fld_eyecatcher = "DIMENSION_PARAM"
proc_eyecatcher = "DIMENSION_SELECT"
fieldtype = "0" />

<field description = "Across"


keyword = "ACROSS"
ampername = "&amp;CROSSTAB"
fld_eyecatcher = "CROSSTAB_PARAM"
proc_eyecatcher = "CROSSTAB_SELECT"
fieldtype = "0" />
</TemplateFields>

<TemplateFilters>
FILTERS
</TemplateFilters>

<TemplateOutputFormat>
OUTPUT
</TemplateOutputFormat>

<TemplateProcedure>
<![CDATA[

A-6 WebFOCUS7
Creating a Report Template for the Report Wizard

TABLE FILE FILENAME

MEASURE_SELECT
DIMENSION_SELECT
CROSSTAB_SELECT
ACROSS-TOTAL
HEADING
FILTERS
OUTPUT

END
]]>
</TemplateProcedure>
</Template>
The following request is an example of a procedure created by the Report Wizard:
TABLE FILE INVOICES
SUM
&MEASURE1.(<FREIGHT,FREIGHT>).MEASURE1.
&MEASURE2.(<EXTENDEDPRICE,EXTENDEDPRICE>).MEASURE2.
BY
&DIMENSION.(<CITY,CITY>).DIMENSION.
ACROSS
&CROSSTAB.(<SHIPPERNAME,SHIPPERNAME>).CROSSTAB.
ACROSS-TOTAL
BY &DIMENSION.(<CITY,CITY>).DIMENSION.
ACROSS &CROSSTAB.(<SHIPPERNAME,SHIPPERNAME>).CROSSTAB."
WHERE ( COUNTRY EQ '&par_country.(FIND COUNTRY IN invoices).select a
country.');
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>).Select type of
display input.
END

Developing Reporting Applications With Graphical Tools A-7


Creating a Report Template for the Report Wizard

Example: Creating an HTML Overview File


The following is an example of an HTML overview file.
<html>

<head>
<link rel="stylesheet" href="WizHTML.css" type="text/css">
</head>

<body>
<H4><CENTER>Business Forms<A HREF="dinvoice.pdf" target="_new"><img
src="run16.gif" ALIGN=center BORDER="0">Invoices</a></H4>
</CENTER>
<DL COMPACT>
<DT><A HREF="dinvoice.pdf" target="_new"><img src="run16.gif"
BORDER="0">Definition and Sample</A>
<DD>Business Forms are a specialty of Information Builders. WebFOCUS has
the capability of defining a business form (invoices, letters, etc),
populating the form with production data, then generating pixel-perfect
PDF output; all from within a single FOCUS report. This template produces
an example invoice.
</DL>
<CENTER><A HREF="http://www.ibi.com" TARGET="IBI"><img src="powered.gif"
BORDER="0"></CENTER>
</p></body></html>
Note: The HTML overview file above executes an optional static report file named
dinvoice.pdf. You can create an optional sample report file from the static output of an
existing FOCUS procedure.

Procedure: How to Create a Report Template for the Report Wizard


To make a report template available in the Report Wizard, complete the following steps:
1. Save the report template XML file you created in the following directory:
\\ibi\Templates\ReportWizard.
Give the XML template file an intuitive file name, for example, salesreport.xml.
2. Save the template overview HTML file you created in the same directory where you
saved the template (\\ibi\Templates\ReportWizard).
3. Optionally, if you created a sample report to display with the overview file, save it in
the same directory where you saved the template (\\ibi\Templates\ReportWizard).

A-8 WebFOCUS7
Creating a Report Template for the Report Wizard

4. From the same directory, open the wztmplst.xml file. This is where all report wizard
templates are stored. The file has the following contents by default:
<?xml version="1.0" ?>
<templates>

<template filename = "xtab.xml" templatename = "Crosstab Report" />


<template filename = "simple.xml" templatename = "Simple Report" />
<template filename = "listing.xml" templatename = "Listing Report" />
<template filename = "lbl8660.xml" templatename = "Mailing Label
Report" />
<template filename = "variance.xml" templatename = "Variance Report"/>

</templates>
5. Add the template filename and description to the wztmplst file. For example, to add a
template called salesreport.xml and to have the name of the report appear as Sales
Report in the Report wizard, insert the following code:
<template filename = "salesreport.xml" templatename = "Sales Report"/>
6. Save changes to the wztmplst file. When you next run the Report Wizard, the new
template will appear in the Templates pane.

Developing Reporting Applications With Graphical Tools A-9


Creating a Report Template for the Report Wizard

Reference: Template Translations From FOCUS to Template Procedure

Original FEX Template Markup Template Procedure

N/A <TemplateOverview> N/A


Template Overview File link
</TemplateOverview>

N/A <AutoAssign type=”1”> N/A

TABLE FILE <TemplateMasterFilename> TABLE FILE FILENAME


INVOICES FILENAME
</TemplateMasterFilename>

SUM <field description = MEASURE_PARAM


EXTENDEDPRICE "Summation" MEASURE_SELECT
keyword = "SUM"
ampername =
"&amp;MEASURE"
fld_eyecatcher =
"MEASURE_PARAM"
proc_eyecatcher =
"MEASURE_SELECT"
fieldtype = "1" limit = "3" />

BY COUNTRY <field description = DIMENSION_PARAM


"Dimension" DIMENSION_SELECT
keyword = "BY"
ampername =
"&amp;DIMENSION"
fld_eyecatcher =
"DIMENSION_PARAM"
proc_eyecatcher =
"DIMENSION_SELECT"
fieldtype = "0" />

A-10 WebFOCUS7
Creating a Report Template for the Report Wizard

Original FEX Template Markup Template Procedure

ACROSS <field description = "Across" CROSSTAB_PARAM


SALESPERSON keyword = "ACROSS" CROSSTAB_SELECT
ampername =
"&amp;CROSSTAB"
fld_eyecatcher =
"CROSSTAB_PARAM"
proc_eyecatcher =
"CROSSTAB_SELECT"
fieldtype = "0" />

WHERE <TemplateFilters> FILTERS


COUNTRY… FILTERS
</TemplateFilters>

&WFFMT <TemplateOutputFormat> OUTPUT


OUTPUT
</TemplateOutputFormat>

FOCEXEC=Xtab.fex <RecursiveTemplate> FOCEXEC=XtabReport


XtabReport
</RecursiveTemplate>

<TemplateProcedure> N/A
<![CDATA[
TABLE FILE FILENAME
MEASURE_SELECT
DIMENSION_SELECT
CROSSTAB_SELECT
ACROSS-TOTAL
HEADING
FILTERS
OUTPUT
END
]]>
</TemplateProcedure>

Developing Reporting Applications With Graphical Tools A-11


Creating a Report Template for the Report Wizard

A-12 WebFOCUS7
WebFOCUS7

Index
Symbols allocating files 10-9
Dynamic List validation option in
$ character in Update Assist searches Update Assist 10-9
10-18
amper variable parameters 5-57
* character in Update Assist searches
setting form controls 5-57
10-18
application components 9-1, 9-3
.GFA control file 3-5
editing 9-1
deleting 3-43
viewing as text 9-8

A APPROOT aliases 8-29

Access Files 3-15 APPROOT variable 8-24 to 8-25

ad hoc reports 2-11 automatic field population 5-72

adding comments 3-22 Automatic validation in Update Assist 10-3

adding Master Files to projects 3-15 autonumbering fields in Update Assist


applications 10-24
adding objects to HTML pages 5-8
form controls 5-32
frames 5-16 to 5-17
B
graphs 5-9 to 5-10 bookmarks 9-13 to 9-14
group boxes 5-28 text editor 9-13 to 9-14
HTML templates 5-83
Button Properties window 5-31
hyperlinks 5-26
images 5-22 buttons
lines 5-8, 5-20 Button Properties window 5-31
push buttons 5-30
reports 5-9 to 5-10 C
text 5-24
cache 7-36
adding remote servers 4-60 clearing 7-36
adding virtual folders 3-10 calendar 5-52
adding virtual subfolders 3-13 Cascading Style Sheets (CSS) 7-37
aliases for APPROOT 8-29 case sensitivity 9-10 to 9-11
Index

cgivars.wfs file 8-25 CSS (Cascading Style Sheets) 7-37

chain feature 5-65 customizing file types 3-10, 3-13, 3-20

Check Box Properties window 5-44 to 5-45 customizing HTML pages 5-101

check boxes
Check Box Properties window 5-44 to 5-45 D
supplying parameter values 5-44 date-stamping fields in Update Assist applications
10-23
color schemes for Update Assist applications
10-13 default partition environments 8-6, 8-15
Combo box navigation option for Update Assist defining fields for Update Assist applications 10-21
10-11
Deploy Wizard 7-2, 7-4
changing search field 10-19
deploying applications to the Web 7-4
Comment component 4-17, 9-5 to 9-6
deploying files created with HTML Layout Painter
comments 3-22, 9-6 8-14
Comment component 4-12
deploying files with -HTMLFORM command 8-14
creating 9-6
deploying Maintain procedures 8-5
compiling Update Assist procedures 10-15
deploying project files 8-2, 8-19
Component Connector toolbar 4-12, 4-17, 4-47
adding objects to procedures 4-12 deployment guidelines 8-14
components 3-14, 4-12 deployment scenario window 8-4
Components toolbar 5-6 deployment scenarios 3-23, 8-2 to 8-3
configuring deployment servers 8-24 deployment servers 8-24
controls 2-9 deployment status 8-21, 8-23
adding to forms 2-9
deployment steps 8-3
cookies 2-2, 2-6
designing user interfaces 2-1
creating aliases 8-29 HTML Layout Painter 5-2
creating deployment scenarios 8-4 Developer Studio 7-2
creating HTML pages 5-2 text editor 9-1
HTML Layout Painter 5-2 Developer Studio text editor 9-1
creating launch pages 2-10 DEVELOPERS variable 8-24, 8-29
creating project directories 3-5 Development Tools 4-55

I-2 WebFOCUS7
Index

Dialogue Manager 4-56 F


directory paths 3-19 Field Validation - File dialog box 10-9
display formats 7-1, 7-5 Field Validation - List dialog box 10-8
documentation roadmap 1-1 to 1-2 Field Validation - Range dialog box 10-7
drill-down reports 2-11, 7-24, 7-26 fields
using with Update Assist applications 10-25 defining for Update Assist applications 10-21
selecting for Update Assist 10-3
Drop-Down List Properties window 5-39
file types 3-20
drop-down lists
customizing 3-10, 3-13, 3-20
Drop-Down List Properties window 5-39
supplying parameter values 5-39 files
generated by Update Assist 10-14
dynamic calendar 5-52
filtering parameter values 5-65
Dynamic List validation option in Update Assist
10-9 filters 3-11, 3-20
dynamic reports 2-11 flat files and Dynamic List validation in Update
Assist 10-9
E folders in Update Assist applications 10-19, 10-22
edaserve.cfg file 8-25
footings 9-12
editing application components 9-1, 9-3 adding with text editor 9-12

empty databases and Update Assist applications form controls 5-33, 5-37, 5-57
10-18 adding amper variable parameters 5-57
adding to HTML pages 5-32, 5-57
ENGINE dialog box 4-55
check boxes 5-44
Engine Tool 4-55 drop-down lists 5-39
list boxes 5-42
environments radio buttons 5-46 to 5-47
local development 3-2
supplying parameter values 5-32, 5-58 to 5-59
remote development 3-2
text areas 5-38
Excel 2000 7-4 text boxes 5-34
types 5-33
Execute component 4-46
formatting reports 7-37
Execute Wizard 4-46, 4-48 Cascading Style Sheets and 7-37
execution search paths 8-18

EXPIRE_REPORTS variable 7-44

Developing Reporting Applications With Graphical Tools I-3


Index

forms 2-9 HTML files 2-1, 3-2


adding controls to 2-9 display pages 2-2, 2-11
form controls 5-33
HTML Files folder 3-3 to 3-4
text boxes 5-34
HTML forms 2-1
Frame Properties window 5-17, 5-19, 5-21, 5-24 to
creating 7-63
5-25, 5-29, 5-41
HTML Layout Painter 2-1, 5-1 to 5-2
frames 5-16
accessing 5-2 to 5-3
adding to HTML pages 5-16 to 5-17
adding form controls 5-32, 5-57
Frame Properties window 5-17, 5-19, 5-21, 5-24
adding frames 5-16 to 5-17
to 5-25, 5-29, 5-41
adding graphs 5-9 to 5-10
adding group boxes 5-28
G adding HTML templates 5-83
generic procedures 4-7 adding hyperlinks 5-26
adding images 5-22
Graph Properties window 5-12 to 5-13
adding lines 5-20
graphical tools 9-15 adding push buttons 5-30
adding reports 5-9 to 5-10
graphs adding text 5-24
adding to HTML pages 5-9 to 5-10 creating HTML pages 5-2
Graph Properties window 5-12 to 5-13 HTML pages 5-2, 5-8
Manage Layout dialog box 5-14 to 5-15 Properties window 5-56 to 5-57
modifying components 5-14 to 5-15 toolbars 5-4
selecting components 5-14 windows 5-4
Group Box Properties window 5-28 to 5-29 HTML pages 5-2, 7-37
group boxes 5-28 adding HTML templates 5-83
adding to HTML pages 5-28 Cascading Style Sheets and 7-37
Group Box Properties window 5-28 to 5-29 creating 5-2
customizing 5-101
guidelines for source control 3-38 HTML Layout Painter 5-2, 5-8
HTML Page Properties window 5-83
H laying out objects 5-98
headings 9-12 properties 5-83
styling 5-83
adding with text editor 9-12
templates 5-83
hidden parameters 5-72 themes 5-83
HTML display pages 2-11 HTML templates 5-83
creating 7-61 adding to HTML pages 5-83

-HTMLFORM command 8-14

I-4 WebFOCUS7
Index

hyperlinks 7-13 laying out HTML pages 5-98


adding to HTML pages 5-26 object relationships 5-98
adding to text 5-26
Layout toolbar 5-100

I lines 5-20
adding to HTML pages 5-20
IBFS (Information Builders File System) 3-6
LINES parameter 7-33
ibiweb.cfg file 8-29
List Box Properties window 5-42 to 5-43
IBIWF_mframename variable 7-10
list boxes 5-42
IBIWF_mprefix variable 7-10
List Box Properties window 5-42 to 5-43
IBIWF_mreports variable 7-10 supplying parameter values 5-42

Image Properties window 5-22 List validation option in Update Assist 10-8 to 10-9

images 5-22 listfill.fex file 10-9, 10-17


adding to HTML pages 5-22
Local Deploy default value 3-23
Image Properties window 5-22
supplying parameter values 5-77 Local Deploy scenario 8-3

Include component 4-46 logon pages 2-2


modifying 2-6
Information Builders File System (IBFS) 3-6

J M
main pages 2-2
JavaScript 7-24 to 7-25
Maintain Files folder 3-3
JavaScript functions 7-25
Manage Layout dialog box 5-14 to 5-15
K managing projects 3-34
Key value navigation option for Update Assist
Master File Editor 3-15
10-11
Master Files 3-2, 3-15
L adding to projects 3-15 to 3-16
deleting permanently 3-17
launch pages 2-2, 2-7, 7-1 removing from projects 3-16
adding WebFOCUS forms to 2-9
creating 2-10 Master Files folder 3-3 to 3-4
customizing 2-10, 7-1
maxFolders JavaScript variable 10-22
frameset 2-10
single-page 2-10 maxNodesPerFolder JavaScript variable 10-22

Developing Reporting Applications With Graphical Tools I-5


Index

menu options 7-45 on-demand paging 7-31, 7-33, 7-36


customizing 7-45 to 7-46, 7-48, 7-50, 7-52, 7-57
opening graphical tools 9-15
to 7-58
organizing projects 3-9
Microsoft FrontPage 2000 2-1, 2-10
Other component 4-15, 9-1, 9-4 to 9-5
Microsoft Internet Explorer (IE) 7-2
text editor 9-4
MIME (Multipurpose Internet Mail Extensions) 7-2
Other folder 3-4
to 7-3
output files generated by Update Assist 10-14
mntSignon.htm file 10-17

modifying directory paths 3-19 P


modifying project properties 3-17 page properties
Settings dialog box 5-103
multiple reports 7-9 to 7-10
parameter values 5-58 to 5-59, 5-64 to 5-65
Multipurpose Internet Mail Extensions (MIME) 7-2
check boxes 5-44
to 7-3
drop-down lists and 5-39
dynamic list 5-58, 5-62, 5-64
N filtering with the chain feature 5-65
navbar.htm file 10-17 list boxes 5-42
changing search field 10-19 radio buttons 5-46 to 5-47
customizing tree control 10-22 static list 5-58, 5-60, 5-64
supplying 5-32
Navigation options in Update Assist 10-11
text boxes and 5-34
new databases and Update Assist applications
parameter values with text areas 5-37 to 5-38
10-18
parameters 4-33, 4-46, 5-72
New Filter dialog box 3-33
building reports and launch pages in the
New Procedure dialog box 4-9 Report Wizard 4-33
hidden 5-72
No key values navigation option for Update Assist Parameters window 5-58 to 5-60, 5-62, 5-65
10-11 passing to procedures 4-46, 4-48
using with WebFOCUS reports 10-25 properties 5-58 to 5-59, 5-65
supplying values 5-32
O
Parameters window 5-58 to 5-60, 5-62, 5-65
object relationships 5-98 to 5-99
breaking 5-100 Partial-Key option in Update Assist 10-6, 10-18
Layout toolbar 5-100 partition project files window 8-22
setting distance 5-98 to 5-99
setting size 5-98 to 5-99 partitioning project files 8-2, 8-10

I-6 WebFOCUS7
Index

passwords 3-42 procedures (continue)


prompting for in Update Assist applications publishing 4-57
10-11 running 9-14
running locally 4-59
PDF display format 7-1
running remotely 4-59, 4-61
PDF Layout Painter 6-1 scheduling 4-57 to 4-58
accessing 6-2 selecting tool for creating 4-3
toolbars 6-4 text components 9-7
windows 6-4 tools for creating 4-2, 4-4

procedure components 4-13 Procedures folder 3-3 to 3-4


checking 4-20
project directories 3-3
copying 4-21
creating 4-12 to 4-13, 4-17 project files 8-19
dragging and dropping 4-21 deploying 8-19
editing 4-19 partitioning 8-10
running 4-19, 9-14
project properties 3-17
types 4-12
viewing as text 9-8 Project Properties dialog box 3-18, 3-24, 8-10
procedure creation tools 4-2, 4-4 Project Wizard 3-3
procedures 3-2, 4-1, 4-46, 7-17, 7-19, 9-3 Project-based development environments 3-2
activating OLAP 4-57
projects 3-3
adding to applications 4-10
applying read-only security 3-18
adding to projects 4-10
creating directories 3-5
calling 4-46
decrypting 3-42
calling procedures 4-46, 4-48
deleting 3-43
canceling 4-62
encrypting 3-42
components 4-12
copying 4-11 file types 3-4
managing 3-34
creating 4-1, 7-17, 7-19, 7-22 to 7-23, 7-59, 7-69,
9-6 organizing 3-9
creating with text editor 4-8 removing 3-43
running on remote server 3-18
debugging 4-57
securing 3-42
decrypting 4-57 to 4-58
deleting 4-11 tracking code 3-34
viewing properties 3-18, 8-10
editing 4-57, 4-59, 9-2 to 9-3
embedding 4-47 Properties window 5-56 to 5-57
encrypting 4-57 to 4-58
including 4-47 Push Button Properties window 5-30 to 5-31
passing parameters 4-46, 4-48

Developing Reporting Applications With Graphical Tools I-7


Index

push buttons 5-30 reports (continue)


adding to HTML pages 5-30 displaying in multiple formats 7-1, 7-9 to 7-10,
Push Button Properties window 5-30 to 5-31 7-13 to 7-14, 7-16
supplying parameter values 5-76 to 5-77, 5-80 editing as text 9-2 to 9-3
formatting 7-5, 7-37
R Manage Layout dialog box 5-14 to 5-15
modifying components 5-14 to 5-15
radio buttons
on-demand paging 7-31, 7-33
Radio Buttons Properties window 5-46 to 5-47
Report Properties window 5-12
supplying parameter values 5-46 to 5-47
selecting components 5-14
Radio Buttons Properties window 5-46 to 5-47 SQL 4-22
viewing 7-44
Range validation option in Update Assist 10-7
repositioning objects 5-99
read-only security 3-18
resizing objects 5-99
registered file types 3-21
resorting fields in Update Assist 10-6
remote servers 4-60
adding 4-60 restricting deployment authorization 8-29

renaming files generated by Update Assist 10-14 Results page for Update Assist applications 10-11

renaming segments or fields in Update Assist 10-5 running paths 8-18

report formatting 7-37 running procedures 4-59


Cascading Style Sheets and 7-37 locally 4-59
remotely 4-61
Report Properties window 5-12 to 5-13
running projects on remote server 3-18
report types 2-11
ad hoc 2-11 running Update Assist applications 10-16
drill-down 2-11, 7-24, 7-26
dynamic 2-11 S
static 2-11
Scenario Editor 8-4
ReportCaster 4-58
Search option in Update Assist applications 10-6,
scheduling procedures 4-58
10-18
reporting applications 3-1
search paths 8-18
reports 7-1 to 7-2
security 2-2, 3-42
adding to HTML pages 5-9 to 5-10
in Update Assist applications 10-11
calling Update Assist applications 10-25
displaying 7-1 to 7-2, 7-4

I-8 WebFOCUS7
Index

SegmentName.mnt file 10-17 source control options 3-36, 3-39


autonumbering fields 10-24 accessing 3-36
date-stamping fields 10-23
source file management 3-34
SegmentName_validationInit.js file 10-17
SQL 4-22
segments 10-2 executing code 4-22
selecting for Update Assist 10-2
SQL Report Wizard 4-22
selecting deployment scenarios 3-23
Standard toolbar 5-5, 6-5
self-service reporting applications 3-1
Static List validation option in Update Assist 10-8
servers 4-60
static reports 2-11
adding 4-60
steps for deployment 8-3
SESSION project 3-3
style sheets 7-37
SET command 7-33
Cascading Style Sheets (CSS) 7-37
SET parameters 7-33
subfolders for Web deployment 8-11
LINES 7-33
WEBVIEWHOME 7-34 supplying parameter values 5-32
images 5-77
setting deployment paths 8-24
push buttons 5-76 to 5-77, 5-80
setting deployment paths for AS/400 8-28
Synonym Wizard 3-15
setting deployment paths for OS/390 8-28
syntax coloring 9-10 to 9-11
setting running paths 8-18

setting Web server deployment path 8-26 T


text 5-24, 5-38
setting WebFOCUS Reporting Server deployment
adding to HTML pages 5-24
path 8-26
finding 9-9
Settings dialog box 5-103 replacing 9-9
supplying parameter values 5-34, 5-38
skins for Update Assist applications 10-13
Text Area Properties window 5-38
Smart Deploy 8-4 Text Box Properties window 5-34 to 5-35
Text Properties window 5-24
sorting fields in Update Assist 10-6
text areas 5-37
source control 3-34
supplying parameter values 5-37
guidelines 3-38
Text Area Properties window 5-37
icons 3-37
Text Box Properties window 5-35

Developing Reporting Applications With Graphical Tools I-9


Index

text colors 9-10 User interface for Update Assist applications 10-11
changing 9-10 to 9-11
user interfaces 2-1 to 2-2
text components 9-7 designing 2-1
creating 9-7

text editor 4-8, 9-1 to 9-3 V


adding footings 9-12 validation in Update Assist 10-3
adding headings 9-12
validationInit.js files 10-17
case sensitivity 9-10 to 9-11
changing default settings 9-10 to 9-11 variables for setting deployment path 8-24
components 9-2
creating procedures 9-6 version control 3-34
creating text files 9-6 viewing project properties 3-17
opening files 9-8
opening graphical tools 9-15 virtual folders 3-3, 3-10
Other component 9-4 adding 3-10

text editor window 9-9 virtual subfolders 3-13

text files 9-6


W
creating 9-6
Web browsers 2-6
Text Properties window 5-24 cookies 2-6
toolbars 5-100 Web deployment subfolders 8-11
Components toolbar 5-6
Layout toolbar 5-100 WebFOCUS Client 2-10
Standard toolbar 5-5, 6-5
WebFOCUS Client variables 7-9 to 7-10, 7-16
tracking project code 3-34 IBIWF_mframename 7-10
IBIWF_mprefix 7-10
Tree navigation option for Update Assist 10-11 IBIWF_mreports 7-10
changing search field 10-19
customizing 10-22 WebFOCUS code 9-2 to 9-3
editing 9-2
U WebFOCUS forms 2-9
Update Assist 10-1 WebFOCUS Reporting Server 2-2
about the application 10-16
calling applications from WebFOCUS reports WebFOCUS StyleSheets 7-1
10-25
editing applications 10-19
generating application 10-1

I-10 WebFOCUS7
Index

WebFOCUS Viewer 7-31 to 7-33


closing 7-35
home pages 7-34 to 7-35
navigating 7-36
opening 7-35

WEBVIEWER parameter 7-33

WEBVIEWHOME parameter 7-34 to 7-35

WEBVIEWTARG parameter 7-35

wildcard characters in Update Assist searches


10-18

X
XML control file 3-5

Developing Reporting Applications With Graphical Tools I-11


Index

I-12 WebFOCUS7
WebFOCUS7
Reader Comments

In an ongoing effort to produce effective documentation, the Documentation Services staff


at Information Builders welcomes any opinion you can offer regarding this manual.
Please use this form to relay suggestions for improving this publication or to alert us to
corrections. Identify specific pages where applicable. You can contact us through the
following methods:

Mail: Documentation Services - Customer Support


Information Builders, Inc.
Two Penn Plaza
New York, NY 10121-2898

Fax: (212) 967-0460

E-mail: books_info@ibi.com

Web form: http://www.informationbuilders.com/bookstore/derf.html

Name:_______________________________________________________________________
Company:____________________________________________________________________
Address:_____________________________________________________________________
Telephone:______________________________Date:_________________________________
E-mail:_______________________________________________________________________
Comments:

Information Builders, Inc. Two Penn Plaza, New York, NY 10121-2898 (212) 736-4433
Developing Reporting Applications With Graphical Tools DN4500724.0206
Version 7 Release 1.3
Reader Comments

Information Builders, Inc. Two Penn Plaza, New York, NY 10121-2898 (212) 736-4433
Developing Reporting Applications With Graphical Tools DN4500724.0206
Version 7 Release 1.3

You might also like