crystal reports v3.0

257
The New Standard in Quality Education Crystal Reports Crystal Reports Version 3.0

Upload: mohibd

Post on 24-Nov-2014

196 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Crystal Reports V3.0

The New Standard in Quality Education

Crystal ReportsCrystal Reports

Version 3.0

Page 2: Crystal Reports V3.0

2 The New Standard in Quality Education

Crystal Reports Overview

Pre-requisites

Introduction

Page 3: Crystal Reports V3.0

3 The New Standard in Quality Education

Objectives

“To enable you to develop your own reporting solutions in Crystal Reports with confidence”

Page 4: Crystal Reports V3.0

4 The New Standard in Quality Education

Course Overview

1 Data Structure

2 Simple Report Creation

3 Crystal Report Functions

4 Running Reports

Page 5: Crystal Reports V3.0

The New Standard in Quality Education

Scala Data StructureScala Data Structure

Section 1

Page 6: Crystal Reports V3.0

6 The New Standard in Quality Education

Section Overview

What is a Database? How do we connect to the Database? Scala data file structure

Page 7: Crystal Reports V3.0

7 The New Standard in Quality Education

How Do We Connect to the DB?

Scala5.x Modules

Data Management

Scala ClientWin95, 98, NTWeb Browser

Scala Program Layer

Btrieve or SQL datamanagement layer

Database

Page 8: Crystal Reports V3.0

8 The New Standard in Quality Education

How Do We Connect to the DB?

Database

Crystal Reports

DDF’s – Describe Database (Btrieve) ODBC – Connects to Database table SY SO BJEC TS

Read Only

Page 9: Crystal Reports V3.0

11 The New Standard in Quality Education

Data File Structure

Scala Table Naming Definition

MMNNCCYY

Module

Unique Number Company Code

Financial Year

Page 10: Crystal Reports V3.0

12 The New Standard in Quality Education

Data File Structure

Format of Data files

Page 11: Crystal Reports V3.0

13 The New Standard in Quality Education

Data File Structure

Format of Fields

Page 12: Crystal Reports V3.0

14 The New Standard in Quality Education

Data File Structure Database to Interpret field and file

names ScaDBconv.exe Scala5eu.mdb in Scala root directory Table in SQL database

SCA_TAB_COLUMNS

Page 13: Crystal Reports V3.0

15 The New Standard in Quality Education

Data File Structure

Scala5eu.mdb welcome screen

Page 14: Crystal Reports V3.0

16 The New Standard in Quality Education

Data File Structure

Page 15: Crystal Reports V3.0

17 The New Standard in Quality Education

Break

Break

Page 16: Crystal Reports V3.0

18 The New Standard in Quality Education

Section Review

What is a Database? How do we connect to the Database? Scala data file structure

Page 17: Crystal Reports V3.0

The New Standard in Quality Education

Simple Report Simple Report CreationCreation

Section 3

Page 18: Crystal Reports V3.0

20 The New Standard in Quality Education

Section Overview

Report Style SQL Data Files Scala Data Files Scala Data Fields Preview Report

Page 19: Crystal Reports V3.0

21 The New Standard in Quality Education

Report Creation

Click

Page 20: Crystal Reports V3.0

22 The New Standard in Quality Education

Report Style

Report A - Stock Listing

Step 1Step 1 - Choose report style- Choose report style

Click

Page 21: Crystal Reports V3.0

23 The New Standard in Quality Education

Data Source

Step 2Step 2 - Select Data Source- Select Data Source

Click

Page 22: Crystal Reports V3.0

24 The New Standard in Quality Education

Data Source

Step 3 - Choose Data SourceStep 3 - Choose Data Source

Note the different database options!!

Page 23: Crystal Reports V3.0

25 The New Standard in Quality Education

Data Source

Step 3 - Choose Data SourceStep 3 - Choose Data Source

Need to supply user name and password

Page 24: Crystal Reports V3.0

26 The New Standard in Quality Education

Step 4 - Select Scala Data TablesStep 4 - Select Scala Data Tables

Scala Data Files

ClickTo

Finish

Select File(s)

Select Single or Multiple Tables

Page 25: Crystal Reports V3.0

27 The New Standard in Quality Education

Scala Data Files

Confirmation of Selected Files

Click Next

Page 26: Crystal Reports V3.0

28 The New Standard in Quality Education

Scala Data Fields

Step 5 - Select FieldsStep 5 - Select Fields

Page 27: Crystal Reports V3.0

29 The New Standard in Quality Education

Scala Data Fields

Report 1 Stock Listing– Stock Code SC01001– Description Line 1 SC01002– Price Local Currency

SC01004– Stock Balance SC01042

Page 28: Crystal Reports V3.0

30 The New Standard in Quality Education

Scala Data Fields

Select Fields

Choose Add

Page 29: Crystal Reports V3.0

31 The New Standard in Quality Education

Field Tab

Page 30: Crystal Reports V3.0

32 The New Standard in Quality Education

Preview Report

When all fields are selected choose FINISH

Click

Page 31: Crystal Reports V3.0

33 The New Standard in Quality Education

Report Creation

Page 32: Crystal Reports V3.0

