- •Welcome to Seagate Crystal Reports
- •Welcome
- •Two kinds of Hands-On tutorials
- •Command, button, key, and control conventions
- •Using Seagate Crystal Reports documentation
- •Seagate Crystal Reports online Help features
- •If you need more help...
- •Installation Requirements
- •Installing Seagate Crystal Reports
- •Installing on a network workstation
- •Upgrading from a previous version
- •Quick Start
- •Subreports expand report usefulness
- •Query Designer adds ad-hoc querying capabilities
- •Parameter fields mean multi-purpose reports
- •Text objects give you text with intelligence
- •Preprinted-form reports easier than ever
- •More powerful formulas extend your capabilities
- •Web solution serves up variety of online reports
- •HTML exporting simplifies Web activities
- •New database support improves data access
- •Running totals made easy
- •Smart Navigation
- •Learning Seagate Crystal Reports
- •User’s Guide
- •Online Help
- •Books Online
- •Sample Reports
- •Glossary
- •Sample Data - CRAZE.MDB
- •Suggested learning paths
- •The application window
- •Menu bar
- •Standard toolbar
- •Supplementary toolbar
- •Format bar
- •Status bar
- •Shortcut menus
- •Cursors
- •Design Tab
- •Preview Tab
- •Other fundamentals
- •HANDS-ON (Report Design Environment)
- •How to add, delete, and move guidelines
- •How to move and position objects using guidelines
- •How to turn the grid on/off
- •How to zoom your report in and out
- •How to undo/redo activities
- •How to drill down on summarized data
- •HANDS-ON (Sections and Areas)
- •How to add, delete, move, and merge sections
- •How to split and resize sections
- •Basic report design
- •How to design a prototype
- •Concepts in reporting
- •Beyond basic reports
- •HANDS-ON (Report Creation and Design)
- •How to select data and begin creating a report
- •How to add and link multiple tables
- •How to insert database fields
- •How to insert special fields
- •How to insert a page n of N field
- •How to insert text objects
- •How to use a database field in a text object
- •How to insert a picture
- •How to select, move, and resize objects
- •How to hide parts of the report
- •HANDS-ON (Finishing Your Report)
- •How to insert page headers and footers
- •How to add a title page to your report
- •How to add summary information to your report
- •Printing considerations
- •Design solutions for printing/distributing
- •Report creation checklist for distributed reports
- •Updating printer drivers
- •Report distribution
- •HANDS-ON (Distributing Your Report)
- •How to export reports
- •How to fax a report
- •How to request reports from a web browser
- •How to specify parameter field values
- •How to log on to a database
- •How to view plain HTML reports
- •Overview
- •Getting started
- •Record Selection
- •Grouping and sorting
- •Completing the report
- •Introduction
- •Working with Arbor Essbase data
- •HANDS-ON (Reporting on OLAP data)
- •How to create a cross-tab with Essbase data
- •Using multiple sections in reports
- •HANDS-ON (Multiple Section Reports)
- •How to work with text objects
- •How to create a form letter using a text object
- •How to format objects conditionally
- •How to print conditional messages in form letters
- •How to alternate background colors for rows
- •How to eliminate blank lines
- •How to add blank lines conditionally
- •Formatting concepts
- •Absolute formatting
- •Types of formatting properties
- •Conditional formatting
- •HANDS-ON (Absolute Formatting)
- •How to add color, shading, and borders
- •How to add/edit lines and boxes
- •How to change margins
- •How to add/delete white space between rows
- •How to set page orientation and paper size
- •HANDS-ON (Conditional Formatting)
- •How to flag values that meet certain conditions
- •Record selection
- •Group selection
- •Record selection formula templates
- •HANDS-ON (Record and Group Selection)
- •How to create a record or group selection formula
- •How to use record/group selection templates
- •How to select the top or bottom N groups
- •Sorting, Grouping, and Totalling Overview
- •Creating custom groups
- •HANDS-ON (Sorting, Grouping, and Totalling)
- •How to do a single field sort
- •How to do a multiple field sort
- •How to group data
- •How to sort records within groups
- •How to summarize grouped data
- •How to subtotal grouped data
- •How to sort based on summarized group values
- •How to create multiple levels of subtotals
- •How to group data in intervals
- •How to calculate a percentage of the grand total
- •How to create group headers
- •What are formulas?
- •Other formula conventions
- •Formula syntax
- •How formulas are evaluated - Order of precedence
- •HANDS-ON (Formulas 101)
- •How to insert a formula in your report
- •How to delete formulas from your report
- •How to copy formulas from online Help
- •How to copy formulas from one report to another
- •How to create if-then-else formulas
- •How to format text with formulas
- •How to use variables in formulas
- •How to declare a variable
- •How to assign a value to a variable
- •How to conditionally assign values to variables
- •How to use an array in a formula
- •How to use a range in a formula
- •How to use semicolons in formulas
- •How to fine tune group selection formulas
- •How to fine tune record selection formulas
- •How to debug a formula
- •Introduction
- •HANDS-ON (Advanced Totalling)
- •How to maintain running totals in a list
- •How to subtotal running totals within groups
- •How to subtotal without grouping
- •How to subtotal true A to B, A to C reports
- •Parameter field objects overview
- •Multiple parameter fields
- •Parameter field considerations
- •HANDS-ON (Parameter Field Objects)
- •How to create a parameter field
- •How to use a parameter field in a formula
- •How to respond to parameter field prompts
- •How to use wildcards with parameter fields
- •How to set a report title using parameter fields
- •How to set sort order using parameter fields
- •Graphing Overview
- •Choosing a graph or chart type
- •Where to place your graph
- •Data you can graph on
- •Before you create your graph
- •HANDS-ON (Graphing)
- •How to graph on a summary or subtotal field
- •How to graph on a details field
- •How to graph on a formula field
- •How to graph on cross-tab summaries
- •How to edit graphs using PGEditor
- •How to use the underlay feature with graphs
- •OLE Objects Overview
- •Inserting OLE objects in your reports
- •Linked vs. Embedded Objects
- •The dynamic OLE menu commands
- •OLE and the Picture command
- •General OLE considerations
- •HANDS-ON (OLE Objects)
- •How OLE objects are represented in your report
- •How to use OLE - General Overview Tutorial
- •How to insert a graphic/picture as an OLE object
- •What are subreports?
- •Unlinked vs. linked subreports
- •How subreport linking works
- •HANDS-ON (Subreports)
- •How to insert a subreport
- •How to preview your subreport
- •How to combine unrelated reports using subreports
- •How to use subreports with unlinkable data
- •Cross-tab overview
- •Cross-tab components
- •HANDS-ON (Cross-Tab Objects)
- •How to create a cross-tab object
- •How to format a cross-tab
- •How to print cross-tabs that span multiple pages
- •The Crystal Query Designer
- •HANDS-ON (Queries)
- •How to create a new query
- •How to add tables to a query
- •How to link tables and specify a join type
- •How to add fields to a query
- •How to identify unique values in a query
- •How to summarize data with aggregate functions
- •How to sort records according to field values
- •How to specify records to be included in a query
- •How to select groups to be included in a query
- •How to create an SQL expression
- •How to create a query from another Crystal Query
- •How to select a query for a report
- •How to use a parameter field in a query
- •Dictionaries Overview
- •HANDS-ON (Dictionaries)
- •How to create a new dictionary
- •How to add a data file
- •How to open an SQL or ODBC data source
- •How to link multiple tables
- •How to select tables and fields for users
- •How to add/create formulas
- •How to move fields/field headings within the list
- •How to update the location of a database table
- •How to add a new field heading
- •How to add Help text
- •How to add a graphic
- •How to create sample data for users to browse
- •How to edit an existing dictionary
- •How to convert a 3.x or 4.x dictionary file
- •How to select a dictionary for a report
- •Databases Overview
- •For additional information
- •HANDS-ON (Working With Databases)
- •How to open Access queries through DAO
- •How to open Access queries through ODBC
- •How to open Access parameter queries
- •How to set up an ODBC data source
- •How to check settings for an ODBC data source
- •How to log on to an ODBC data source
- •How to add an ODBC database table to a report
- •How to log on to MS SQL Server via ODBC
- •How to log off an ODBC data source
- •How to set up an A to B, A to C link
- •How to edit an SQL query
- •How to use an ACT! database
- •How to open the NT Event Log
- •Introduction
- •Four types of data
- •Direct access database files
- •ODBC data sources
- •Crystal Query Designer files
- •Crystal Dictionary files
- •Multi-pass reporting
- •Product support
- •Web support
- •E-mail support
- •Fax support
- •Telephone support
- •Extended technical support policy
- •Product registration
- •Product return policy
- •Product replacement policy
- •Glossary
rough design on paper helps them create a look for each page. It helps them find a balanced way of positioning the various elements before they begin working with sophisticated graphics tools. You will find a similar exercise helpful in designing your reports. See How to design a prototype, Page 104.
While a paper prototype is useful regardless of your expertise with Seagate Crystal Reports, it is particularly valuable when you are first learning the program. With the paper prototype in hand, you can put your full effort into learning and using the commands instead of trying to design and learn at the same time.
How to design a prototype
●Get paper of the size you will be using for your finished report.
●Position your title and other descriptive header information, using boxes or lines to represent report elements.
●Position your footer information.
●Review the page for balance.
●Look at the information you intend to include in the body of your report.
¾Count the number of fields you will be using and estimate the appropriate spacing between fields.
¾Use rectangles to pencil in the fields using your estimated spacing.
¾Change the spacing if you need to.
¾Decide on a logical sequence for presenting the data in the body of the report.
¾Label the fields to indicate that sequence.
●Use small boxes to indicate group values and totals.
●Place some random flags in the column where you want the flags to appear.
104 |
Seagate Crystal Reports User’s Guide |
●Darken any elements you want highlighted so they stand out from the rest of your prototype.
●Review your finished product for look and balance, and make changes as needed.
Concepts in reporting
Report Expert,
Another Report, or Custom Report?
The purpose of this section is to give you a conceptual understanding of the tasks necessary to create a fairly standard report such as the one created in Tutorial - Customer List, Page 165. Each topic is discussed in relation to the Tutorial; please refer to Tutorial - Customer List, Page 165, throughout for an illustration of these concepts.
The concepts are presented in the order you may use to create such a report and sources of additional information will be provided.
Each time you create a new report, you have three options:
1.using a Report Expert,
2.using Another Report as a template, or
3.creating a Custom Report from scratch.
You will probably use all options at some point in time.
REPORT EXPERT
The Report Experts help you create reports as quickly as possible and many new users and developers alike prefer to create the majority of their reports using them. All you have to do is choose the Expert that most closely matches your report type. The Expert walks you through the process of creating your reports step-by- step.
You can quickly create the report and see how it looks against your actual data. And best of all, if you then decide you want to make changes you can get back to the Report Expert to further modify your report. Search for Experts Index in Seagate Crystal Reports online Help.
Reporting 101 |
105 |
Selecting your data
ANOTHER REPORT
If you want to build a new report based upon one that already exists, you can use another report as a template to base your report on. The program will make a duplicate of the original report, which you can modify however you please to create your new report. Use this option whenever you think templates can save you time. Templates are useful:
●when you need to create a new report with a different grouping or different record selection than that of an existing report,
●when you need to create a series of reports, each a little different than the last,
●when you need to reconstruct a report based on an earlier time period using the same report structure used today, or
●when you need to create an entirely new report based on a set of databases that are linked in another report. You can create a report and delete the fields without disturbing the underlying links. Then, without relinking, you can build all your new reports based on this report.
CUSTOM REPORT
The Custom option is used when you want to create your report from scratch. This is used often when you want the full flexibility and control of building your reports from the ground up or if your report type is different than the many report types available in the Experts.
The Custom option was chosen for the Tutorial - Customer List, Page 165, because creating a report from scratch most fully illustrates the basics of reporting.
The next step when creating your reports, is to select the data you want to use in your report. This is a two step process. The first step is to determine what type of data you want to work with and the second step is to actually select the data. See How to select data and begin creating a report, Page 113.
106 |
Seagate Crystal Reports User’s Guide |
Seagate Crystal Reports provides four different data types:
●data file,
●SQL/ODBC,
●dictionaries, and
●queries.
DATA FILE
Choose the Data File option if you want to use any of the standard (not client-server) PC databases to report on. These are typically databases whose data and all software used to access that data are on a single machine. Seagate Crystal Reports can access many of the most common PC database formats directly; the program has built-in capabilities to directly open database files and tables designed in dBASE, FoxPro, Clipper, Btrieve, Paradox, and Microsoft Access, among others. Once the program is installed on your system, you can immediately begin creating reports based on these databases simply by selecting the appropriate file. See
Data Sources, Page 583.
The Data File option was chosen for the Tutorial - Customer List, Page 165, because the sample data, CRAZE.MDB, is a Microsoft Access database.
SQL/ODBC
Choose the SQL/ODBC option if you want to use SQL or ODBC data sources.
●SQL (Structured Query Language) databases are perhaps the most popular and most powerful database formats. They usually work over a client/server network architecture and they use:
¾an SQL server to create, store, and manipulate database files, tables, fields, and records, and
¾an SQL client interface allowing workstation users to retrieve data.
See Using SQL and SQL databases, Page 545.
Reporting 101 |
107 |
●ODBC (Open Database Connectivity) is a standard developed by Microsoft through which many different types of data can be accessed by a single application. An application need only communicate with one set of files, ODBC, to instantly be able to work with any source of data that can be accessed by ODBC.
See ODBC data sources, Page 606.
Seagate Crystal Reports provides direct drivers for many of the most popular SQL systems, and ODBC capabilities as well.
DICTIONARIES
In many large organizations, data is stored in a variety of places. It may be in different databases, on different servers, and so forth. IS departments often use naming schemes for tables and fields that are logical and predictable, but the names assigned may seem cryptic to non-technical staff. Enabling staff to create reports themselves in such an environment can create extensive training and support problems and possibly compromise data integrity. Dictionaries provide a solution to these problems. They allow you to provide your staff with ready access to the data in a form that they can understand, but they also allow you to maintain complete control and security over your data resources.
A dictionary is a structured, simplified, and secure view of organizational data that you can create for some or all of the users in your organization.
A dictionary is an optional metalayer that you can place between the user and the data. Using the capabilities of the metalayer you can:
●design a single, dynamic view of all the data that is necessary to create organizational reports and queries,
●include multiple data sources, tables, and links,
●organize the data and rename tables and fields to make it easier for users to understand the content and purpose of the data,
●limit access to specific columns of data (for example, letting only executives see the salary column of the employee data files),
108 |
Seagate Crystal Reports User’s Guide |
●place restriction formulas on specific rows of data (for example, allowing managers to view employee information only for those employees with a salary under $40,000),
●create complex data manipulation formulas that users can access without the need to understand formula concepts.
Dictionaries reduce support cost and time, increase user productivity, and enable you to add an additional layer of security between the user and the data.
NOTE: When you create a report using a dictionary, the only data you can use in the report is the data you access through the dictionary; you can not use a dictionary and some other data source in the same report. Because the dictionary is often used to impose data security, it would breach that security to allow unrestricted data access in a dictionary report.
NOTE: You can include a subreport based on a different data source in a primary report based on a dictionary.
NOTE: Dictionaries are an optional metalayer. You can use Seagate Crystal Reports without ever using dictionaries.
See Dictionaries, Page 491.
QUERIES
A query is simply a request for specific information from a database. If you are requesting that information from an SQL database (or from a database that you access via ODBC), your query must be written using the Structured Query Language (SQL). The SQL language is not difficult to learn, but mastering the fine points of creating and retrieving data using SQL can take quite a while. Since the Query Designer eliminates the need to understand SQL, it can get you building effective queries right away.
The Query Designer has been designed to meet the needs of individuals with little or no query background as well as the needs of experienced SQL professionals.
●If you are new to querying, you will enjoy the way the Query Designer helps you create queries, even if you have no knowledge of SQL whatsoever. By answering a few questions on a set of sequential tabs, you give the program all the information to generate a query that fits your needs.
Reporting 101 |
109 |
Linking
Placing data on your report
●If you are an SQL professional, you will appreciate the facility that enables you to fine tune the queries that the Query Designer generates. If you are more comfortable writing your own SQL queries, you will find it easy to enter your queries directly or even paste them in from another source.
The Query Designer can be a powerful tool for many of your information gathering needs.
NOTE: The Query Designer can only access data stored in an ODBC data source.
If your report contains data from two or more database tables you will need to link at this point when creating your reports. You link database tables so records from one database will match related records from another. For example, if you activate a Suppliers table and a Product table, you link the databases so that each product (from the Product table) can be matched up with the supplier that made the product (from the Supplier table).
The majority of your reports will probably require data from two or more tables so linking will be necessary. The process of linking is made easy with the Visual Linking Expert. See How to add and link multiple tables, Page 116, and search for Visual Linking Topics Index in Seagate Crystal Reports online Help.
NOTE: You will never find it necessary to link tables in reports from a query because any links required by the data have already been processed.
Placing data on your report is a very important task. You have to know what type of data you want to place on your report and also where on your report you want to place them.
DATABASE FIELDS
Much of the data you place on your report will be database fields, displaying data as it is stored in the database. For example, in
Tutorial - Customer List, Page 165, the Customer Name, City and Country fields are placed on the report. Normally, you will place database fields into the Detail section, but in certain circumstances you will place them in other sections of your report. See How to insert database fields, Page 118.
110 |
Seagate Crystal Reports User’s Guide |
Formatting data
Record selection
TEXT OBJECTS
Text objects will be used in your reports for a multitude of purposes. They are a powerful way of inserting titles; labelling summaries and other data on your report; and for easily combining database fields. For example, in the Tutorial - Customer List, Page 165, text objects are used to easily display the two contact name database fields as one object, to insert a column heading for the concatenated contact name, and to insert a title in your report. See How to insert text objects, Page 120.
SPECIAL FIELDS
To display information such as Page Numbers, Print Date, and Report Comments use the commands on the Insert|Special Field menu. See How to insert special fields, Page 118, and search for
Special Field commands in Seagate Crystal Reports online Help.
FORMULA FIELDS
If you want to display data that is a calculated value, you will need to create a formula field and place that formula field on your report. For example, if your database only stores the order and ship dates for orders but you need to display the number of days it takes to ship the order, you will need to create a formula field that will calculate the number of days between ordering and shipping. This is just one simple example of the use of formula fields. See Formulas 101, Page 321, for an introduction to formulas.
At this point in creating a report, you may want to do some basic formatting. Perhaps you would like to change the font size and style of a text object used as a title. Or, if you have a number field, such as a sales figure, you might want to place a dollar sign before the number or change the number of decimal places displayed.
For example, in the Tutorial - Customer List, Page 165, you format the title, add a text object to identify the Contact Name information, and insert the company logo. See Formatting, Page 231.
Record selection, the task of paring down the data in your reports to include only the data required for your report, is a crucial step in report creation. You will rarely want a listing of all the information in a database. Most often you will be interested in
Reporting 101 |
111 |
Grouping,
sorting, and summarizing your data
only the sales in a given time period or for a certain product, etc. For example, a sales report may be designed to only include sales from one product line for the last calendar month.
The sample data used for the Tutorial - Customer List, Page 165, has information from both United States and International customers. Record selection is used to create a report that lists only those customers in the United States. See Record and Group Selection, Page 249.
Once you have created a basic report you will want to organize the data by grouping related information, sorting individual records, and summarizing, subtotaling, and grand totalling.
GROUPING RECORDS
To organize your data, you may want to group related data together. For example, in the Tutorial - Customer List, Page 165, after grouping the Customer List by region, you divide the list into region groups. That way, a sales manager for the California region could quickly locate the California group and see the customers within their region only. See How to group data, Page 285.
SORTING RECORDS
Seagate Crystal Reports allows you to specify the order in which you want the records on your report displayed. For example, after grouping in the Tutorial - Customer List, Page 165, you sort the records within each region in alphabetic order by Customer Name. Many of your reports will use some type of sorting. Depending on the report, you will sort the records in a list or sort in conjunction with grouping. See How to do a single field sort, Page 281, and How to sort records within groups, Page 287.
SUMMARIES, SUBTOTALS, AND GRAND TOTALS
Many of your reports will use some sort of totalling. For example, in a North American sales report grouped by state, you might want to calculate the total dollar amount sold in each state. You do this by creating a subtotal on the sales field. Summaries are also used at the group level, allowing you to calculate averages, counts, and other group (aggregate) values. For example, in a sales report you may want to calculate an average of sales per
112 |
Seagate Crystal Reports User’s Guide |