This section describes how to build a Flash template.
It includes the following topics:
Adding the Data Source
Creating the Layout
Data Binding
Follow these steps to build a flash template and add the data source.
To add the data source:
The Flex IDE creates a default canvas for you to drop objects onto. You can modify the canvas as required to suit the report.
Important
If you intend to embed the Flash output in a PDF document, then you must set the Width and Height of the template in the Size region of the Layout properties. Even if you want to accept the default size, you must explicitly enter values in these fields.
Create the layout by adding report objects to the layout palette. This example uses the Flex Design tab to add the objects to the layout. Click the Design tab to see the available objects in the Component Navigator pane.
The following figure shows an example of the available objects in the Component Navigator pane.
These objects can be dragged and dropped to the design palette.
To create the layout:
Once the layout is complete, you can bind the layout objects to the data source. Here, you can bind the DataGrid and bind the chart.
Flex offers some help through the property palette of the objects to define the binding, but not enough to complete the task. Therefore you must update the MXML directly using the Source editor.
Follow these steps to bind the DataGrid, which is highlighted for you to locate the code easily.
To bind the DataGrid: