13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>iReport</strong> <strong>Ultimate</strong> <strong>Guide</strong>In this dialog, it is possible to set the values of the dataset parameters. The use of parameters allows you to dynamically filterthe data used to fill the table. Suppose, for instance, that you have a report that prints a set of orders. If we want to use a tableto display the order details, a parameter allows us to specify the order ID to filter the order details in an SQL query. There isnothing new here, actually; we have seen how to configure a dataset run and how to use datasets in charts, crosstabs, and theList component. In general, if we produce content by using a subdataset, we need a dataset run in order to bind the dataset usedby the element (the table element, in this case) and a datasource (regardless of whether it is a database connection or a moresophisticated datasource). Unlike charts and crosstabs, a table always requires a subdataset; it cannot use the main dataset.14.2.5 Working with ColumnsTo add a column to a table, select a section node from the Report Inspector or simply right-click in the table designer view inan area which does not contain elements and select the menu item Add Column to the beginning or Add Column to the end.By default, when <strong>iReport</strong> adds a column, it contains the following cells: detail, table header and footer, column header andfooter. The other cells are undefined; they will be presented like a transparent cell (they may be not visible if the section towhich they belong contains no other cells). The cells have no formatting properties, but it is possible to define their look andfeel using a style (when creating a new column it is good practice to set the proper style to each cell). To do it, select each cellone by one by clicking in the cell area (or by selecting the cell node in the Report Inspector) and use the property sheet to setthe style.When a new column group is added to the table, <strong>iReport</strong> creates a new column group at the end of the table. The group iscreated with two columns and all the group cell headers.A column can be moved by dragging the violet bar above it in the ruler (Figure 14-21).Figure 14-21 Dragging a columnA column can be dragged in any position, inside or outside of a group. If a column group is selected, the dragging operationwill interest the entire group which will act as a single big column.If a column is the only column of a group and the column is dragged out of the parent group, <strong>iReport</strong> displays the message inFigure 14-22.292

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!