34 The New Standard in Quality Education

Report Creation You can return to the report expert at

any time by using the function Recommend that the report is saved

before returning to the expert

Page 33: Crystal Reports V3.0

35 The New Standard in Quality Education

Break

Break

Page 34: Crystal Reports V3.0

36 The New Standard in Quality Education

Section Review

STEP 1 - Report Style STEP 2 - SQL Data Source STEP 3 - Scala Data Tables STEP 4 - Scala Data Fields STEP 5 - Preview Report

Page 35: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercise 1

Customer Listing

Page 36: Crystal Reports V3.0

The New Standard in Quality Education

Crystal ReportsCrystal Reports

Section 3

Page 37: Crystal Reports V3.0

39 The New Standard in Quality Education

Section Overview

Design & Preview Report Options Guidelines Refreshing Data Right Click Sections

Page 38: Crystal Reports V3.0

40 The New Standard in Quality Education

Design & Preview Tabs

Page 39: Crystal Reports V3.0

41 The New Standard in Quality Education

Design & Preview Tab

Page 40: Crystal Reports V3.0

42 The New Standard in Quality Education

Preview Tab

Page 41: Crystal Reports V3.0

43 The New Standard in Quality Education

Report Options

Options Report Options

Page 42: Crystal Reports V3.0

44 The New Standard in Quality Education

Options

Page 43: Crystal Reports V3.0

45 The New Standard in Quality Education

Options

Page 44: Crystal Reports V3.0

46 The New Standard in Quality Education

Options

Page 45: Crystal Reports V3.0

47 The New Standard in Quality Education

Guidelines

Page 46: Crystal Reports V3.0

48 The New Standard in Quality Education

Refreshing Data

F5 Refreshes Data or Preview Sample

Page 47: Crystal Reports V3.0

49 The New Standard in Quality Education

Refreshing Data

Preview Sample

Page 48: Crystal Reports V3.0

50 The New Standard in Quality Education

Right Clicking

Useful in many areas of Crystal

Short Cut to menu options

Page 49: Crystal Reports V3.0

51 The New Standard in Quality Education

The Magic Button

Undo / Redo

Page 50: Crystal Reports V3.0

52 The New Standard in Quality Education

Sections

Left-hand side of design tab shows report sections

ReportSections

Page 51: Crystal Reports V3.0

53 The New Standard in Quality Education

Sections

Right-hand clicking in the sections area brings up menu

Format sections command gives further details of sections.

Section can be hidden allowing drill down function or suppressed

Page 52: Crystal Reports V3.0

54 The New Standard in Quality Education

Sections

Page 53: Crystal Reports V3.0

55 The New Standard in Quality Education

Section Review

Design & Preview Report Options Guidelines Refreshing Data Right Click Sections

Page 54: Crystal Reports V3.0

The New Standard in Quality Education

FormattingFormatting

Page 55: Crystal Reports V3.0

57 The New Standard in Quality Education

Section Overview

Adjusting Headings Increasing Field Width Adding new fields Adding Special fields Selection Expert Sorting Grouping Parameters

Page 56: Crystal Reports V3.0

58 The New Standard in Quality Education

Adjusting Headings

Highlight field To rename double click or | edit |

text object As with many windows products

Crystal Reports supports drag and drop and copy and paste

Page 57: Crystal Reports V3.0

59 The New Standard in Quality Education

Increasing Field Width

Highlight the field

Place pointer on blue boxes it changes to arrow

Field width and height can be adjusted by dragging arrow

Page 58: Crystal Reports V3.0

60 The New Standard in Quality Education

Adding New Fields

Text Field

Drag And Click to Drop

Page 59: Crystal Reports V3.0

61 The New Standard in Quality Education

Adding New Fields

Field Explorer

Page 60: Crystal Reports V3.0

62 The New Standard in Quality Education

Adding New Fields

Database fields

Select field

Page 61: Crystal Reports V3.0

63 The New Standard in Quality Education

Adding Special Fields

Page 62: Crystal Reports V3.0

64 The New Standard in Quality Education

Adding Special Fields A number of the special field values are

set in Summary info from file menu

Page 63: Crystal Reports V3.0

65 The New Standard in Quality Education

Selection Expert Choose Select Expert

Then choose field to select items from. Report on non-report field

Page 64: Crystal Reports V3.0

66 The New Standard in Quality Education

Selection Expert

Default to AND can change to OR through formula

Page 65: Crystal Reports V3.0

67 The New Standard in Quality Education

Selection Expert

Example of Selection terms

New!

Page 66: Crystal Reports V3.0

68 The New Standard in Quality Education

Sorting Records

You can sort by multiple columns.

Page 67: Crystal Reports V3.0

69 The New Standard in Quality Education

Brings up sort box

Automatic sort by column 1

Sort Expert

ReportFields

SortFields

Sort Direction

Page 68: Crystal Reports V3.0

70 The New Standard in Quality Education

Grouping

Used to group data together Similar to sorting but adds headers and

footers

Page 69: Crystal Reports V3.0

71 The New Standard in Quality Education

Grouping

Used in Sub-Totaling User can define the order

Page 70: Crystal Reports V3.0

72 The New Standard in Quality Education

