Use Case
Our client is concerned that their customer wait times are suffering when the store is busy. They want to look at how their store busyness levels match up against how long it takes for customers to be greeted.
Report

Code
{|SHOWIF|OUTPUT_MODE=|EVALCONST(KNICKERS_OUTPUT_STANDARD)|}{DATATYPES.CONTROLS_START}
{DATATYPES.DEFAULT_DATE_FILTERS}
{DATATYPES.CONTROLS_END}{/|SHOWIF|}
<div class='results'>
{|VANISHIF|COUNT(DATATYPES.SHOW_DATATYPE)}
<div class='ui-state-highlight no-data'><p>No data was found to display</p></div>
{/|VANISHIF|}
{|SHOWIF|COUNT(DATATYPES.SHOW_DATATYPE)}
{|CROSSTAB|}
<div>
#our 'how busy was the store' question will be the rows
{|LOOP|CROSSTAB.CLIENT_55_SURVEY_1237_QUESTION_241(SORT=ORDER_NUM)}
{|SHOWIF|LOOP.ISFIRST}
<table class='data' id='data'>
<thead>
<tr>
<th class='wait-time-blank-header'></th>
<th class='wait-time-header' colspan="5">Wait Time</th>
</tr>
<tr>
<th>{|SORT_TOGGLE|CLIENT_55_SURVEY_1237_QUESTION_241.NAME}How Busy{/|SORT_TOGGLE|}</th>
#'how long did it take to be greeted' will be the columns
{|LOOP|CLIENT_55_SURVEY_1237_QUESTION_241.CLIENT_55_SURVEY_1237_QUESTION_401(SORT=ORDER_NUM)}
<th class='wait-time-sub-header'>
#this makes the report sortable by count
{|SORT_TOGGLE|POS(COUNT(CLIENT_55_SURVEY_1237_QUESTION_401),|EVALTAG(CLIENT_55_SURVEY_1237_QUESTION_401.INDEX)|)}
{CLIENT_55_SURVEY_1237_QUESTION_401.NAME}
{/|SORT_TOGGLE|}</th>
{/|LOOP|}
</tr>
</thead>
<tbody>
{/|SHOWIF|}
<tr>
<th>{CLIENT_55_SURVEY_1237_QUESTION_241.NAME}</th>
{|LOOP|CLIENT_55_SURVEY_1237_QUESTION_241.CLIENT_55_SURVEY_1237_QUESTION_401}
<td>
#get the percentage of shops out of the entire row
{PERCENTAGE(COUNT(CLIENT_55_SURVEY_1237_QUESTION_401), COUNT(CLIENT_55_SURVEY_1237_QUESTION_401,CLIENT_55_SURVEY_1237_QUESTION_241)).ROUND}%
</td>
{/|LOOP|}
</tr>
{|VANISHIF|LOOP.HASNEXT}
</tbody>
</table>
{/|VANISHIF|}
{/|LOOP|}
</div>
{/|CROSSTAB|}
{/|SHOWIF|}
</div>
CSS
@import "themeroller/jquery.ui.all.css";
@import "chrome.theme.css";
@import "chrome.layout.css";
#data
{
table-layout:auto;
width:auto;
font-family: Rockwell, "Courier Bold", Courier, Georgia, Times, "Times New Roman", serif;
font-size: 1.8em;
margin-top: 1em;
}
#data a
{
color: black;
font-weight: normal;
text-decoration: underline;
}
#data th
{
color: black;
background-color: #8FBACC;
}
#data thead th
{
background-color: #FF7E2E;
}
#data td
{
text-align: right;
color: black;
background-color: #8FBACC;
}
.wait-time-blank-header
{
border-color: white;
border-width: 0 0 0px;
}
#data .wait-time-header
{
text-align: center;
border-color: white;
background-color: #FF7E2E;
border-width: 0 0 0px;
color: black;
}
#data .wait-time-sub-header
{
text-align: center;
background-color: #FF7E2E;
}