Sie sind auf Seite 1von 7

Users Guide

Table of Contents

VERSION 2.5

Borland
ReportSmith
for PC Databases
Borland International, Inc., 100 Borland Way
P.O. Box 660001, Scotts Valley, CA 95067-0001

Redistributable files
You can redistribute the following file in accordance with the terms of Borlands No Nonsense License Statement:

RS_RUNTIME.EXE

Borland may have patents and/or pending patent applications covering subject matter in this document. The
furnishing of this document does not give you any license to these patents.
COPYRIGHT 1992, 1994 Borland International. All rights reserved. All Borland product names are trademarks or
registered trademarks of Borland International, Inc. Other brand and product names are trademarks or registered
trademarks of their respective holders.
Printed in the U.S.A.
1E0R1094

9495969798-9 8 7 6 5 4 3 2 1
I1

MASTER CD
DOCUMENT
LIST

Contents
Introduction

Chapter 4

Manipulating data

Who should use this guide . . . . . . . . . . . . . . 1


Topics covered in this guide. . . . . . . . . . . . . . 1

Chapter 1

Connecting to a data source

Databases ReportSmith can access . . . . . . . . . . 3


Connecting to tables . . . . . . . . . . . . . . . . . . 4
Saving database connection information . . . . . . . 5

Chapter 2

Types of reports you can create7


Default report types . .
Columnar . . . . . .
Crosstab . . . . . . .
Form . . . . . . . . .
Labels . . . . . . . .
Custom report types . .
Master/detail. . . . .
Summary-only. . . .
Choosing a report type.

. .
.
.
.
.
. .
. .
. .
. .

.
.
.
.

. . . . . . . . . . . . . .7
. . . . . . . . . . . . . .7
. . . . . . . . . . . . . .8
. . . . . . . . . . . . . .8
. . . . . . . . . . . . . .8
. . . . . . . . . . . . . .9
. . . . . . . . . . . . . . .9
. . . . . . . . . . . . . . 10
. . . . . . . . . . . . . 11

.
.
.
.

Chapter 3

Bringing data into a report

27

Parts of a report . . . . . . . . . . . . . . .
The toolbar . . . . . . . . . . . . . . . . .
The ribbon . . . . . . . . . . . . . . . . . .
Sorting . . . . . . . . . . . . . . . . . . . .
Grouping. . . . . . . . . . . . . . . . . . .
Report grouping . . . . . . . . . . . . . .
Database grouping. . . . . . . . . . . . .
Inserting a header or footer . . . . . . . .
Specifying selection criteria . . . . . . . .
Choosing records . . . . . . . . . . . . .
Choosing fields . . . . . . . . . . . . . .
Creating a derived field . . . . . . . . . . .
SQL-derived fields . . . . . . . . . . . .
Macro-derived fields . . . . . . . . . . .
Creating a summary field . . . . . . . . . .
Creating a report variable . . . . . . . . . .
Data types and entry types . . . . . . . .
Sample report variables . . . . . . . . . . .
Sample 1: Entering or choosing a value .
Sample 2: Choosing from a list . . . . . .
Sample 3: Choosing table-driven values .
Creating a master /detail report . . . . . . .

. . . . 27
. . . . 28
. . . . 28
. . . . 28
. . . . 29
. . . . . 29
. . . . . 31
. . . . . 33
. . . . 35
. . . . . 35
. . . . . 40
. . . . 43
. . . . . 44
. . . . . 45
. . . . 47
. . . . 48
. . . . . 49
. . . . 51
. . . . . 51
. . . . . 53
. . . . . 54
. . . . 54

Naming a detail report . . . . . . . . . . . . . . . 55

Using the Detail Reports dialog box


Displaying field labels. . . . . . . .
Inserting a field into a report section
Formatting a report section . . . . .

13

Using Report Query dialog boxes. . . . . . . . . . 13


Adding tables . . . . . . . . . . . . . . . . . . . . 15
Joining tables. . . . . . . . . . . . . . . . . . . . . 15
Visual joins . . . . . . . . . . . . . . . . . . . . . 15
Using the Create New Table Link dialog box . . . 16
Choosing columns . . . . . . . . . . . . . . . . . . 17
Using the Table Columns dialog box. . . . . . . . 18
Visually . . . . . . . . . . . . . . . . . . . . . . . 19
Assigning column aliases . . . . . . . . . . . . . . 19
Using direct SQL entry . . . . . . . . . . . . . . . 20
What is SQL? . . . . . . . . . . . . . . . . . . . . 20
Viewing SQL text . . . . . . . . . . . . . . . . . . 21
Converting a report to SQL text entry . . . . . . . 21
Creating a report with direct SQL entry . . . . . . 22

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