Grouping

Define Order

Extra Options on Date field

Page 71: Crystal Reports V3.0

73 The New Standard in Quality Education

Grouping

Specified Grouping – User defined order

Select Groups

Page 72: Crystal Reports V3.0

74 The New Standard in Quality Education

Grouping

Example of Grouping

Page 73: Crystal Reports V3.0

75 The New Standard in Quality Education

Parameters

Used with selection terms Provides an easy way to change

selection terms when a report is refreshed

Parameter can be used as a field in the report. For Example in the report title.

Compatible with compiled reports or web based reports

Page 74: Crystal Reports V3.0

76 The New Standard in Quality Education

Parameters

Then click icon to create new parameter

Page 75: Crystal Reports V3.0

77 The New Standard in Quality Education

Parameters

Text that appears when report is run

Type

Allows parameter to hold single value or multiple values and Ranges. Experiment to see affect

Next Screen

Page 76: Crystal Reports V3.0

78 The New Standard in Quality Education

Parameters

Warning on Usage

Page 77: Crystal Reports V3.0

79 The New Standard in Quality Education

Parameters

Example of Usage

Page 78: Crystal Reports V3.0

80 The New Standard in Quality Education

Parameters

Enter Parameter as selection terms Parameter field denoted as (? Field)

Now refresh data

Page 79: Crystal Reports V3.0

81 The New Standard in Quality Education

Parameter

Page 80: Crystal Reports V3.0

82 The New Standard in Quality Education

Section Review

Adjusting Headings Increasing Field Width Adding new fields Adding Special fields Selection Expert Sorting Grouping Parameters

Page 81: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercise 2

Page 82: Crystal Reports V3.0

84 The New Standard in Quality Education

Break

Break

Page 83: Crystal Reports V3.0

The New Standard in Quality Education

Totalling and Totalling and Formula’sFormula’s

Section 6

Page 84: Crystal Reports V3.0

86 The New Standard in Quality Education

Section Overview

Strings Converting Strings Totalling / subtotalling and

summaries Converting Dates

Page 85: Crystal Reports V3.0

87 The New Standard in Quality Education

Strings Scala 5.1 SQL holds the majority of

fields in the correct format. However due to historical reasons some fields will need to be converted

Strings are collections of characters alpha and/or numeric

Strings need to be converted to numbers for Crystal to perform operations

Page 86: Crystal Reports V3.0

88 The New Standard in Quality Education

Converting Strings to Numbers

Create a new formulaClick New

Page 87: Crystal Reports V3.0

89 The New Standard in Quality Education

Converting Strings to Numbers

Give the formula a name

Tip - Give your formula name the column name

Page 88: Crystal Reports V3.0

90 The New Standard in Quality Education

This then brings up formula editor box

Converting Strings to Numbers

Operators

Formula Text

Fields

Functions

Page 89: Crystal Reports V3.0

91 The New Standard in Quality Education

To convert a string to a number type

ToNumber({Field name})

Be careful of Brackets– (,) = function– {,} = field– [,] = field value (Seen later)

Converting Strings to Numbers

Function Field

Page 90: Crystal Reports V3.0

92 The New Standard in Quality Education

Converting Strings to Numbers

Page 91: Crystal Reports V3.0

93 The New Standard in Quality Education

Converting Strings to Numbers

Unfortunately this formula does not always work.

Scala leaves blanks in database instead of zeros.

Therefore we need to add to the statement

If {field_name} = “” Then 0

Else ToNumber({Field_Name})

Page 92: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercise 3

Page 93: Crystal Reports V3.0

95 The New Standard in Quality Education

Totalling and Sub-totalling

Sub total or grand total fields must be numeric.

Highlight the field you require a total for and select totalling from insert drop down menu.

Page 94: Crystal Reports V3.0

96 The New Standard in Quality Education

Totalling and Sub totalling Right hand clicking on the report

field will also bring up a shortcut method to enter totalling.

If the options are missing on the menu you have not chosen a numeric field

Page 95: Crystal Reports V3.0

97 The New Standard in Quality Education

Sub-totalling Entering a sub-total

Page 96: Crystal Reports V3.0

98 The New Standard in Quality Education

Totalling Insert grand-totals

Choice of sum, maximum, minimum, average etc. Field printed in report footer

Page 97: Crystal Reports V3.0

99 The New Standard in Quality Education

Summaries Similar to subtotal

but will give same

totalling options as

grand total function

Page 98: Crystal Reports V3.0

100 The New Standard in Quality Education

Converting Dates

Again the majority of dates in Scala database are held as datetime or date fields. However some may need conversion from a string field

1998091519980915

YYYYMMDDYYYYMMDD

Page 99: Crystal Reports V3.0

101 The New Standard in Quality Education

Converting Dates

Conversion requires following formula:

– If {Field_Name} = “” then – Date(0,0,0) Else– Date(ToNumber({field_name}[1 to 4]),– ToNumber({field_name}[5 to 6]),– ToNumber({field_name}[7 to 8]))

Page 100: Crystal Reports V3.0

102 The New Standard in Quality Education

Section Review

Strings Converting Strings Totalling / subtotalling and

