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

Related Topics

GROUP BY, Page 553

HAVING, Page 553

How to create an SQL expression

NOTE: You must have some familiarity with the SQL language and SQL expressions before trying to add an expression to your query file.

Click the Fields Tab in the Create Query Expert.

2 Click the Expression button. The SQL Expression Name dialog box will appear.

3 Type a name for your new expression and then click OK.

Queries

483

4 Double-click a field in this list to add it to your expression.

5 Edit the expression in this edit box.

$When you are finished designing your SQL expression, click OK, you are returned to the Fields Tab.

7 Highlight the new SQL expression.

 

8 Click the Add button.

It will be indicated by an @ sign.

 

 

The field will be added to the Query Fields list.

How to create a query from another Crystal Query

Click the NEW button in the Crystal Query Designer. The New Query dialog box appears.

484

Seagate Crystal Reports User’s Guide

2 Click the Start from existing Crystal Query button.

!Use the File Open dialog box to highlight the query (*.QRY) file that you want to use to base a new query on, and click OK. The program runs the existing SQL query and displays the data set.

"Click the EDIT button.

The Create Query Expert appears with the specifications for the selected query already in place.

#Use the Create Query Expert to make any changes necessary to the query. Click Preview Query when finished to display the new query results.

Queries

485

$Choose the SAVE AS command from the File menu to save the new query under a different name. The new query is saved in a separate file; your source query remains unchanged.

How to select a query for a report

In Seagate Crystal Reports, click the NEW button on the standard toolbar. The Report Gallery appears.

Click a Report Expert from the Report Gallery. The Create Report Expert appears.

!On the Tables Tab, click the Query button. The File Open dialog box appears.

"Use the controls in the File Open dialog box to locate and highlight the query (.QRY) file you want to use to create a new report.

#Click OK. The query is opened for your report. Use the tools in the Create Report Expert to design a new report. Your query fields will appear in each section of the Expert just as any other database fields would. However, the name of the query file will appear above the fields in list boxes where you would normally see the name of a database table.

NOTE: You can not use more than one query file in a report.

How to create a parameter field for use in a query

A parameter field can be created while previewing a query in the

Query Designer.

Choose the PARAMETER FIELD command from the Edit menu. The Parameter Field dialog box appears.

486

Seagate Crystal Reports User’s Guide

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