Vous êtes sur la page 1sur 41

SUNGARD SUMMIT 2007 | sungardsummit.

com 1

Crystal Report tips and


Techniques
Presented by: Instructor Jim Tule

March 20, 2007


Course ID 1391

A Community of Learning
Introduction
Crystal Reports tips and techniques used to enhance the
reporting capabilities in your user community.
™ Learn how to set up more common Crystal Report options
to work with the Advance environment.
™ Learn how to create and use formula fields in reports.
™ Learn how to create and use Hyperlinks with in your
Crystal reports.
™ Learn about creating and formatting sub reports

Course ID 1391 2
SUNGARD SUMMIT 2007 | sungardsummit.com 3

Crystal Report Options

A Community of Learning
Crystal Report Setup

Course ID 1391 4
Crystal Reports Options Tab
• More common Reporting options

Use these options


to handle null
values to 0
(numeric) or
blank (Character).
Never Set this
when using reports
in AWA.

Course ID 1391 5
Crystal Database Options Tab

Can Restrict what database


information can be used in
reports.

Increases report
performance

Course ID 1391 6
Crystal Field Options Tab
The Options menu
can help users
define defaults for
different field
formats. As an
example, you can
customize defaults
for number values
or for Currency.
Other options
include adding
borders and
highlighting.

Course ID 1391 7
Crystal Font Options Tab
Formatting fonts,
size and colors for
different object in
the report can be
completed using the
Fonts section in the
Options menu.

Course ID 1391 8
SUNGARD SUMMIT 2007 | sungardsummit.com 9

Crystal Report Formulas

A Community of Learning
Crystal Report Formulas – Address Blocks
Creating and formatting address lines in reports.
™ Using multiple detail lines

Course ID 1391 10
Crystal Report Formulas – Address Blocks
• This checkbox
allows for any
detail line with
blank
information to
be removed
from the report
output.

Course ID 1391 11
Crystal Report Formulas – Address Blocks
• Create a formula to handle foreign or domestic address
lines. (Format used in this formula is Crystal formula.)
™ Please note that in Advance address tables the default is a blank
™ IF {ADDRESS.FOREIGN_CITYZIP} = " " THEN {ADDRESS.CITY} +
", " + {ADDRESS.STATE_CODE} + " " +{ADDRESS.ZIPCODE}
+{ADDRESS.ZIP_SUFFIX} ELSE {ADDRESS.FOREIGN_CITYZIP}

Course ID 1391 12
Crystal Report Formulas – Address Blocks
• Commonly used in Mail Lists. So how can you do this
for Profile Reports?

Course ID 1391 13
Crystal Report Formulas – Address Blocks
• Creating Profile Reports
™ a lot of Data to be captured on the page
™ formulas can be used to encapsulate data
• Notice the field size!

Course ID 1391 14
Crystal Report Formulas – Address Blocks
• Report Output – How did that Happen?

Course ID 1391 15
Crystal Report Formulas – Address Blocks
• Use the Format Editor to adjust field sizes

Course ID 1391 16
Crystal Report Formulas – Address Blocks
• Formulas Provide custom field creation and data
formatting

Course ID 1391 17
Crystal Report Formulas – Address Blocks
• Functions Used:
™ CHRW(13) – Provides Carriage Returns
™ Right({Field}, N) – Provides Values to the Right N
™ Left({Field}, N) – Provides Values to the Left N
™ IF THEN ELSE – Provides Control Structure
• Other Helpful Functions
™ Trim(Str) – Removes leading and trailing spaces
™ Length(Str) – Returns the number of characters
™ ToNumber(Str) – Converts string to number

Course ID 1391 18
SUNGARD SUMMIT 2007 | sungardsummit.com 19

Crystal Report Hyperlinks

A Community of Learning
Crystal Report Hyperlinks
• Creating a Hyperlink to Email
™ Looks like the Email Hyperlink in AWA and Advance!

Course ID 1391 20
Crystal Report Hyperlinks
• Hyperlink Tab Options
™ Link to static Email
™ Create a Formula Link