summaries Converting Dates

Page 101: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercise 4

Page 102: Crystal Reports V3.0

The New Standard in Quality Education

Formatting Numbers & Formatting Numbers & DatesDates

Section 7

Optional

Page 103: Crystal Reports V3.0

105 The New Standard in Quality Education

Section Overview

Formatting Strings Formatting Numbers Formatting Dates Conditional Formatting Highlight Expert Top N Selection Report Alerts Running Totals SQL Expressions

Page 104: Crystal Reports V3.0

106 The New Standard in Quality Education

Formatting Strings

Right-hand click

on field or chose

format field from

format menu

Page 105: Crystal Reports V3.0

107 The New Standard in Quality Education

Formatting Numbers

Extra Format

Tab

Page 106: Crystal Reports V3.0

108 The New Standard in Quality Education

Formatting Numbers

Page 107: Crystal Reports V3.0

109 The New Standard in Quality Education

Formatting Dates Extra Format

Tab Choose

Customize

Page 108: Crystal Reports V3.0

110 The New Standard in Quality Education

Conditional Formatting

Conditional

Vs Absolute

Select a number field for this example

Page 109: Crystal Reports V3.0

111 The New Standard in Quality Education

Conditional Formatting

Brings up the Formula Editor Box

Page 110: Crystal Reports V3.0

112 The New Standard in Quality Education

Conditional Formatting

Button Changes to Red indicating value is controlled conditionally

Page 111: Crystal Reports V3.0

113 The New Standard in Quality Education

Conditional Formatting

Conditional formatting can be used throughout Crystal reports

Advanced technique that is particularly useful in dealing with Sections

Page 112: Crystal Reports V3.0

114 The New Standard in Quality Education

Highlight Expert

Works similarly to previous example of conditional formatting

Gives a Traffic Light effect to the data

Page 113: Crystal Reports V3.0

115 The New Standard in Quality Education

Highlight Expert

Page 114: Crystal Reports V3.0

116 The New Standard in Quality Education

Report Alerts

Similar to Highlight expert but a window appears when a report is run to indicate records correspond to a certain set of conditions

For Example – when printing a customer statement shows customers with a balance exceeding £1000

New functionality in Crystal 8.5

Page 115: Crystal Reports V3.0

117 The New Standard in Quality Education

Report Alerts

Page 116: Crystal Reports V3.0

118 The New Standard in Quality Education

Report Alerts

Page 117: Crystal Reports V3.0

119 The New Standard in Quality Education

Report Alerts

Page 118: Crystal Reports V3.0

120 The New Standard in Quality Education

Report Alerts

When report data is refreshed the report will then produce an exception report

Page 119: Crystal Reports V3.0

121 The New Standard in Quality Education

Top N Expert

Used for finding the top N on any column. For example the top 20 outstanding supplier balances on purchase ledger.

Page 120: Crystal Reports V3.0

122 The New Standard in Quality Education

Top N Selection You must create a sub total or

summary before the top N selection will work.

Specify value of N

Page 121: Crystal Reports V3.0

123 The New Standard in Quality Education

Running Totals

Used to create cumulative totals in reports

Totals will be dependent on the grouping of the report

Page 122: Crystal Reports V3.0

124 The New Standard in Quality Education

Running Total

Page 123: Crystal Reports V3.0

125 The New Standard in Quality Education

SQL Expression Fields Used only with SQL compatible

databases Allow SQL syntax to entered in Crystal

report Improves report performance when

grouping, selecting or sorting data as query is run on server instead of workstation

Limited in functionality compared with crystal formulas

Page 124: Crystal Reports V3.0

126 The New Standard in Quality Education

SQL Expression Fields Creating a new SQL expression

Page 125: Crystal Reports V3.0

127 The New Standard in Quality Education

SQL Expression Fields

Note limited functionality

Page 126: Crystal Reports V3.0

128 The New Standard in Quality Education

Field Explorer

Insert

BrowseData Only New Edit Rename Delete

Toggle FieldType

Page 127: Crystal Reports V3.0

129 The New Standard in Quality Education

Field Explorer ? denotes Parameter field @ denotes formula field Σ denotes SUM or group field # denotes running total % denotes a SQL expression

Page 128: Crystal Reports V3.0

130 The New Standard in Quality Education

Section Review

Formatting Strings Formatting Numbers Formatting Dates Conditional Formatting Highlight Expert Top N Selection Report Alerts Running Totals SQL Expressions

Page 129: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercises 5

Page 130: Crystal Reports V3.0

The New Standard in Quality Education

Linking TablesLinking Tables

Section 8

Page 131: Crystal Reports V3.0

133 The New Standard in Quality Education

Section Overview

Why link tables Rules of linking What is an indexed field How to link tables

Page 132: Crystal Reports V3.0

134 The New Standard in Quality Education

Why Link Tables

Scala holds data in multiple data files

For the majority of reports data files need to be linked.

Warning! Linking files will slow down report speed. Keep the number of data files to a minimum.

Page 133: Crystal Reports V3.0

135 The New Standard in Quality Education

Rules Of Linking

Not all data files can be linked directly

Data files must have common element

Performance is improved if the common element is an indexed field

