crystal report quick user guide

34

Upload: pankaj-patil

Post on 02-Apr-2015

210 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Crystal Report Quick User Guide
Page 2: Crystal Report Quick User Guide

Crystal Report Quick User Guide

2

Table of Contents

1.1 Using the Standard Report Expert ....................................................... 3 Skills Builder: Viewing the Report Gallery ............................................... 4 1.2 Previewing the Report.......................................................................... 10 Skills Builder: Previewing a Report.......................................................... 11 1.3 Designing a Report from Scratch........................................................ 12 Skills Builder: Creating a Report from Scratch...................................... 12 1.4 Inserting Fields...................................................................................... 13 Skills Builder: Inserting Fields.................................................................. 13 1.5 Browsing Field Data ............................................................................. 14 Skills Builder: Browsing a Database Field............................................... 14 1.6 Moving and Sizing Report Objects ..................................................... 15 Skills Builder: Modifying Report Objects Using the Design Tab.......... 15 Skills Builder: Modifying Report Objects Using the Preview Tab........ 16 1.7 Placing Text Objects on the Report .................................................... 17 Skills Builder: Adding Text Objects ......................................................... 17 1.8 Saving a Report..................................................................................... 18 Skills Builder: Saving a Report ................................................................. 18 1.9 The Select Expert .................................................................................. 19 Skills Builder: Selecting a Record............................................................. 19 2.0 Removing a Report Selection............................................................... 21 Skills Builder: Removing Criteria............................................................. 21 2.1 Sorting Records..................................................................................... 22 Skills Builder: Sorting Records ................................................................. 22 2.2 Grouping Records................................................................................. 24 Skills Builder: Grouping Records ............................................................. 24 2.3 Deleting and Changing Groups ........................................................... 27 Skills Builder: Deleting a Group ............................................................... 27 2.4 Creating an Unlinked Subreport........................................................ 28 Skills Builder: Creating Unlinked Subreports......................................... 28 Creating an Unlinked Subreport............................................................... 29 Creating an Unlinked Subreport............................................................... 30 Creating an Unlinked Subreport............................................................... 31 2.5 Creating a Linked Subreport ............................................................. 32 Skills Builder: Creating Linked Subreports ............................................ 32 Creating a Linked Subreport .................................................................... 33 Creating a Linked Subreport .................................................................... 34

Page 3: Crystal Report Quick User Guide

Crystal Report Quick User Guide

3

1.1 Using the Standard Report Expert

You use the Report Gallery to create a new report.

The Report Gallery offers you a choice of "experts." An expert walks you

through the process of creating a report from start to finish. By using an

expert, you can create a variety of reports: standard, form letter, form, cross-

tab, subreport, mailing label, drill down, and OLAP. You can also base a

report on an existing report.

Additionally, you can create a blank report if you want to build a report from

scratch. You can create three types of custom reports: normal, cross-tab, and

multi-column. Regardless of the type of custom report you choose, you must

select the source of the data that will be exposed by the custom report. The

three possible data sources are a data file, a SQL/ODBC database, and a data

dictionary.

Page 4: Crystal Report Quick User Guide

Crystal Report Quick User Guide

4

1.1 Using the Standard Report Expert (cont.)

Skills Builder: Viewing the Report Gallery

1. Click the New button. 2. Click to Select Using the Report Expert and select

Standard.

Page 5: Crystal Report Quick User Guide

Crystal Report Quick User Guide

5

1.1 Using the Standard Report Expert (cont.)

3. Click OK. The Standard Report Expert launches.

4. Click Database in the Standard Report Expert window. The Data Explorer dialog box opens.

Page 6: Crystal Report Quick User Guide

Crystal Report Quick User Guide

6

1.1 Using the Standard Report Expert (cont.)

5. Expand Database Files, select Find Database File,

and click Add.

6. Locate xtreme.mdb in the Database directory, and

then click Open. 7. Double Click Customer and Orders to include these tables

in the report. 8. Click Close. 9. Click the Fields tab to select the fields that will be

included in the report. Alternatively, you can click Next to be directed to the Fields tab automatically.

Page 7: Crystal Report Quick User Guide

Crystal Report Quick User Guide

7

1.1 Using the Standard Report Expert (cont.)

10. Double Click Contact First Name, Contact Last Name,

and Contact Position. This adds the database fields to the report. You can double-click a field, select it and click Add, or click and drag it to include it in the report.

Page 8: Crystal Report Quick User Guide

Crystal Report Quick User Guide

8

1.1 Using the Standard Report Expert (cont.)

11. Click to Select Customer Contact Last Name, and then

click the up arrow to move the last name ahead of the first name in the report. Click the down arrow to move it back to its original location.

12. Click the Style tab to select a predefined style for the report.

