Академический Документы
Профессиональный Документы
Культура Документы
1
7/21/2017
2
7/21/2017
3
7/21/2017
As each customer is selected, the customers orders are displayed and as each order is selected,
details of that order are also displayed
However, what if we wanted to know the name of the product ordered as well i.e. as each order
detail is clicked, we would like to know the name and description of the product ordered. We
cannot drag and drop the Product Table and expect this to happen automatically because the
Product table is actually a parent of the Order_Product table not the other way around
4
7/21/2017
A few adjustments
On the table adapter you need to ensure that the
correct PK has been set. In our case, it will be a
combination of CustomerId and ProductID. A resulting
interface could look like:
and the inner join is done!
5
7/21/2017
1. Create a Report that shows all customer details as well as a history of their
orders and the total income generated from each customer.
2. This task is achieved by using the following method:
a. Establish a data source
b. Fill the datasets with data from the database
c. Add on a Crystal Report class
d. Sort out the configuration issues!!
e. Design the class (preferably via the wizard)the design will involve linking of the
Crystal Report to the Datasets (that have been filled with data); the design canvas
for Crystal Reports have many useful functions it is only through experimentation
that you will be able to obtain competitive advantage to ensure an optimal
effect from your report
f. Instantiate the newly designed Report class as a Crystal report document/object
g. View the document via the Crystal report Viewer class
6
7/21/2017
Your are provided with a previewthe actual report with its original
data has not been developed as yet!
The trick now is to re-design the class so that it looks goodand then
instantiate the report
Drag a Crystal Report Viewer object from the Toolbox onto the form
Create an instance of the Crystal Report class by using the Crystal Report
Document to enable the instantiation
Now link up the Crystal Report instance to the Crystal Report Viewer
And finally set the data source for the Crystal report instance (just to avoid a
database login prompt)
7
7/21/2017
Report Header
It is used to add Report title at the top or any other information you want to place at the beginning of the report.
Page Header
This option is used to present information at the top of each page like document heading, chapter name, etc. Page header
doesnt come in Report Header.
Body
This is used to show the body of the report. All report data comes in this section.
When you need to separate the data into groups in order to make it easily understood, grouping option can be used.
You can also customize grouping for a single value or multiple values by using the customize option inside the grouping tab.
Report Footer
This is used to present information at the end of the report like totals, etc.
Page Footer
This is used to present page numbers or any other information you want at the end of each page.
8
7/21/2017
Grouping
9
7/21/2017
10