Page 134: Crystal Reports V3.0

136 The New Standard in Quality Education

Rules of Linking

Linking must be done in a logical sequence

It must flow through the report Jot down blueprint of report before

starting to build it

Page 135: Crystal Reports V3.0

137 The New Standard in Quality Education

Linking Tables How do we link the following tables

together – Start with SL01

OR01

OR03 SL01

SC01

Order NoStock Code

Customer Code

Page 136: Crystal Reports V3.0

138 The New Standard in Quality Education

What is an indexed field?

A field that the data file uses as a sort or search key

Example Telephone directory

Smith A J 23 North Parade, Horsham 01403 215998

= The Index (Ordering)

Smith A J 23 North Parade, Horsham 01403 215998

= The Primary Key

Page 137: Crystal Reports V3.0

139 The New Standard in Quality Education

What is an indexed field?

2307 Clive's Coffee Shop Customer Address

2087 Arnot Limited Customer Address

2498 Drew PLC Customer Address

2190 Blackmore Electronics Customer Address

Key 1 Key 2

2087

2190

2307

2498

Index 1

2307 Clive's Coffee Shop Customer Address

2087 Arnot Limited Customer Address

2498 Drew PLC Customer Address

2190 Blackmore Electronics Customer Address

Key 1 Key 2Index 2

Arnot Limited

Drew PLC

Blackmore Electronics

Clive's Coffee Shop

Drew PLC

Page 138: Crystal Reports V3.0

140 The New Standard in Quality Education

How to Link Tables

To an existing report

SelectIn this example use report with SL01 and link SL03

Page 139: Crystal Reports V3.0

141 The New Standard in Quality Education

How to Link Tables

Select

Page 140: Crystal Reports V3.0

142 The New Standard in Quality Education

How to Link Tables

Page 141: Crystal Reports V3.0

143 The New Standard in Quality Education

How Link Tables

OK

Page 142: Crystal Reports V3.0

144 The New Standard in Quality Education

How to Link Tables Smart Linking works on following

conditions– Field name is same in both tables– Field size is the same in both tables– Field type is the same in both tables

Note: Because of this you may receive warnings when linking tables because of different data type

Linking can only be done between database fields. (NOT FORMULA’S)

Page 143: Crystal Reports V3.0

145 The New Standard in Quality Education

How to Link Tables

Drag and Drop from SL01001 to SL03001

Page 144: Crystal Reports V3.0

146 The New Standard in Quality Education

Linking Tables

Crystal supports different join typesOne to One (equal)One to Many (Left Outer)Many to One (Right Outer)And others….

Page 145: Crystal Reports V3.0

147 The New Standard in Quality Education

Linking Tables

Once the tables are linked click OK The fields in the table then become

available to report on To return to the visual linking expert

Page 146: Crystal Reports V3.0

148 The New Standard in Quality Education

Section Review

Why link tables Rules of linking What is an indexed field How to link tables

Page 147: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercise 6

Page 148: Crystal Reports V3.0

150 The New Standard in Quality Education

DAY 2 - Overview

Scala Database Structure Simple Report Creation Crystal Functionality Formatting More formatting and field types Linking Tables

Page 149: Crystal Reports V3.0

152 The New Standard in Quality Education

Section Review

Pictures and Logo’s Hyperlinks Lines / Boxes Charting Mapping Function Report Style / Auto Arrange

Page 150: Crystal Reports V3.0

153 The New Standard in Quality Education

Extra Functionality

Picture files can be embedded in report to give them a professional finish

Crystal supports

bitmap BMP, jpeg

JPG, tiff and png files

Page 151: Crystal Reports V3.0

154 The New Standard in Quality Education

Extra Functionality

In the properties of the picture or any field a hyperlink can be set so when clicking on the logo it takes you directly to the web site

Page 152: Crystal Reports V3.0

155 The New Standard in Quality Education

Extra Functionality

Page 153: Crystal Reports V3.0

156 The New Standard in Quality Education

Lines and Boxes

These extra formatting tools are available from the insert menu

Page 154: Crystal Reports V3.0

157 The New Standard in Quality Education

Lines and Boxes

Page 155: Crystal Reports V3.0

158 The New Standard in Quality Education

Charting

Tool can be used to create professional looking graphs and charts that can be embedded into the Crystal report

Drill down functionality can be used in conjuncture with charts

Charting works on subtotal values in the report however the whole report can be suppressed with just the chart being visible

Page 156: Crystal Reports V3.0

159 The New Standard in Quality Education

Charting

Page 157: Crystal Reports V3.0

160 The New Standard in Quality Education

Charting

Page 158: Crystal Reports V3.0

161 The New Standard in Quality Education

Charting

Page 159: Crystal Reports V3.0

The New Standard in Quality Education

Exercise

Exercise 7

Page 160: Crystal Reports V3.0

The New Standard in Quality Education

Running ReportsRunning Reports

Section 9

Page 161: Crystal Reports V3.0

171 The New Standard in Quality Education

Section Overview

Exporting What is compilation and

Distribution? Compiling Report Distribution Expert Web Reporting

Page 162: Crystal Reports V3.0

172 The New Standard in Quality Education

