Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CRW_REF.PDF
Скачиваний:
5
Добавлен:
13.02.2015
Размер:
13.99 Mб
Скачать

How to set up an A to B, A to C link

NOTE: This tutorial demonstrates how to set up an A to B, A to C report using the Cust, Credit, and Orders tables in the ORDRCR.MDB sample database. The ORDRCR.MDB database is located in the \CRW directory, or directory in which the program resides. Use the instructions here as a guideline for creating A to B, A to C reports with your own database files.

Click the NEW button on the standard toolbar. The Report Gallery appears.

Click Custom, and the dialog box is expanded.

!Select the type of custom report you wish to create, and click Data File. The Choose Database File dialog box appears.

"Locate and highlight the ORDRCR.MDB database file and click OK.

The Select Tables dialog box appears.

# Click Select All to include all tables and click OK.

$ The Visual Linking Expert appears.

%Link the {credits.CUST} field to the {orders.CUSTOMER} field and the {cust.NUMBER} field.

NOTE: Linking will not occur if you click the Smart Linking button. For more information on linking, search for Visual Linking

Topics Index in Seagate Crystal Reports online Help.

&Select one of the link lines in the Visual Linking Expert, and click Options. The Link Options dialog box appears.

'Click the Look up all of one, then all of others option button in the When linking to two files from this file section of the Link Options dialog box. This option establishes an A to B, A to C link.

Click OK to return to the Visual Linking Expert. The option you selected affected all links. To make sure, click the link line that you did not select in the last step.

Working With Databases

577

Click Options, and verify the Look up all of one, then all of others setting in the Link Options dialog box.

Click OK in the Link Options dialog box, then click OK again back in the Visual Linking Expert. See LOOK UP ALL OF ONE, THEN ALL OF OTHERS (A TO B, A TO C), Page 534.

You have now established an A to B, A to C relationship among the three tables.

How to edit an SQL query

NOTE: This section is only valid for reports using ODBC data sources. An SQL query is automatically generated by Seagate Crystal Reports when you design a report based on one or more ODBC data sources. This query is sent to ODBC as an instruction to gather data needed by the report.

Choose the SHOW SQL QUERY command from the Database menu. The Show SQL Query dialog box appears.

Click anywhere inside the SQL Query edit box to begin making changes.

! Use the ANSI SQL language to fine tune the SQL query.

578

Seagate Crystal Reports User’s Guide

NOTE: You can not change the SELECT clause of the SQL statement.

"Cut, copy, or paste any part of the query to or from the Clipboard if needed. See The SQL language, Page 551.

How to use an ACT! database

ACT! is a powerful Contact Management application that stores all of your contact information in a database format similar to xBASE databases (dBASE, Clipper, and FoxPro). See ACT!, Page 601.

Click the NEW button on the standard toolbar. The Report Gallery appears.

2 Click the Custom button.

The Report Gallery expands.

3 Click the Custom

4 Click the Data

Report button.

File button.

The Choose Database File dialog box appears.

#Use the controls in the Choose Database File dialog box to locate and highlight the file CRW.ACT. This file is located in the \CRW directory or the directory in which the program

Working With Databases

579

resides. Click OK when finished. The Choose File for ACT! dialog box appears.

$Use the controls in this dialog box to locate and highlight your ACT! database.

%Click OK when finished, and a new Design Tab appears in the application window. Create your report using fields from your ACT! database.

How to open the NT Event Log

If you are using a Windows NT system, the 32-bit version of Seagate Crystal Reports gives you the ability to generate reports based on the NT Event Log. For your convenience, the program comes with a pre-designed report that you can run using your own Event Log as a data source. The report, EVENTDTL.RPT, is located in the \REPORTS\101\NTEVENT\ directory.

NOTE: This report is only available with the Professional version of the program and is not available on floppy disks.

Open the EVENTDTL.RPT report file in Seagate Crystal Reports.

Click the REFRESH button on the standard toolbar. A dialog box will appear asking if you want to refresh data.

If you click No, the original report will appear.

If you click Yes, the Select Current Event Log dialog box appears:

580

Seagate Crystal Reports User’s Guide

!The computer referenced in the Computer(s) box is the computer the sample report is based on. To change the computer, click on the plus (+) sign to the left of Microsoft Windows Network. The directory structure will expand to display the network group that your computer is connected to. The Select Current Event Log dialog box will now look similar to the following:

"You can now click on the plus (+) sign to the left of the network group to display individual machines connected to the group. The Select Current Event Log dialog box will now look similar to the following:

Working With Databases

581

#From this point, you simply need to select the NT machine for which you would like an NT Event Log Report. When you select a machine by clicking on it, that name will appear in the

Computer(s) text box.

NOTE: If you select a non-NT machine, the following error message appears: The RPC server is unavailable You can run this

report only from NT machines.

$Click OK. A new NT Event Log Report will appear. This report will contain information for the machine that you selected via the Select Current Event Log dialog box.

%You can now print the report if you wish or review it in the Preview Tab. When you are ready to save the report, save the report to a new file name. When you want to update the report, simply refresh the report data. When you want to run a report on a different NT event log, open the original report (EVENTDTL.RPT) and repeat Steps 2-7.

582

Seagate Crystal Reports User’s Guide

24 Data Sources

What you will find in this chapter...

Introduction, Page 584

Four types of data, Page 585

Direct access database files, Page 585

ODBC data sources, Page 606

Crystal Query Designer files, Page 623

Crystal Dictionary files, Page 624

Data Sources

583

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]