reportdef/report/frame/bands/band/smartcells

Description

This optional element defines selectable column headings in the UI. The same properties and attributes assigned to normal cells are assigned to smart cells individually within this element. All cells within the smart cell element must use the name attribute. Each band element of a bands element must define the same number of smart cells.

Diagram

media/image50.jpeg

Example

In a table frame, a single table-body band can produce a nearly unlimited number of rows. The data will fill in as many rows as were returned by the source query. The table-group-header or –footer places a single row above or beneath each set of body data each time the data is broken into its respective group (as defined by the group-item in <groups>.)

<report>
	<frame type="table" name="Tender Media Totals" query-name="Query2" smart-cells-count="2">
		<groups>
			<group name="Total">
				<group-item name="organizationId" data-type="integer" />
				<group-expr name="AllTndrCnt" type="sum" column="tndrCnt" />
				<group-expr name="AllTndrTtl" type="sum" column="tndrTtl" />
				<group-calc name="AllPrctTndrTtl" data-type="percent">1</group-calc>
			</group>
		</groups>
		<bands>
			<band type="table-column-header">
				<cell type="text" print-width="68" alignment="left" data-format="text">Name</cell>
				<smart-cells>
					<cell type="text" print-width="68" alignment="right" data-format="text" name="Tender Count">Tender Count</cell>
					<cell type="text" print-width="68" alignment="right" data-format="text" name="Tender Amount">Tender Amount</cell>
					<cell type="text" print-width="68" alignment="right" data-format="text" name="PercentofTotalAmount">Percent of Total Tender Amount</cell>
				</smart-cells>
			</band>
			<band type="table-group-header" group-name="Total">
				<cell type="text" print-width="68" alignment="left" data-format="text">TOTAL</cell>
				<smart-cells>
					<cell type="column" print-width="68" alignment="right" data-format="integer" name="Tender Count">AllTndrCnt</cell>
					<cell type="column" print-width="68" alignment="right" data-format="currency" name="Tender Amount">AllTndrTtl</cell>
					<cell type="column" print-width="68" alignment="right" data-format="percent" name="PercentofTotalAmount">AllPrctTndrTtl</cell>
				</smart-cells>
			</band>
			<band type="table-body">
				<cell type="column" print-width="68" alignment="left" data-format="text">tndrName</cell>
				<smart-cells>
					<cell type="column" print-width="68" alignment="right" data-format="integer" name="Tender Count">tndrCnt</cell>
					<cell type="column" print-width="68" alignment="right" data-format="currency" name="Tender Amount">tndrTtl</cell>
					<cell type="expr" print-width="68" alignment="right" data-format="percent" name="PercentofTotalAmount">tndrTtl / AllTndrTtl</cell>
				</smart-cells>
			</band>
		</bands>
	</frame>
...