Exporting

Crystal has links with other software including excel, adobe, HTML, RTF, text and XML

To export report file | print | export or

Page 163: Crystal Reports V3.0

173 The New Standard in Quality Education

Exporting

The report can also be emailed or saved to an exchange or lotus notes folder for publication

Page 164: Crystal Reports V3.0

174 The New Standard in Quality Education

What is Compilation?

Reports can be saved as an executable

Report users then need no knowledge of Crystal design tools - they can just run the report

Selection terms or parameters can be changed

Page 165: Crystal Reports V3.0

175 The New Standard in Quality Education

Compiling Historically Seagate software has

included the compiling and distributing tool as part of the standard product

In Version 8 & 8.5 this tool was replaced by web reporting however due to demand they included an update to the product which can be downloaded at

http://www.crystaldecisions.com/

Page 166: Crystal Reports V3.0

176 The New Standard in Quality Education

Compiling

Select compile report from report menu

Page 167: Crystal Reports V3.0

177 The New Standard in Quality Education

Compiling

Brings up compile box

Click OK to compile

File name

No

Page 168: Crystal Reports V3.0

178 The New Standard in Quality Education

Compiling

Users can run compiled reports only if they have crystal reports installed on their workstation

Page 169: Crystal Reports V3.0

179 The New Standard in Quality Education

Compiling

Defaults to refresh if no data saved with report

Page 170: Crystal Reports V3.0

180 The New Standard in Quality Education

Report Distribution Expert

Can be used where user does not have Crystal installed

Copies program files that report needs to run.

Users who run report will need to ODBC connection to the Scala Database set-up

Page 171: Crystal Reports V3.0

181 The New Standard in Quality Education

Report Distribution Expert

Can Distribute more that one report at a time

Indicate shared destination directory

Page 172: Crystal Reports V3.0

182 The New Standard in Quality Education

Report Distribution Expert

This expert will then run the report in the background and prepare a list of dll’s it needs to run the report. It warns about ODBC components but doesn’t include them

You can adjust the included dll’s but this is not recommended

Then click on build which produces a setup.exe file which then needs to be run on clients

Page 173: Crystal Reports V3.0

183 The New Standard in Quality Education

Web Reporting

Crystal Version 8.5 requires crystal enterprise in order to run web reports

If you purchased the Professional or Developer edition of Crystal Reports, then you also received the Crystal Enterprise Standard CD, along with five free concurrent access licenses of Crystal Enterprise Standard.

More information is available on the fact sheet

Page 174: Crystal Reports V3.0

184 The New Standard in Quality Education

Web Reporting

Scala’s new product iScala Web reporter uses Crystal enterprise technology

Crystal enterprise is not currently included in this course

Page 175: Crystal Reports V3.0

185 The New Standard in Quality Education

Section Review

Exporting What is compilation Compiling Report Distribution Expert Web Reporting

Page 176: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercise 8

Page 177: Crystal Reports V3.0

The New Standard in Quality Education

Database FeaturesDatabase Features

Section 11

Page 178: Crystal Reports V3.0

188 The New Standard in Quality Education

Section Overview

Crystal Report Functions Crystal Data Dictionaries Crystal SQL Designer SQL Views Scala SQL View Manager

Page 179: Crystal Reports V3.0

189 The New Standard in Quality Education

Crystal Report Functions

SQL query produced automatically when building the report

This query can be viewed and manually edited in Crystal reports

Page 180: Crystal Reports V3.0

190 The New Standard in Quality Education

Crystal Report Functions

Page 181: Crystal Reports V3.0

191 The New Standard in Quality Education

Verifying Database

If database is changed while user is connected in Crystal need to run function in order to update Crystal

Page 182: Crystal Reports V3.0

202 The New Standard in Quality Education

SQL Views

Can only be written by a system manager of the SQL server

Similar in design to Crystal SQL designer however far more powerful

Are important for reporting in certain area of Scala as they cut down the number of sub-reports needed and cut down on complexity of report

Page 183: Crystal Reports V3.0

203 The New Standard in Quality Education

SQL Views

Improve Crystal report performance as sorting and linking completed on the server

Need access to SQL enterprise manager in order to build views

Page 184: Crystal Reports V3.0

204 The New Standard in Quality Education

SQL Views

Page 185: Crystal Reports V3.0

205 The New Standard in Quality Education

SQL Views

Tables and Linking

Select Columns sorting and criteria

SQL Query

Result Set

Page 186: Crystal Reports V3.0

206 The New Standard in Quality Education

SQL Views

Page 187: Crystal Reports V3.0

207 The New Standard in Quality Education

SQL Views

SQL Views are particularly useful for– Creating Alias for column names

» E.g. SL01001 = Customer Code– Changing data types for Columns– Working with tables SY24 general code file

and SL23 payment / delivery terms– Working with General ledger transaction

file GL06 which contains a binary field type for transaction type

Page 188: Crystal Reports V3.0

208 The New Standard in Quality Education

Scala SQL view Manager

Include on the application CD– Convert\SQL view manager.exe

Translates column numbers into meaningful names by the way of creating SQL views for each table

Page 189: Crystal Reports V3.0

209 The New Standard in Quality Education