13. Click to Select Red/Blue Border and click Preview Sample.

Page 9: Crystal Report Quick User Guide

Crystal Report Quick User Guide

9

1.1 Using the Standard Report Expert (cont.)

14. Click to Select All records and click OK.

Page 10: Crystal Report Quick User Guide

Crystal Report Quick User Guide

10

1.2 Previewing the Report

There are many tools you can use to preview a report.

• The vertical scrollbar enables you to scroll up and down on a preview

page. Alternatively, you can use the up-scroll-arrow and the down-

scroll-arrow for the same purpose.

• The horizontal scrollbar enables you to scroll from left to right on a

preview page. Alternatively, you can use the left-scroll-arrow and the

right-scroll-arrow for the same purpose.

• The next page button enables you to move one page forward at a time.

The previous page button enables you to move one page backward at a

time.

• The stop button enables you to stop the transfer of a large volume of

data over the network from the data source to the report computer.

• The close button enables you to close the preview tool and reveal only

the Design tab.

Page 11: Crystal Report Quick User Guide

Crystal Report Quick User Guide

11

1.2 Previewing the Report (cont.)

Skills Builder: Previewing a Report

1. Click the Preview tab or the Print Preview button if you

haven't done so already. 2. Click 75% for the zoom factor. 3. Scroll to the right and left, and up and down, by clicking

and dragging the scrollbar or by clicking on the arrows. 4. Click the Next Page button. 5. Click the Previous Page button.

Page 12: Crystal Report Quick User Guide

Crystal Report Quick User Guide

12

1.3 Designing a Report from Scratch

You can build a design from scratch without using an Expert.

Skills Builder: Creating a Report from Scratch

1. Click the New button. 2. Click to Select As a Blank Report. 3. Click OK. 4. Click Database Files ���� Find Database file����Customer,

and click Add, and click Close. The Field Explorer, a tool that enables you to add fields to the report, appears.

Page 13: Crystal Report Quick User Guide

Crystal Report Quick User Guide

13

1.4 Inserting Fields

Skills Builder: Inserting Fields

1. Click to Select Customer ID, and then click the Insert to

Report button.

2. Move the symbol to the Details section of the report window, and click within the report. The database field is added to the report's design.

3. Double Click Contact First Name, and move the field symbol to the report window, and then click within the report. You can double-click a field to add it to the report's design.

4. Click and Drag Contact Last Name to an appropriate place on the report window. Clicking and dragging is the third way to add a database field to a report's design.

Page 14: Crystal Report Quick User Guide

Crystal Report Quick User Guide

14

1.5 Browsing Field Data

The Browse button enables you to browse the data contained within a field

before you add that field to your report.

Skills Builder: Browsing a Database Field

1. Click the Insert Fields button. 2. Select Contact Title, and click the Browse button.

A unique list of the different items contained in the field is revealed.

3. Click Done. 4. Select Contact Position, and click Browse.

5. Click Done. 6. Close the Field Explorer. 7. Right Click the Contact First Name field representation, and then click Browse Field Data. 8. Click Done.

Page 15: Crystal Report Quick User Guide

Crystal Report Quick User Guide

15

1.6 Moving and Sizing Report Objects

You can change the size and placement of report objects from either the

Design tab or the Preview tab. You can use the Preview mode to see how

your report will look when objects are resized and moved. However, if your

report has a lot of data, modifying report objects in Preview mode will

require significantly more time than modifying them in Design mode.

Skills Builder: Modifying Report Objects Using the Design

Tab

1. Click the Design tab if you aren't already viewing

the Design mode. You are now viewing the representative objects for the report.

2. Click to Select the Contact First Name text object on the report window.

3. Place the mouse pointer on the right-most vertical sizing handle until the pointer becomes a double-headed horizontal arrow.

4. Click and Drag the sizing handle to the left to reduce its length.

5. Click to Select the Contact First Name field representation, and then reduce its size to match the length of the text object.

6. Scroll to the right. 7. Click to Select the Contact Last Name text object, hold

down the Ctrl key, and then click to select the field representation.

Page 16: Crystal Report Quick User Guide

Crystal Report Quick User Guide

16

1.6 Moving and Sizing Report Objects (cont.)

8. Place the mouse pointer over the selected objects so that the pointer is a four-pronged up down-right-left arrow. 9. Click and Drag the selected objects to the left. 10. Click to Select a sizing handle for either one of the selected

objects, and then reduce the size of both objects.

Skills Builder: Modifying Report Objects Using the Preview

Tab

1. Click the Print Preview button. 2. Click to Select the Contact Last Name field. All entries

beneath the Contact Last Name label are tinted gray, indicating that they've been selected.

3. Click and Drag a sizing handle. All entries beneath the Contact Last Name label are resized.

