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

& Click Done when finished.

NOTE: When you add an SQL or ODBC data source from the Tables Tab, the tables and fields from that data source will not necessarily appear to the user who opens the dictionary. The tables that appear on the Tables Tab are only the tables available to the creator of the dictionary, for adding to the dictionary. See

How to select tables and fields for users, Page 498.

NOTE: You can mix data files and ODBC data sources in the same dictionary file. However, if you wish to link data files and ODBC data sources together, you can only use string fields to perform the links.

How to link multiple tables

If you have added more than one database table to your dictionary, click the Links Tab in the Dictionaries Expert.

To create a link manually, drag a field name from one table to the other.

Click the Options button for a

Click Smart Linking to let the

detailed description of a

program create logical links

highlighted link.

between tables in your dictionary.

If a link is possible between two tables, you can create a new link by dragging a field name from one table to the other. The application will draw a new link arrow between the tables. See Linking tables, Page 520.

Dictionaries

497

If you select a link and click the Options button, the Link Options dialog box appears. You can use the controls in this dialog box to make any necessary changes to the highlighted link. Search for Link Options dialog box in online Help.

How to select tables and fields for users

After you add tables to your dictionary using the Tables Tab, those tables, and the fields in them, are not automatically available to your users. You must expose the fields using the View Tab. The View Tab lets you design the actual view of the data that your users will see.

While in the Dictionaries Expert, click the View Tab to activate it.

NOTE: The following screenshot illustrates both a before and after state of the dialog box. Typically, any fields you move to the Sort Fields list box will no longer appear in the Report Fields list

box.

2 Highlight the field you want to

 

3 Click the

4 The field will be

 

make available to users from this list.

 

Add button.

added to this list.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To make a table and all its fields available to users, select the table name from the Tables & fields from database list box, and click Add. The table name becomes a field heading in the Headings & fields in View list box. All fields from the table appear as fields under the new field heading.

498

Seagate Crystal Reports User’s Guide

To make a single field available to users, select the field in the Tables & fields from database list box and click Add. The field is added to the end of the list in the Headings & fields in View list box.

When adding and organizing tables and fields in the View Tab, keep in mind the following points:

Tables are not displayed to the dictionary user as database tables. Table names become field headings. These headings appear just like tables when the user designs a report based on your dictionary. However, field headings do not necessarily represent database tables that actually exist.

Field headings can be added anywhere in the Headings & fields in View list box to provide clearer organization of data for your users. See How to add a new field heading, Page 503.

Fields can be added to the View list box as many times as necessary. A field does not have to appear under a field heading that matches the table the field exists in. Organize fields in any order and under any field headings that will work best for your users.

Fields must be grouped under field headings. If you add a single field to the Headings & fields in View list box and no field heading appears in the list box (the list box is empty), the application will provide a default field heading for you and will add the field you selected underneath that heading.

Field names and field headings that appear in the Headings & fields in View list box can be renamed to anything you want. See How to rename field headings, fields, and formulas, Page 501.

Dictionaries

499

How to add/create formulas

While in the Dictionaries Expert, click the View Tab to activate it.

2 To create a formula, click the New Formula button.

The Insert Formula dialog box appears.

3 Type a name for your formula and click OK when finished.

The Formula Editor appears.

"Use the Formula Editor to create a formula for the Dictionary, just as you would create a formula for a report. See Formulas 101, Page 321, or search for Formula Editor in online Help.

#Click Accept when finished. The new formula is added to the

Tables & fields from database list box.

Next, you will need to add the formula to the view.

NOTE: The following screenshot illustrates both a before and after state of the dialog box. Typically, any fields you move to the Tables

& fields in view list box will no longer appear in the Headings & fields in view list box.

500

Seagate Crystal Reports User’s Guide

6 Highlight the formula you

7 Click the

The field will be

just created from this list.

Add button.

added to this list.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8 Highlight the formula and click the Edit button if you would like to modify your formula.

NOTE: Normally, formulas are represented with an @ symbol. The formula name appears in the Headings & fields in View list box

without the @ symbol to hide the fact that this is a formula.

How to rename field headings, fields, and formulas

While in the Dictionaries Expert, click the View Tab.

2 Highlight the heading or field you want to rename from this list.

3 Click the Alias button.

Dictionaries

501

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