Scala SQL view Manager

Page 190: Crystal Reports V3.0

210 The New Standard in Quality Education

Scala SQL view Manager

Page 191: Crystal Reports V3.0

211 The New Standard in Quality Education

Scala SQL view Manager

Page 192: Crystal Reports V3.0

212 The New Standard in Quality Education

Scala SQL view Manager

Views need to be created for each company

Recreate views when a new financial year is created in Scala

Recreate views when a service release is applied to Scala

Page 193: Crystal Reports V3.0

213 The New Standard in Quality Education

Section Review Crystal Report Functions Crystal Data Dictionaries Crystal SQL Designer SQL Views Scala SQL View Manager

Page 194: Crystal Reports V3.0

The New Standard in Quality Education

Exercise

Exercise 9

Page 195: Crystal Reports V3.0

The New Standard in Quality Education

Report ExpertsReport Experts

Section 11

Optional

Page 196: Crystal Reports V3.0

216 The New Standard in Quality Education

Section Overview

Standard Form Letter Form Cross-Tab Sub-Report Mail Label Drill Down OLAP

Page 197: Crystal Reports V3.0

217 The New Standard in Quality Education

Report Experts

Page 198: Crystal Reports V3.0

218 The New Standard in Quality Education

Report Experts

Drill down report created by hiding sections

Mail Label Report – Self Explanatory OLAP report (On-Line Analytical

Processing). – Uses cubes of data to report on – Cubes Create with SQL server – Advanced Technique

Page 199: Crystal Reports V3.0

219 The New Standard in Quality Education

Form Report

Form report asks for bitmaps for different sections of report. These bitmaps need to be created first outside Crystal

An example of a report using Form expert is in Section 6 of the course binders

Get Similar result inserting pictures into sections

Page 200: Crystal Reports V3.0

220 The New Standard in Quality Education

Form Letter

Used for sending out letters with data from database

Design the report as usual getting the basis or the report together with the Expert

Example in Section 6 of Course Binders Form Letter creates one large text block

per section

Page 201: Crystal Reports V3.0

221 The New Standard in Quality Education

Form Letter

Page 202: Crystal Reports V3.0

222 The New Standard in Quality Education

Form Letter

Page 203: Crystal Reports V3.0

223 The New Standard in Quality Education

Cross Tab

Cross Tab combines the use or rows and columns along with a summarized field

Expert creates the cross tab in report header section

Example of Cross Tab in section 6 of the course binders

Page 204: Crystal Reports V3.0

224 The New Standard in Quality Education

Cross Tab

Page 205: Crystal Reports V3.0

225 The New Standard in Quality Education

Cross Tab

Summarized field format

Page 206: Crystal Reports V3.0

226 The New Standard in Quality Education

Cross Tab

Page 207: Crystal Reports V3.0

227 The New Standard in Quality Education

Sub Report Can be used to combine any two

reports together Example In Section 6 of Course

Binders A Sub report can be entered into an

existing report using the function on the insert menu

Sub Reports can be linked using a common element ( parameter field )

Page 208: Crystal Reports V3.0

228 The New Standard in Quality Education

Sub Report

Page 209: Crystal Reports V3.0

229 The New Standard in Quality Education

Sub Report

Page 210: Crystal Reports V3.0

230 The New Standard in Quality Education

Sub Report

The sub report is inserted into a section on the main report and is run every time that section occurs

The sub Report is an advanced technique but can provide good results.

Data can be passed from the sub report to the main report by the use of variables

Page 211: Crystal Reports V3.0

231 The New Standard in Quality Education

Section Review

Standard Form Letter Form Cross-Tab Sub-Report Mail Label Top N OLAP

Page 212: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercise 10

Page 213: Crystal Reports V3.0

The New Standard in Quality Education

Appendices

Page 214: Crystal Reports V3.0

The New Standard in Quality Education

Appendix AAppendix A

Section 14

Reporting on Accounting Reporting on Accounting StringsStrings

Page 215: Crystal Reports V3.0

235 The New Standard in Quality Education

Accounting Strings

In Scala 5 accounts cost centres etc are not in separate fields they are held in one long field.

Therefore to produce reports you may need to Separate this field into each dimension.

Before you start you need to know the exact length of each dimension

Page 216: Crystal Reports V3.0

236 The New Standard in Quality Education

Accounting Strings

To separate accounting string you will need to use formulas

Page 217: Crystal Reports V3.0

237 The New Standard in Quality Education

Accounting Strings

Page 218: Crystal Reports V3.0

238 The New Standard in Quality Education

Accounting Strings

If account code is longer than 6 just adjust the field values at end of formula

Continue on like this for cost centre, product, project etc.

Page 219: Crystal Reports V3.0

239 The New Standard in Quality Education

Accounting Strings

You may get problems with the previous formula if you are using alpha numeric cost centres, products or projects.

As we have seen before these does not convert to a number

If this is the case then use the next formula

Page 220: Crystal Reports V3.0

240 The New Standard in Quality Education

Accounting Strings

Page 221: Crystal Reports V3.0

241 The New Standard in Quality Education

Accounting Strings

Page 222: Crystal Reports V3.0