. 56
. 56
. 57
. 57

Saving a report . . . . . . . . . . . . . . . . . . . 58
Creating a temporary table . . . . . . . . . . . . . 58

Chapter 5

Formatting
Selecting and moving objects . . .
Columns . . . . . . . . . . . . . .
Fields. . . . . . . . . . . . . . . .
Rows . . . . . . . . . . . . . . . .
Headers and footers . . . . . . . .
Body . . . . . . . . . . . . . . . .
Text . . . . . . . . . . . . . . . .
Resizing objects . . . . . . . . . . .
Using Page Setup settings . . . . .
Setting margins . . . . . . . . . .
Setting paper size and orientation.

Using the Table and Column Browser. . . . . . .24


Using the SQL list boxes . . . . . . . . . . . . . .25
Restrictions for SQL text entry. . . . . . . . . . .25

61
.
.
.
.
.
.
.
.
.
.
.

. .
.
.
.
.
.
.
. .
. .
. .
. .

.
.
.
.
.
.

. . . . . 61
. . . . . 61
. . . . . 62
. . . . . 63
. . . . . 64
. . . . . 64
. . . . . 64
. . . . . 64
. . . . . 65
. . . . . . 65
. . . . . . 66

.
.
.
.
.
.

Single-column . . . . . . . . .
Single-row . . . . . . . . . . .
Single-row and single-column
Double-column . . . . . . . .
Double-row . . . . . . . . . .
The Crosstab menu . . . . . .
The Crosstab toolbox . . . . .

Setting up labels . . . . . . . . . . . . . . . . . . . 67
Adding a report background . . . . . . . . . . . . 68
Using the grid . . . . . . . . . . . . . . . . . . . . 69

Formatting techniques . . . . . . . . . . . . . . . . 70
Characters . . . . . . . . . . . . . . . . . . . . . . 70
Fonts and point sizes . . . . . . . . . . . . . . . .70

Aligning characters in columns.


Positioning columns. . . . . . .
Field labels. . . . . . . . . . . .
Numbers and dates . . . . . . .
Customizing numeric fields. . .
Leaving null values blank. . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

. 71
. 72
. 73
. 74
. 75
. 76

Specifying row height . . . . . . . . . . . . . . .85

Choosing items to display and print . . . . . . . . 85


Paginating a report . . . . . . . . . . . . . . . . . . 86
Aligning objects . . . . . . . . . . . . . . . . . . . 87
The Align toolbox . . . . . . . . . . . . . . . . . . 87
Aligning text. . . . . . . . . . . . . . . . . . . . . 93
Aligning left . . . . . . . . . . . . . . . . . . . .94
Aligning center . . . . . . . . . . . . . . . . . . .94
Aligning right . . . . . . . . . . . . . . . . . . . .94

Drawing . . . . . . . . . . . . . . . . . . . . . . . 95
The Drawing Toolbox. . . . . . . . . . . . . . . . 95
Using report styles . . . . . . . . . . . . . . . . . . 97
Applying a style . . . . . . . . . . . . . . . . . . . 97
Assigning a default style . . . . . . . . . . . . . . 98
Creating a style . . . . . . . . . . . . . . . . . . . 98
Modifying a style . . . . . . . . . . . . . . . . . . 99
Deleting a style . . . . . . . . . . . . . . . . . . . 99
Using the Style Extractor . . . . . . . . . . . . . 100
Displaying data fields as pictures . . . . . . . . . 101

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

109
109
109
110
110
111
111

. . . . .112
. . . . . 112
. . . . . 113
. . . . . 113

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. . . .114
. . . .115
. . . .115
. . . . 117
. . . . 118
. . . . 119
. . . . 120
. . . .120
. . . . 121
. . . . 122
. . . . 123
. . . .123
. . . . 123
. . . . 124
. . . . 124
. . . . 126
. . . . 126
. . . . 127
. . . .129
. . . . 130
. . . . 130
. . . . 131
. . . . 132

.
.
.
.

. . . .135
. . . . 135
. . . . 136
. . . . 137

Chapter 8

Macros
Introduction to macros . . . . .
What is ReportBasic? . . . . .
Uses for macros . . . . . . . .
Scoping macros . . . . . . . .

135
.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

Global macros . . . . . . . . . . . . . . . . . . 137


Report macros . . . . . . . . . . . . . . . . . . 137
Using macros with other applications . . . . . . 138

Chapter 6

103

Creating and working with macros. . .


