homehome previousprevious nextnext
 
Detailed Order Summary

OVERVIEW
In this tutorial we will learn how to create a master-detail relationship using the AutoLink feature; how to create a join between two tables within a data-view; and how to create a report containing multi-ple SubReports.

The final product will include the following items:
‧ a company name
‧ an order number for each order
‧ an item number for each item
‧ the quantity of each item
‧ the price of each item
‧ the total amount for each item


BUILDING ONTO THE REPORT LAYOUT

Task 1 Adding More Detailed Data
1 Open the Order Summary Report.
2 Select File | Save As from the main menu of the Report Designer.
3 Name the report Detailed Order Summary and click Save. The name at the top of the Report Designer should be updated.
4 Access the Data tab.
5 Access the Query Wizard.
6 Select the Items table .
7 Click Finish.
8 Drag from OrderNo in the Items dataview to OrderNo in the Orders dataview. This is an example of creating a link to form a master-detail
relationship.
9 Select the Tables icon on the Items data-view.
10 Double-click on the Parts table. Notice that Parts moves from the Available Tables box to the Selected Tables box.
11 Select the Fields tab.
12 Check the All Fields box.
13 Click OK.

Task 2 Change the Group
1 Return to the Design tab.
2 Select the tab titled SubReport1: Orders the bottom of the data workspace.
3 Select Report | Groups.
4 Select Groups and set field to Orders.OrderNo.

5 Click OK.


Task 3 Layout of the Group Header and Footer Bands
1 Delete the Amount Due label in the group header band.
2 Create a DBText component in the group header band and select OrderNo from the drop-down list.
3 Set the DBText component properties:

Autosize True
Left 0.6
Top 0. 2
Font Name Arial
Font Size 11
Font Style Bold and Italic

4 and align the top with the OrderNo DBText component.
5 Create a line component in the group header band
6 Set the line component properties:

Left 0
Top 0. 2
Height 0.2083
Font Color Navy Blue
Line Thickness 2 ?pt.
Line Position Left

7 Drag the group header band up to meet the bottom of the components.
8 Delete everything in the group footer band.
9 Drag the group footer band up to meet the detail band so that none of the white space is showing.

Task 5 Create a SubReport
1 Delete the OrderNo and ItemsTotal DBText components in the detail band.
2 In the detail band create a SubReport and select Items from the drop-down list.
3 Set the properties of the SubReport:

Left 0.5
Top 0
Width 6.3

4 In the detail band create a line component.
5 Set the line component properties:

Left 0
Top 0
Height 0.1667
Line Color Navy Blue
Line Thickness 2 ?pt.
Line Position Left

6 Drag the detail band up to meet the bottom of the SubReport.

Task 6 Layout the Title Band
1 Select the ubReport2: Items' tab at the bottom of the screen.
2 Create a label in the title band.
3 Set the label properties:

Top 0.0417
Font Name Times New Roman
Font Size 11
Font Style Bold and Italic
Font Color Green

4 Create 5 more labels in the title band.
5 Shift-click all the labels and align them to the top of the first label by clicking the align top icon.
6 Deselect the components and individually set the label properties from left to right:

Caption Left Alignment
ItemNo 0.2 Right
PartNo 0.95 Center
Description 1.75 Left
Qty 4.02 Center
Price 4.7 Right
Item Total 5.3 Right

7 Shift-click the following labels:
Description
Price
Item Total

8 Set these labels to Autosize True.
9 Create a line component in the title band.
10 Set the line component properties:

Left 0
Top 0.2396
Width 6.25
Line Color Green
Line Thickness 1 ?pt.

11 Drag the title band up to meet the bottom of the line component.

Task 7 Creating a Calculation
1 Select the Data tab.
2 In the Items dataview click the Calcs icon.
3 Double-click the Cost field. It will move from the Available Fields list to the Calculations list.
4 Under Function choose Expression from the drop-down list.
5 Under Expression type: Qty * ListPrice
6 Click the word Cost and rename the calculation ‘Extended Total’.
7 Click OK.
8 Select the Design tab.

Task 8 Layout the Detail Band
1 Create a DBText component in the detail band.
2 Set the DBText properties:

Top 0.0208
Font Name Arial
Font Size 8
Font Style Bold
Font Color Green

3 Create 5 more DBText components.
4 Shift-click all the components and align them to the top of the first component by clicking the align top icon.
5 Deselect all the DBText components and indi-vidually set the properties from left to right:

Datafield Left Alignment
ItemNo 0.052 Right
PartNo 0.8646 Center
Description 1.77 Left
Qty 3.82 Center
ListPrice 4.32 Right
Extended Total 5.1875 Right

6 Select the Description DBText component.
7 Set the properties:

Autosize True
Width 0.979

8 Select the Extended Total DBText component.
9 Set the properties:

Autosize True
Width 0.8125

10 Right-click the Extended Total DBText compo-nent and select Display Format.
11 Choose the first format with a dollar sign.

Task 9 Creating a Shape
1 Place a shape in the detail band.
2 Set the shape properties:

Left 0
Top 0
Height 0.2396
Width 6.25
layout check

3 Select the shape component and click the Fill Color icon.
4 Choose More Fill Colors.
5 Click Define Custom Colors.
6 Select a custom color by entering Red, Green, and Blue values:

Red 202
Green 255
Blue 202

7 Drag the detail band up to meet the bottom of the shape component.
8 Right-click the shape and select Send To Back.
9 Click the Preview tab.

10 As you preview, notice how the orders for each company start on a new page, and the items for each order are listed.
11 Close the Report Designer, saving the changes. You have created a report showing data from three dataviews; a master and two details

 

 

 

 

Copyright 1999 - 2007. PremiumSoft TM CyberTech Ltd All rights reserved
MySQL TM is a trademark of MySQL AB in the United States and other countries.