242 The New Standard in Quality Education

Accounting Strings

The trim function does exactly what it says it trims a field down to the lengths controlled by the square brackets [].

Page 223: Crystal Reports V3.0

The New Standard in Quality Education

ExerciseExercise

Exercise 11

Page 224: Crystal Reports V3.0

The New Standard in Quality Education

Appendix B

Converting Reports from Btrieve to SQL

Page 225: Crystal Reports V3.0

245 The New Standard in Quality Education

Crystal Reports

Converting report from BTR to SQL Open up the crystal report and select

convert database driver from the database drop down menu

Page 226: Crystal Reports V3.0

246 The New Standard in Quality Education

Crystal Reports

Select the correct data source

Page 227: Crystal Reports V3.0

247 The New Standard in Quality Education

Crystal Reports

Then get error as below– Solution set location of data files in

database drop down menu (remove the .dat at the end)

Page 228: Crystal Reports V3.0

248 The New Standard in Quality Education

Crystal Report

Page 229: Crystal Reports V3.0

249 The New Standard in Quality Education

Crystal Reports

Map the fields across to the SQL database

The SQL database holds all field names as numbers e.g. SC01001 for stock code. Therefore use the scala5eu.mdb database to lookup the correct field codes for field names

Alternatively create views from the SQL database using the SQL view manager and map your fields to theses

Page 230: Crystal Reports V3.0

250 The New Standard in Quality Education

Crystal Reports

Page 231: Crystal Reports V3.0

251 The New Standard in Quality Education

Crystal Reports

Once all data files are mapped across check the visual linking expert for the correct file linking

Then run report. The report will probably give errors due to the different types of field type e.g. Numbers are formatted as numbers in SQL not as strings

Then check report is returning the same information / totals

Page 232: Crystal Reports V3.0

252 The New Standard in Quality Education

Btrieve

Page 233: Crystal Reports V3.0

253 The New Standard in Quality Education

Btrieve Data Tables

Page 234: Crystal Reports V3.0

254 The New Standard in Quality Education

Data File Structure Btrieve

Scala5

DAT

GLPL

GL06ccyy.DATcc = Company Codeyy = Financial Year

Page 235: Crystal Reports V3.0

255 The New Standard in Quality Education

Btrieve DDF Files

Description of files, fields, indexes

Gives location of Data Btrieve Information database Scala5

File.ddfField.ddfIndex.ddf

Page 236: Crystal Reports V3.0

256 The New Standard in Quality Education

Crystal Report Errors

Click

Click

Page 237: Crystal Reports V3.0

257 The New Standard in Quality Education

Crystal Report Errors

SolutionSolution– Set Location of Scala’s data files

Click

Page 238: Crystal Reports V3.0

258 The New Standard in Quality Education

Set Location

Page 239: Crystal Reports V3.0

259 The New Standard in Quality Education

Set Location

Set Location

Select File Location

Page 240: Crystal Reports V3.0

260 The New Standard in Quality Education

Set Location

The setting of location only needs to be done once.

Each subsequent time the report is ran Crystal will find the data.

Page 241: Crystal Reports V3.0

261 The New Standard in Quality Education

DDF Builder Scala 5.1 Btrieve does not come with

the data dictionary files (DDF) these files need to be created using a program called Scala DDF Builder

The Scala DDF Builder can create DDF’s for companies, years and modules

Page 242: Crystal Reports V3.0

262 The New Standard in Quality Education

Crystal Reports

To install DDF Builder

Page 243: Crystal Reports V3.0

263 The New Standard in Quality Education

Crystal Reports

Page 244: Crystal Reports V3.0

264 The New Standard in Quality Education

Crystal Reports

Page 245: Crystal Reports V3.0

265 The New Standard in Quality Education

Crystal Reports

Page 246: Crystal Reports V3.0

266 The New Standard in Quality Education

Crystal Reports

Page 247: Crystal Reports V3.0

267 The New Standard in Quality Education

Crystal Reports

Page 248: Crystal Reports V3.0

268 The New Standard in Quality Education

Crystal Reports

Page 249: Crystal Reports V3.0

269 The New Standard in Quality Education

Crystal Reports

Page 250: Crystal Reports V3.0

270 The New Standard in Quality Education

Crystal Reports

Page 251: Crystal Reports V3.0

271 The New Standard in Quality Education

Crystal Reports

Page 252: Crystal Reports V3.0

272 The New Standard in Quality Education

Crystal Reports

Page 253: Crystal Reports V3.0

273 The New Standard in Quality Education

Crystal Reports

Page 254: Crystal Reports V3.0

274 The New Standard in Quality Education

Crystal Reports

Page 255: Crystal Reports V3.0

275 The New Standard in Quality Education

Crystal Reports

Page 256: Crystal Reports V3.0

276 The New Standard in Quality Education

Crystal Reports

Page 257: Crystal Reports V3.0

277 The New Standard in Quality Education

Crystal Reports

Help for DDF builder– If you install DDF builder to the Default

location help can be found in » C:\program files\DDFstart\ddfbuilder.hlp

At year end you can add the next years DDF files to you current files

This program saves a lot of time over smithware DDF builder although it is not as reliable