Bind Report Controls to Data (Expression Bindings)
Use the approach below if expression bindings are enabled in the Report Designer (the Property Grid provides the PropertyName Expression option in property markers' context menu).
See Bind Report Controls to Data (Data Bindings) if expression bindings are not enabled in the Report Designer (the Property Grid does not provide the PropertyName Expression option in property markers' context menu).
You can use the following approaches to include a data source's information in your report:
After you bind your report to data, the Field List panel displays the data source's hierarchy and provides access to the available data fields.
Drop a data field from this panel onto a report's surface to create a new report control bound to the corresponding field.
Drop a data field onto an existing control to bind this control to the corresponding field.
You can do one of the following to create a data-bound control of a specific type:
- Hold down the SHIFT key and drop a data field into a report's surface.
- Right-click a corresponding data field and drop it onto a report's surface.
This invokes a context menu that enables you to select which control to create.
You can also drop an entire data table onto a report to create a Table control with its cells bound to the corresponding data table fields.
To select multiple fields in the Field List, hold CTRL or SHIFT and click the fields. Drop these fields onto a report to create a new table.
Click a control's smart tag, expand the Expression drop-down list and select a data field.
You can also click the Expression option's ellipsis button to invoke the Expression Editor. This editor allows you to construct a complex binding expression with two or more data fields and various functions. See Expression Syntax for more information.
Click a property marker to see whether the invoked context menu has the PropertyName Expression item.
Click this item to specify an expression in the invoked Expression Editor.
You can use the same approach to specify expressions for all the control properties. See Shape Report Data for more tutorials.