Upload
teoperuvina
View
2.871
Download
0
Embed Size (px)
Citation preview
Crystal Reports SeminarAugust 5, 2011
STI College CaloocanDoña Emilia AVR
by: Ms. Ruvina G. Teope
INTRODUCTION
About Crystal Reportso Designed to work with your database
to help you analyze and interpret important information.
o Makes it easy to create simple reports.o It also has the comprehensive tools
you need to produce complex or specialized reports.
About Crystal Reports
CRYSTAL REPORTS BENEFITS
Create any report you can imagine
o Crystal Reports is designed to produce the report you want from virtually any data source.
o Built-in report experts guide you step by step through building reports and completing common reporting tasks.
Crystal Reports Benefits
Create any report you can imagine
o Formulas, cross-tabs, subreports, and conditional formatting help make sense of data and uncover important relationships that might otherwise be hidden.
o Geographic maps and graphs communicate information visually when words and numbers are simply not enough.
Crystal Reports Benefits
Extend reporting to the Webo Reports can be published in a variety
of formats including: Word Excel Email Over the Web
o Advanced Web reporting lets other members of your workgroup view and update shared reports inside their web browser.
Crystal Reports Benefits
Incorporate reports into applications
o Application and web developers can save time and meet their users needs by integrating the report processing power of Crystal Reports into their database applications.
o Support for most popular development languages makes it easy to add reporting to any application.
Crystal Reports Benefits
CREATING A REPORT
1. Prepare the Databaseo Organize your Fileso Set up a Data Source Name (DSN)
a. Open the Run commandb. Type odbcad32
c. Click Add
1. Prepare the Database
d. Select the appropriate driver
e. Click Finish
1. Prepare the Database
f. Type the Data Source Name
g. Click Select
1. Prepare the Database
h. Locate the database
i. Click the database
j. Click OK
1. Prepare the Database
2. Start the Program
Go to Start > All Programs > Crystal Reports Tools > Crystal Reports
3.Select the type of crystal report document
4. Select the Report Expert
o There are eight Report Experts:
o Each Expert guides you through the creation of a report by providing a series of tabs. Many of the experts have tabs unique to a specific type of report.
•Standard•Form Letter•Form•Cross-Tab
•Subreport•Mail Label•Drill Down•OLAP
4. Select the Report Expert
The Standard Report Experto It is the most generic of the experts.o It provides eight tabs, many of which
are common to the other Report Experts.
o It guides you through choosing a data source and linking database tables.
4. Select the Report Expert
The Standard Report Experto It helps you add fields and specify the
grouping, summarization (totals), and sorting criterion you want to use.
o It leads you through chart creation and record selection.
o It has Style Tab that contains pre-defined layouts for you to apply to your report to give it more impact.
4. Select the Report Expert
5. Connect to the Database
a. Click Database
b. Select ODBC
5. Connect to the Database
c. Locate the DSN you created then select the table you want to use
d. Click Add
5. Connect to the Database
6. Select the Report Fields
a. Click the desired table and field
b. Click Add or Add All
c. Select a field
d. Modify the Column Heading
7. Group the Information (optional)
a. Select a Field b. Click Add
c. Select the Sort Order
8. Add Summary Information (optional)
9. Include a Chart (optional)
10. Select a subset of information (optional)
11. Add Style to the Report (optional)
Input report title
PRINTING AREA CHARACTERISTICS
Report HeaderoThis section is generally used for
the report title and other information you want to appear at the beginning of the report.
Page HeaderoThis section is generally used for
information that you want to appear at the top of each page. This can include such things as chapter names, the name of the document, and other similar information. This section can also be used to display field titles above the fields on a report.
DetailsoThis section is used for the body
of the report, and is printed once per record.
oThe bulk of the report data generally appears in this section.
Report FooteroThis section is used for
information you want to appear only once at the end of the report (such as grand totals) and for charts and cross-tabs that include data for the entire report.
Page FooteroThis section usually contains the
page number and any other information you want to appear on the bottom of each page.
o If a group, summary, or subtotal is added to the report, the program creates two additional sections:
Group HeaderoThis section typically holds the
group name field, and can be used to display charts or cross-tabs that include data specific to the group. It is printed once at the beginning of a group.
Group FooteroThis section generally holds the
summary value, if any, and can be used to display charts or cross-tabs. It is printed once at the end of a group.
INCORPORATE CRYSTAL REPORTS TO VISUAL
BASIC 6
Incorporate Crystal Reports to VB6
o Start VB6o Go to Project
> Components
o Select the Crystal Report Control
o Click Apply then OK
o Click and drag crystal report on the form
Sample Codes to Run Crystal Report in VB
CrystalReport1.Destination = crptToWindow CrystalReport1.ReportFileName = App.Path
& "\Reports\Products.rpt" CrystalReport1.SQLQuery = “”
CrystalReport1.DiscardSavedData = True CrystalReport1.WindowState =
crptMaximized CrystalReport1.PrintReport