6.7.1 Creating a Section Using the Data Binding Wizard
Style Studio also allows you to automatic generate and bind section elements in the form of a pseudo-table, which you can then tailor to suit your needs.
Walkthrough
The simplest way to generate a Section is by using the Section Wizard. The Section Wizard lets you select the data binding, define grouping and summarization, and generate a section with appropriate section structure and elements. After the wizard generates the Section, you can adjust the element positions and sizes.
Follow the steps below:
1. Click the 'New' button in the Style Studio toolbar. This opens the 'New Asset' dialog box.
2. In the left panel, select the 'Report' node. In the right 'Types' panel, select 'Blank Tabular Report' and click 'OK'.

3. Click the 'Section' button in the Toolbox panel to open the 'Data Binding' dialog box for a new Section.
You cannot bind a Section to a Crosstab.
4. Under the Data tab, expand the 'Orders' data source, and select the 'Order Model' data model.
5. Under the Columns tab, select the 'Customer' node and click on the right-arrow button to add all the attributes from the 'Customer' entity.
6. Remove the following columns by using the left-arrow button:
'Customer.Contact First Name'
'Customer.Contact Last Name'
'Customer.Region'

7. Click the Grouping & Summary tab.
8. Drag 'Customer.State' from the 'Available Columns' panel to the 'Grouping' panel.
9. Drag 'Customer.Reseller' from the 'Available Columns' panel to the 'Summary' panel.
10. Select the 'Customer.Reseller' field in the 'Summary' panel, and choose 'Count' for the summarization formula.

This will provide a count of the customers in each state. (In this case, it does not matter which field is chosen for the summarization, because the count will be the same for all.)
You will now create a Named Group that groups data from states NJ and NY together into a single group called 'Local'. (See Named Groups for more information about this kind of grouping.)
11. Click the 'Customer.State' field in the 'Grouping' pane, and select the 'Define Named Group' option.
12. Click the 'Edit' button to open the 'Named Group Definition' dialog box.

13. In the 'Named Group Definition' dialog box, click 'New' and enter “Local” as the group name.
14. Specify the following condition:
[Customer.State][is][one of][NJ, NY]

15. In the 'Others' panel at bottom, select 'Leave others in their own group' and click 'OK'.
16. Click 'Finish' to generate the section.

The Section Wizard generates a new Section based on the data binding and grouping definitions, with nested bands corresponding to the grouping levels. All generated Section elements are bound to the appropriate query fields.
The top-level header band contains text elements for the column labels. Header bands in each subsection contain fields for the group header, and footer bands in each subsection contain fields for the summarization columns. Detail fields appear in the detail band.
Finish the example by adjusting the appearance of the Section:
17. Delete the 'Customer.State' field from the Header band and from the Detail band.
18. Right-click on the 'Customer.Company' field in the Header band, and select 'Edit' from the context menu. Change the text to “Company”.
19. Repeat the above step to change the text of the 'Customer.Address', 'Customer.City', 'Customer.Zip', and 'Customer.Reseller' fields to “Address”, “City”, “Zip”, and “Reseller”, respectively.
20. Ctrl-click all the fields in the Header band to select them, and use the Style Studio toolbar to change the font to 11pt Bold.
21. Drag the 'Customer.State' field in the GH1 band slightly to the right (to create additional space on the left side).
22. Right-click in the space to the left of the 'Customer.State', and choose 'Insert' > 'Basic Element' > 'Text' from the context menu. This changes the pointer to a crosshair.

23. Use the crosshair to draw a small Text element to the left of the 'Customer.State' field. Edit the Text element to display the text “State”, and set the font to 11pt Bold.

24. Drag the bottom border of the GF1 band down to create additional space. (It is often easiest to move a band border by dragging in the left margin of the Section, to avoid accidently dragging an element within the Section.)

25. From the Toolbox panel, drag a Text element into the GF1 footer band. Edit the Text element to display the text “Count for ”.
26. Ctrl-click on the 'Customer.State' field in the GH1 header band, and (while holding down Ctrl key) drag the field into the GF1 footer band. This creates a copy of the 'Customer.State' group field in that band.
27. Expand the Style Studio Properties panel.
28. Select the 'Customer.State' field in the GF1 footer band.
29. Select the Format tab of the Properties panel. Select the 'Text' format, and enter the following (without quotes): “{0}:”

30. In the GF1 footer band, select the 'Customer.Reseller' element. Use the Style Studio toolbar to set the font to 11pt Bold.
31. Position the three Text elements in the GF1 footer band as shown below.

32. From the Toolbox panel, drag a Separator element below the three Text elements in the GF1 footer band. Adjust the length as desired.
33. Right-click the Separator element, and select 'Properties' from the context menu. In the 'Properties' dialog box, select a double-line style, and click 'OK'.
34. Resize and reposition other elements (as needed) to improve layout.

35. Right-click in the left margin of the Section, and select 'Properties'. This opens the 'Section Properties' dialog box.
36. In the left panel tree, select 'Group Header' under the 'Group #1' node. In the right panel, select 'Keep Together', and click 'OK'. This will keep records from the same group together on the same page.
37. Preview your changes.

See Also
Creating a Section Using Freehand Operations, to build a Section without the Wizard.
| << 6.7 Binding Data to a Section Element | © 1996-2013 InetSoft Technology Corporation (v11.5) | Named Groups >> |