4. Click to Select the Contact Position label, hold down the Ctrl key, and then click to select the first entry. Both the label and all of the subsequent entries are selected.

5. Move the objects. 6. Click the Insert Fields button. 7. Add Last Year’s Sales to the report. 8. Close the Field Explorer. There is no text object

above the sales figures in the report.

Page 17: Crystal Report Quick User Guide

Crystal Report Quick User Guide

17

1.7 Placing Text Objects on the Report

Text objects are used for titles and other information not bound to

underlying data.

Skills Builder: Adding Text Objects

1. Click the Insert Text Object button. 2. Move the field symbol over the sales figures, and

then click the mouse. 3. Type Last Year’s Sales. 4. Click the Design tab. 5. Click Insert Text Object. 6. Move the field symbol to the Report Header section. 7. Type Customer Information. 8. Click off of the object. The text is inserted within

the report. 9. Click the Preview tab to view the change.

Page 18: Crystal Report Quick User Guide

Crystal Report Quick User Guide

18

1.8 Saving a Report

To make a report permanent, you must save it to disk.

Before you save a report, it is stored in the computer's memory only. If the

computer were to encounter a problem, you would have to create the report

again.

Skills Builder: Saving a Report 1. Click the Save button. 2. Locate the directory in which you want to save the

report. 3. Type CustomerInfo1.rpt for the report name and

click Save. 4. View the title bar on the report window. The new

name of the saved report is visible. 5. Save the report you created with the expert as

CustomerInfo2.rpt.

Page 19: Crystal Report Quick User Guide

Crystal Report Quick User Guide

19

1.9 The Select Expert

You don't need to view all the data from the table or tables that underlie your

report. You can select the specific records you want to include in your

report.

Skills Builder: Selecting a Record 1. Open in Design view the customer information

report you built without using the Expert. 2. Click the Select Expert button. 3. Click to Select the Customer.Contact Position field, and

then click OK in the Choose Field dialog box.

4. Click the boxes and select the values you want the

record to match in the Select Expert dialog box.

Page 20: Crystal Report Quick User Guide

Crystal Report Quick User Guide

20

1.9 The Select Expert (cont.)

5. Click OK when you are satisfied with your criteria. 6. Click Refresh Data.

Page 21: Crystal Report Quick User Guide

Crystal Report Quick User Guide

21

2.0 Removing a Report Selection

Skills Builder: Removing Criteria 1. Click the Select Expert button. 2. Click the tab of the criteria you want to remove. 3. Click Del. 4. Click OK, and then click Refresh Data.

Page 22: Crystal Report Quick User Guide

Crystal Report Quick User Guide

22

2.1 Sorting Records

You can sort the data within a report.

Skills Builder: Sorting Records 1. Click the Window menu and click Customer

Information Report without Using an Expert. 2. Click the Select Expert button and delete any

existing criteria with the Del button. 3. Click OK, and then click Refresh Data to restore

all the records. 4. Click the Sort Order button. 5. Select Customer.Contact Position, and then click

Add. 6. Click to Select Ascending to sort the records from low to

high.

7. Click OK. The records are sorted by the field you

specified.

Page 23: Crystal Report Quick User Guide

Crystal Report Quick User Guide

23

2.1 Sorting Records (cont.)

8. Click the Sort Order button to add another field

to the sort. 9. Double Click Customer.Contact Last Name, and click

OK. 10. Click the Sort Order button to delete a field from

the sort. 11. Click to Select Customer.Contact Position, click Remove,

and click OK. 12. Click the Window menu, and click Report3. 13. Save the report as Orders. 14. Click the Sort Order button. 15. Select Orders.Order Amount, click to select

Descending, and click OK.

Page 24: Crystal Report Quick User Guide

Crystal Report Quick User Guide

24

2.2 Grouping Records

One reason you group data is to create subtotals within the report.

When you group data, you have two options. You can specify that a group is

kept together so that records within a group are printed contiguously on the

same page. This assumes that no group is longer than one page. You can

also specify that a group header is repeated on each new page so that if a

group spans more than one page, the header is repeated on each page that the

group occupies.

Skills Builder: Grouping Records 1. Return to Customer Information Report without Using an Expert and save changes. 2. Click the Insert menu, and then click Group. 3. Click Customer.Contact Position in the first box. 4. Click in ascending order in the second box to sort

the records from low to high. 5. Click to Select Repeat Group Header On Each Page, and

click OK.

Page 25: Crystal Report Quick User Guide

Crystal Report Quick User Guide

25

2.2 Grouping Records (cont.)

6. Scroll Through the report to view the headers for each group. 7. Click the Design tab to view the changes to the

design incurred by the grouping. 8. Right Click the Group Header and click Change Group. 9. Click to Select Keep Group Together, and then click OK. 10. Scroll Through the report to view the changes. 11. Click the Toggle Supplementary Toolbar button.

