0% found this document useful (0 votes)
132 views

Creating/Printing A Simple Report: This Section

This document provides instructions for creating a simple report in Rave. It describes how to create a database connection, build an SQL data view to query the database, and design a report with a region, databand, and data text components bound to the data view. Executing the report previews the sorted customer names from the database. The overall process connects a database, designs a report interface, and displays sample data.

Uploaded by

Selmo Pessoa
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views

Creating/Printing A Simple Report: This Section

This document provides instructions for creating a simple report in Rave. It describes how to create a database connection, build an SQL data view to query the database, and design a report with a region, databand, and data text components bound to the data view. Executing the report previews the sorted customer names from the database. The overall process connects a database, designs a report interface, and displays sample data.

Uploaded by

Selmo Pessoa
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Chapter

15
Creating/Printing a Simple Report

This section:
• Learn how to create a database connection.
• Learn how to create an SQL Data View.
• Create and Excute a simple report.

This chapter will teach the basics of connecting to a database and creating an SQL data view. It will also
show how to create a simple report with the connection and data view. Finally, the report will be
executed.

Procedure 15.1 - Getting Started

To begin any report in Rave, first a report must be created.

1. Begin by selecting the Project menu, then select new project.

Procedure 15.2 - Creating a Database Connection


1. Use the following to complete a database connection.

2. After creating a new project (see directions in the previous section), select New
Data Object from the Project Menu.

3. After selecting a New Data Object, the Data Connections


window will appear. From the Data Connections window
there will be several selections under “Data Object Type”.
Select “Database Connection” and click the Next button

1
4. The next window to appear will be the follow-up Data
Connections window. The selections here will be under the
“Database Connection Type”. As this title implies, the type of
databse connection will be established and selected here. For this
example, select “Advantage” connection type and proceed to
click on the Finish button.

5. The next window will be the Data Connection Parameters


dialog box. From this dialog, the path to the database is
established.

For this demo, make sure


“Database Path” contains the
directory path where the Rave Demo is installed, which should be the
directory where Rave was installed.

The Database Path should be defaulted to the Rave Demo database path. If
it is, then simply press OK and go on to the next procedure section. But, if
the path is not defaulted, continue on to the end of this procedure.

Click on theEllipse button to the right of the Database Path text box.
By clicking on the ellipse button, the Browse for Folder Dialog will
appear. From this dialog, select the path to the database that will be
used. Again for this demo, the path should be directed to the
location of where Rave program was installed. Click OK when
done.

6. The Database Connectin


Parameters dialog will reappear,
with the path to the database
displayed in “Database Path” text
box, after clicking OK from the
previous window. Click OK
when done.

Procedure 15.3 - Creating an SQL Data Veiw

Before creating an SQL Data View, first complete the two previous procedures
before this section (Procedures 15.1 and 15.2).

1. First select New Data Object in the Project Menu.

2
2. Next select “SQL Data View” from the Data Object Type
selections in the Data Connections dialog. Click the Next button
when done.

3. In the next Data Connection Dialog, select “Database1”.


Click Finish when done.

4. The next window to appear will be the Query Builder, which is called the SQL Property Editor. From
this window, SQL statements can be created and entered. For now, we will simply give directions. Drag
the “customer” table from the upper right hand side to the dark grey area on the upper left. (Note that the
details of the Query Bulder will be described in a future section).

3
After dragging the customer table, a list of headers will appear.

Click on the box next to LastName in


the Customer:c2 table. This will make
the LastName column appear in the
table on the bottom of the window.

On the empty box that intersects with the LastName column and the
Sort row, right click on this. Right-clicking will make a menu appear
with the options No Sort, Ascending, and Descending. Select
Ascending from this menu. This will sort by ascending last names.
Check this out when in the Preview Window (coming up!).

Click OK.

4
5. To see the Data Views, go to the Project tree and expand the Data View Dictionary tree. (Also,
remember that the nodes of the trees can be expanded to get more information about the report and other
report sections.) When you select a Data View (green check mark by the name of the Data View), in this
case the Database1, notice that the Property Panel will display information that can be changed about the
Data View object. Also, notice that the SQLDataView1 has additional information, the data headers
from the customer database.

5
Procedure 15.4 - Creating a Simple Report

Procedures 15.1 to 15.3 must be completed before completing Procedure 15.4.

1. Click on the Toolbar Databand Components


palette button and select the
Report Components.

Region Component

2. Select the Region component and click on the page. Resize


and move the region to fit within the red rectangle, which is the
printable area of the page.

3. Also on the Report components toolbar, select


the Databand component (make sure you select
the Databand and not the Band component), and
then click on the Region component that was
created in step 2. This will place a Databand in
the grey region.

6
4. If Databand is not selected, select the Databand component. This can be
done either by clicking on the Databand on the report page, or by clicking on
the Databand within the Project Tree. Either way there should be a green
check mark by the Databand in the Project Tree.

5. Once the Databand is selected, look at the Property Panel. In the


Property Panel, set the Data View property to SQLDataView1.

6. Expand the Project Tree to


show the headers, or more
correctly the field components,
under the SQLDataView1.

7. Now hold down the Ctrl-key and drag field components from the
project tree into the databand. This creates Data Text components that
will be printed within the report. Place these text components in the
white areas of the Databand. Also, notice that in the Project Tree
window, the Data Text components are placed under the Databand
component.

7
Procedure 15.5 - Executing a Simple Report
Complete Procedures 15.1 to 15.4.

1. Press F9 to execute the report and vew the preview.

2. The Report Setup dialog will appear. To preview the


report, select Preview. The Report Status will display a
message that displays the status of the number of
pages being generated.

3. The Report Preview window will display the reports. To print the report, close the preview, repeat this
procedure, except select print instead of Preview. Notice in the Preview the names are sorted by last
name.

You might also like