Steps for creating a Tab report in Report Studio:
- Create a new report using Go Sales (Query) Package.
- Insert a table with 3 Columns and 2 Rows.
- Merge the cells in the second row.
- Create 3 text items (List, Crosstab and Chart) in the first row.
- Insert a Value Prompt before the table and change the name to Prompt.
- Create three static choice values for the value prompt.
- Change the following properties of value prompt.
· Required – No
· Hide Adornments – Yes
· Auto Submit – Yes
- Place a HTML Item next to the value Prompt and copy the following code.
<script language="javascript">
function func(a)
{
var f = getFormWarpRequest();
var prompt = f._oLstChoicesPrompt;
if(a==1)
{
prompt.options.selectedIndex = 2;
}
else if(a==2)
{
prompt.options.selectedIndex = 3;
}
else if(a==3)
{
prompt.options.selectedIndex = 4;
}
promptAction('finish');
}
</script>
- Place HTML Items before and after the text Items.
· Before the Text Items
ü List
<div id="hi" onclick="func(1)">
ü Crosstab
<div id="hi" onclick="func(2)">
ü Chart
<div id="hi" onclick="func(3)">
· After the Text Items
</div>
- Create a String variable with the following expression.
case (ParamDisplayValue('Parameter1'))
when 'List' then 'List'
when 'Crosstab' then 'Crosstab'
when 'Chart' then 'Chart'
end
- Create three values for the string variable (List, Crosstab and Chart).
- Goto Page 1 and insert a conditional block in the second row.
- Select the conditional block and change the block variable to String 1.
- Select the current block as List and insert a List in the conditional Block.
- Insert dataitems in the list.
- Select the current block as Crosstab and insert a Crosstab in the conditional Block.
- Insert dataitems in the Crosstab.
- Select the current block as Chart and insert a Chart in the conditional Block.
- Insert dataitems in the Chart.
- Change the background of the first row.
- In the condition explorer, select List and change the background color of List text item’s table cell.
- Similarly make the changes for other table cells.
- Select the value prompt and change the following properties.
· Default Selections – List
· Visible – No
Report Page |