• Other Options
™ Link Websites
™ Link Files

Course ID 1391 21
Crystal Report Hyperlinks – Formula Example (email)
• Creating a formula for Emailing

Course ID 1391 22
Crystal Report Hyperlinks – Formula examples (Font)
• Set font attributes
using formulas

Course ID 1391 23
Crystal Report Hyperlinks – Formula examples (Font)
• Use a formula to change the font color

Course ID 1391 24
Crystal Report Hyperlinks – Formula examples (Font)
• Font underline use
true/false formula

Course ID 1391 25
Crystal Report Hyperlinks – AWA Hyperlinks
• Creating AWA Hyperlinks
• Can be placed in stored procedure
• Can be created via formulas
• SQL syntax example:
SELECT 'reportlink.aspx?type=ENTITY&key1=‘
|| e.id_number AS id
• Crystal syntax:
reportlink.aspx?type={keytype}&key1={keydata1}[&key2
={keydata2}][&key3={keydata3}]

Course ID 1391 26
Crystal Report Hyperlinks – AWA Hyperlinks
Adding a link using the formula editor

Reportlink.aspx?

Course ID 1391 27
Crystal Report Hyperlinks – AWA Hyperlinks
• From Report!

Click on the ID!

Course ID 1391 28
Crystal Report Hyperlinks – AWA Hyperlinks
• To Entity Overview!

Use the Back button to


get back to the report

Course ID 1391 29
Crystal Report Hyperlinks – AWA Hyperlinks
• Stored Procedure Hyperlinks
™ Useful with Giving Reports
™ SQL Output Example

Course ID 1391 30
Crystal Report Hyperlinks – AWA Hyperlinks
• Report Screen

Hyperlink

Link Code

Receipt #

Course ID 1391 31
Crystal Report Hyperlinks – AWA Hyperlinks
• Hyperlink to Gift Overview

Course ID 1391 32
SUNGARD SUMMIT 2007 | sungardsummit.com 33

Crystal Sub Reports

A Community of Learning
Creating Crystal Reports with Sub Reports
• Allows users to create additional reports within a main
report.
• Ability to present data from unrelated datasets
• Allows multiple presentations per dataset
• Can combine data from derived database field links

Course ID 1391 34
Creating Crystal Reports with Sub Reports
• Crystal Sub Report Design Mode

Main Report

Sub Report

Course ID 1391 35
Creating Crystal Reports with Sub Reports
• Sub report is a
Graph/Chart
Format Listing
Giving Totals
over a 5 year
period

• Main Report is
a Detail Report
listing Donors
with giving
larger than
$500000 in the
current year

Course ID 1391 36
Creating Crystal Reports with Sub Reports
• Ability to return a subset of data to the report section
™ Formula restricts data set returned

Course ID 1391 37
Creating Crystal Reports with Sub Reports
• Background Color set for Report Sections

Course ID 1391 38
Summary
• Crystal report Options sets standards for data and
reporting values.
• Formulas provide great flexibility and power by enabling
you to create derived fields not available in data
sources. Formulas also enable you to create advanced
conditional formatting and use flexible selection
formulas in reports.
• Hyperlinks Bring additional reporting power to Crystal
Reporting, allowing linking to web pages, files and
email.
• Sub Reports bring multiple datasets to a single report
without loading multiple report files to the database.

Course ID 1391 39
Questions & Answers

Course ID 1391 40
Thank You!
Jim Tule
Jim.tule@sungardhe.com

Please complete the online class evaluation form


Course ID 1391

SunGard, the SunGard logo, Banner, Campus Pipeline, Luminis, PowerCAMPUS, Matrix, and Plus are trademarks or registered
trademarks of SunGard Data Systems Inc. or its subsidiaries in the U.S. and other countries. Third-party names and marks
referenced herein are trademarks or registered trademarks of their respective owners.

© 2007 SunGard. All rights reserved.

Course ID 1391 41

Vous aimerez peut-être aussi