The Insert Group button appears on this toolbar. 12. Click Insert Group.

Page 26: Crystal Report Quick User Guide

Crystal Report Quick User Guide

26

2.2 Grouping Records (cont.)

13. Select City, click to select Repeat Group Header

On Each Page, and click OK. 14. Right Click Group Header #2, and click Delete Group. 15. Click Yes.

Page 27: Crystal Report Quick User Guide

Crystal Report Quick User Guide

27

2.3 Deleting and Changing Groups

Skills Builder: Deleting a Group 1. Click the Design tab. 2. Right Click Group Header or Group Footer. 3. Click Delete Group. 4. Click OK if you receive a Drill Down warning. 5. Click Yes.

Page 28: Crystal Report Quick User Guide

Crystal Report Quick User Guide

28

2.4 Creating an Unlinked Subreport

A subreport is a report within another report. You can use Crystal Reports to

create unlinked subreports.

Skills Builder: Creating Unlinked Subreports 1. Click the New button in Crystal Reports. 2. Click to Select As a Blank Report, and click OK. 3. Double Click Employee, and click Close. 4. Click the Insert menu, and click Subreport. 5. Click to Select Choose a report in the Insert Subreport

dialog box. 6. Click Browse, and locate the Top 3 Employees

report.

Page 29: Crystal Report Quick User Guide

Crystal Report Quick User Guide

29

Creating an Unlinked Subreport

7. Click OK. 8. Move the subreport to the Report Header. 9. Click the Insert menu, and click Subreport 10. Click to Select Choose a report in the Insert Subreport

dialog box. 11. Click Browse, and locate the Bottom 3 Employees

report. 12. Click OK.

Page 30: Crystal Report Quick User Guide

Crystal Report Quick User Guide

30

Creating an Unlinked Subreport

13. Move the subreport to the Report Header beneath

the Top 3 Employees subreport. 14. Click the Print Preview button. The data from the

second report is overlapping the data from the first report.

15. Click the Design tab to fix the display problem. 16. Right Click the Report Header margin, and then click

Insert Section Below. 17. Move the Bottom 3 Employees subreport down to

Report Header b. 18. Click the Preview tab. 19. Click the Insert Fields button. 20. Right Click Formula Fields and click New. 21. Type FullName, and click OK. 22. Enter the following formula by clicking and typing:

{Employee.First Name} & ‘ ‘ & {Employee.Last Name}

23. Click Save and Close. 24. Click and Drag @FullName to the Details section.

Page 31: Crystal Report Quick User Guide

Crystal Report Quick User Guide

31

Creating an Unlinked Subreport

25. Click and Drag Position and Extension from the Field

Explorer to the Details section. 26. Close the Field Explorer, and click the

Preview tab. 27. Save the report as Employee Summary Report.

Page 32: Crystal Report Quick User Guide

Crystal Report Quick User Guide

32

2.5 Creating a Linked Subreport

In a linked subreport, the data within the subreport is linked to the data in the

main report. You can use Crystal Reports to create linked subreports.

Skills Builder: Creating Linked Subreports 1. Click the New button in Crystal Reports. 2. Click to Select As a Blank Report, and click OK. 3. Double Click Employee, and click Close. 4. Click the Insert menu, and click Subreport. 5. Click and Drag Employee ID, First Name, and Last Name

from the Field Explorer to the Details section of the report.

6. Click the Insert menu and click Subreport. 7. Click to Select Create a subreport. 8. Type Orders in the Report Name box. 9. Click Report Expert. 10. Click Database. 11. Double Click Orders, and click Close. 12. Click the Fields tab. 13. Add Order ID, Employee ID, Order Date, and

Order Amount to the Report Fields list. 14. Click OK. 15. Click the Link tab on the Insert Subreport dialog

box. 16. Click to Select Employee ID in the Available Fields box,

and click Add.

Page 33: Crystal Report Quick User Guide

Crystal Report Quick User Guide

33

Creating a Linked Subreport

17. Click OK. 18. Place the subreport within the Details section. 19. Click the Print Preview button. 20. Click the Design tab. 21. Save the report as Employee Information with

Orders. 22. Right Click the Orders subreport, and click Format

Subreport. 23. Click to Clear Keep Object Together on the Common tab

of the Format Editor.

Page 34: Crystal Report Quick User Guide

Crystal Report Quick User Guide

34

Creating a Linked Subreport

24. Click the Border tab. 25. Click None in the Left, Right, Top, and Bottom list boxes. 26. Click OK. 27. Click the Preview tab to view changes. 28. Click the Orders tab. 29. Delete PrintDate from Report Header b. 30. Click Preview. 31. Save the report.