Creating a simple macro. . . . . . . .
Linking a macro to an event. . . . . .
Saving a macro to a .MAC file . . . .
Loading a macro . . . . . . . . . . . .
Advanced macro concepts . . . . . . .
Commands as functions or statements
Using arguments. . . . . . . . . . . .
Arguments and events . . . . . . . . .
Calling other macros. . . . . . . . . .
The RunMacro command . . . . . . .

Converting a columnar report to a graph . . . . . 103


Converting a crosstab to a graph . . . . . . . . . 105
Placing a graph. . . . . . . . . . . . . . . . . . . 105

Chapter 7

Crosstabs

.
.
.
.
.
.
.

Creating a crosstab . . . . . . . . . . . .
Method 1: From scratch . . . . . . . . .
Method 2: Based on a columnar report .
Method 3: Selecting three columns . . .
Placing a crosstab . . . . . . . . . . . . .
Selecting crosstab items. . . . . . . . . .
Modifying a crosstab . . . . . . . . . . .
Rows . . . . . . . . . . . . . . . . . . .
Values . . . . . . . . . . . . . . . . . .
Columns . . . . . . . . . . . . . . . . .
Crosstab report options . . . . . . . . .
Resizing rows and columns. . . . . . . .
Individual rows . . . . . . . . . . . . .
Individual columns . . . . . . . . . . .
Uniform row and column sizing . . . .
Manipulating data . . . . . . . . . . . . .
Grouping . . . . . . . . . . . . . . . . .
Deleting rows, columns or values. . . .
Sorting . . . . . . . . . . . . . . . . . .
Inverting rows and columns. . . . . . .
Calculating fields . . . . . . . . . . . .
Creating a field alias . . . . . . . . . . .
Formatting techniques . . . . . . . . . .
Working with crosstab styles . . . . . .
Applying a style . . . . . . . . . . . . .
Creating a style . . . . . . . . . . . . .
Extracting a style . . . . . . . . . . . .

Entering and formatting text . . . . . . . . . . . . 76


Adding borders. . . . . . . . . . . . . . . . . . . . 77
Inserting fields . . . . . . . . . . . . . . . . . . . . 79
Data fields . . . . . . . . . . . . . . . . . . . . . . 80
Derived fields . . . . . . . . . . . . . . . . . . . . 80
Report variables . . . . . . . . . . . . . . . . . . . 81
System fields . . . . . . . . . . . . . . . . . . . . 81
Summary fields . . . . . . . . . . . . . . . . . . . 82
Inserting field labels. . . . . . . . . . . . . . . . . 82
Placing items into a header or footer . . . . . . . . 83
Resizing field and record height . . . . . . . . . . 84

Graphs

.
.
.
.
.
.
.

107

Parts of a crosstab . . . . . . . . . . . . . . . . . 108


Types of crosstabs . . . . . . . . . . . . . . . . . 108
Value-only . . . . . . . . . . . . . . . . . . . . . 108
ii

. .
.
.
.
.
. .
. .
. .
. .
. .
. .
.
.
.
.

. . . .138
. . . 138
. . . 139
. . . 140
. . . 141
. . . .142
. . . . 142
. . . . 143
. . . . 143
. . . . 144
. . . . 144
.
.
.
.

Using macros with DDE: Three examples . . . . 145


Example 1: Loading a report through PowerBuilder
146
Example 2: Loading a report through SQL Windows
146
Example 3: Assigning a value to a report variable147
Using the Creation event . . . . . . . . . . . . . 148
Using the DataSet Control . . . . . . . . . . . . 148

Adding a custom menu item . . . . . . . . . . . 168


Running a report from an icon . . . . . . . . . . 169

Appendix A

Using ReportSmith with


other applications
Using DDE . . . . . . . . . . . . . .
Initiating DDE conversations . . . .
Applications . . . . . . . . . . . . .
Topics . . . . . . . . . . . . . . . .
Items . . . . . . . . . . . . . . . . .
Calling ReportSmith . . . . . . . . .
Calling another application . . . . . .
Sending menu commands . . . . . .
DDE synchronization . . . . . . . . .
Using OLE 2.0 . . . . . . . . . . . .
Embedding objects in a report . . .
Editing an embedded object. . . . .
Linking objects to a report. . . . . .
Dragging data between applications

Creating a DataSet Control Object. . . . . . . . 149


Properties and methods. . . . . . . . . . . . . . 150

Sample macros. . . . . . . . . . . . . . . . . . .
Example 1: Conditional formatting. . . . . . . .
Example 2: Setting report variables . . . . . . .
Example 3: Loading a series of reports. . . . . .
Example 4: Connecting to a database . . . . . .
Example 5: Displaying a greeting . . . . . . . .
Example 6: Creating a counter field . . . . . . .
Example 7: Determining a percent of total. . . .
Example 8: Creating a summary . . . . . . . . .
Example 9: Sample dialog box . . . . . . . . . .
Example 10: Refreshing a temporary table. . . .

