The Fields page of the Dataset smart panel is automatically populated for certain data providers based on the information you provide in the Query page. The data providers capable of automatically populating the fields list are OleDb, ODBC, SQL and Oracle. To see the Field Name, Type, and Value columns populated in the Fields page, first enter a valid query, table name, or stored procedure in the Query page.
You can edit the populated fields, move them up or down with the arrow buttons, delete them using the X button, or add new ones by scrolling to the bottom of the list and entering a new field name in the blank cell next to the asterisk (*). The field name must be unique within the dataset.
The Type of the field can be set to DatabaseField or CalculatedField. The Value of a DatabaseField must be the name of a field returned by the query, while the Value of a CalculatedField can be an expression. Any fields you add in this list show in the Report Explorer tree view and can be dragged onto reports like any other field.
When working with DatabaseFields the meaning of the value varies depending on the data source type. In most cases this is simply the name of the field. The table below describes the meaning of the field value and gives one or more examples of how that value can be used.
| Data Provider | Description | Example |
|---|---|---|
| SQL, Oracle, OleDb | The field value should be the name of a field returned by the query. | OrderQuantity FirstName |
| Dataset | The field value can be the name of a field in the DataTable specified by the query. DataRelations in a DataSet can also be used, specify the name of the relation followed by a period and then the name of a field in the related DataTable. | Quantity OrdersToOrderDetails.CustomerID |
| XML | The field value should be an XPath expression that when evaluated with the query will return a value. | ./OrderQuantity ../OrderInfo/OrderDate |
| Object | The field value can be the name of a property on the object contained in the collection returned by the data provider. Properties available on the object returned from a property may also be used. | Quantity Order.Customer.FirstName |