"SELECT FROM myTable total_sq_ft AS \"Sq_Ft\", sq_ft_pct AS \"Pct\""
Another approach is to use the TextBlox. TextBlox lets you specify the display texts for the five areas in a rendered report: column headers, data, and, if the report is grouped, group headers, group footers, and group totals (see Display areas in a rendered report for these areas on a report). The <bloxreport:text> tag has nested tags for you to specify the text or add HTML code around the value/member for each of the five areas.
The following example sets the column header for member “Sales” to “Product Sales” and the column header for member “Units” to “Units Sold:”
<%@ taglib uri="bloxreporttld" prefix="bloxreport"
<bloxreport:report id = "MyReport">
...
<bloxreport:text>
<bloxreport:columnHeader
columnName="Sales">
text="Product Sales" />
<bloxreport:columnHeader
columnName="Units"
text="Units Sold" />
</bloxreport:text>
...
</bloxreport:report>
<bloxreport:text>
<bloxreport:columnHeader
columnName="Cost"
text="<a href=\"/myApp/products/CostList.html\">
<img src="info.gif">Unit Cost</a>" />
</bloxreport:text>
See the Saving and Exporting Data with Dynamic Query example in Blox Sampler— Relational Reporting for an live example.
To add HTML code around the member name without renaming it, use the <member/> substitution variable, as shown in the following example:
<bloxreport:text>
<bloxreport:columnHeader
columnName="Cost"
text="<a href=\"/myApp/products/CostList.html\">
<img src="info.gif"><member/></a>"/>
</bloxreport:text>