Download presentation
Presentation is loading. Please wait.
Published byMarjory Wade Modified over 9 years ago
2
‘Tirgul’ # 13 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #13
3
‘Tirgul’ #13 Objectives Building and using reports
4
‘Tirgul’ #13 Why reports Essential in many applications –Customer care: Telephone bills Credit card expenses –System admin. Last used web site Data base scheme
5
‘Tirgul’ #13 Type of reports Graphical: –Graph –Cake Textual –Table of data NameAgeGrade Jason2589 ………
6
‘Tirgul’ #13 VB Reports Based on Database data To be accurate – Using a Recordset Database RS Sample report
7
‘Tirgul’ #13 Adding reports (1) Open Project components
8
‘Tirgul’ #13 Adding reports (2) In the Designers tab, Add “Data Report”
9
‘Tirgul’ #13 Adding reports (3) Add a data report to the project
10
‘Tirgul’ #13 Project tree
11
‘Tirgul’ #13 The data report object Header area 1 st report page Page header Each report page Detail Main data area Page footer Each report page Header area last report page (Total…)
12
‘Tirgul’ #13 Sections of the Data Report Designer Report Header - Text that appears at the very beginning of a report, such as the report title, author, or database name. Page Header - Information that goes at the top of every page, such as the report's title. Group Header/Footer - contains a "repeating" section of the data report. Each group header is matched with a group footer. Details - contains the innermost "repeating" part (the records) of the report.
13
‘Tirgul’ #13 Sections of the Data Report Designer 2 Page Footer - contains the information that goes at the bottom of every page, such as the page number. Report Footer - contains the text that appears at the very end of the report, such as summary information, or an address or contact name.
14
‘Tirgul’ #13 Data Report Controls 2 Report Text box Report Line Report Function Report Label Report Image Report Shape
15
‘Tirgul’ #13 Data Report Controls 2 TextBox Control (RptTextBox) - allows you to format text, or assign a DataFormat. Label Control (RptLabel) - allows you to place labels on the report to identify fields or sections. Image Control (RptImage) - enables you to place graphics on your report. Note that this control cannot be bound to a data field.
16
‘Tirgul’ #13 Data Report Controls 3 Line Control (RptLine) - lets you draw rules on the report to further distinguish sections. Shape Control (RptShape) - enables you to place rectangles, triangles, or circles (and ovals) on a report. Function Control (RptFunction) - a special text box that calculates values as the report is generated.
17
‘Tirgul’ #13 Setting data Its all about data source: While –RS is a Recordset containing data Set DataReport.DataSource = RS
18
‘Tirgul’ #13 Setting Recordset fields Done In design time. In the Details section, create a TextBox and set its DataField property to the corresponding field in the table Repeat for each field you want to show
19
‘Tirgul’ #13 Setting report functions Same as setting data Common: –Sum/Min/Max…
20
‘Tirgul’ #13 Setting other data Other usefull data: –Current page –Total number of pages –Date/Time
21
‘Tirgul’ #13 Summary before examples Make sure you have an existing RecordSet. Design the report properly (add logo/shapes) Put ONLY Database fields in the detail section Lets see…
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.