150
151
152
153
153
154
154
154
156
156
157

Chapter 9

Printing a report

. . . . .171
. . . . 172
. . . . 172
. . . . 173
. . . . 173
. . . . .173
. . . . .173
. . . . .174
. . . . .174
. . . . .175
. . . . . 175
. . . . . 177
. . . . . 177
. . . . . 178

.
.
.
.

Macro reference
Macro object reference . . . . . . . . .
Basic conventions . . . . . . . . . . .
Variable data types . . . . . . . . . .
Application events . . . . . . . . . . .
Creation Events . . . . . . . . . . . .
Report Events . . . . . . . . . . . . .
Data field events . . . . . . . . . . . .
Command reference. . . . . . . . . . .
Data types and type conversion . . . .
ReportBasic command summary . . .
DataSet Control properties summary .
Basic commands summary

Chapter 10

163

Setting options . . . . . . . . . . . . . . . . . . .
Controlling data access . . . . . . . . . . . . . .
Choosing start-up options. . . . . . . . . . . . .
Selecting measurements. . . . . . . . . . . . . .
Listing items alphabetically. . . . . . . . . . . .
Choosing a font list . . . . . . . . . . . . . . . .
Storing connections . . . . . . . . . . . . . . . .
Pointing to graphics files . . . . . . . . . . . . .
Customizing the menu and toolbar . . . . . . . .
Disabling File|New . . . . . . . . . . . . . . . .

. .
.
.
.
.
. .
. .
. .
. .
. .
. .
. .
. .
. .

.
.
.
.

Appendix B

159

Setting up the printer. . . . . . . . . . . . . . . . 159


Printing a report . . . . . . . . . . . . . . . . . . 160

Customizing ReportSmith

171

163
164
165
165
166
166
166
166
167
167

Index

iii

181
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

. . . .181
. . . . 181
. . . . 182
. . . . 185
. . . . 188
. . . . 188
. . . . 190
. . . .191
. . . . 191
. . . . 192
. . . . 240
244

313

Introduction

The ReportSmith Users Guide explains how to create reports with ReportSmith. It begins with
basic tasks such as creating a basic report, and moves on to advanced topics such as working with
macros.

Who should use this guide


The Users Guide is intended for end-users who want to create a variety of reports from their
database tables. It assumes a general knowledge of the Windows environment. Advanced topics,
such as macros and SQL entry, assume a database and programming background.

Topics covered in this guide


The following table lists topics youll find in the Users Guide and provides a brief description of
each.
Introduction shows you how to find information in the ReportSmith manuals and discusses basic
tasks including how to create and format a basic report.
Chapter 1, Connecting to a data source lists databases that ReportSmith can access, tells you
how to connect to them, and how to save connection information.
Chapter 2, Types of reports you can create gives examples of types of reports you can
create, including default report types (columnar, crosstab, form and labels), and custom report
types (summary-only and master/detail).
Chapter 3, Bringing data into a report introduces you to the Report Query dialog boxes you
can use to create and modify reports, discusses adding and joining tables, choosing columns,
assigning column aliases, specifying selection criteria and using direct SQL entry.
Chapter 4, Manipulating data describes how to sort and group data, create derived fields,
summary fields, report variables and temporary tables, and create a master/detail report.

Introduction

Chapter 5, Formatting explains how to select and move parts of a report, set
paper size and orientation, to format a report by adding borders, using drawing tools,
formatting characters, using the Style Extractor and report styles, aligning items, and
displaying graphics filenames as pictures.
Chapter 6, Graphs describes how to convert a report to a graph.
Chapter 7, Crosstabs shows you types of crosstabs you can create, introduces
three methods for creating a crosstab, and shows you how to modify and format a
crosstab.
Chapter 8, Macros introduces you to macros and ReportBasic, shows you how to
create and use a simple macro, gives examples of sample macros.
Chapter 9, Printing a report shows you how to set up your printer and print an
entire report or a range of pages.
Chapter 10, Customizing ReportSmith shows you how you can customize
ReportSmiths options, the menu and toolbar, and how to run a report from an icon.
Appendix A, Using ReportSmith with other applications discusses Dynamic
Data Exchange (DDE), how to embed an OLE 2.0 object into a report, and shows you
how to call ReportSmith from another application, or call an application from
ReportSmith.
Appendix B, Macro reference provides a command reference for ReportSmiths
macro facility.

Users Guide

Das könnte Ihnen auch gefallen