Column Selector and the Effect of Formatting Changes


We have a simple report with a column selector. All the columns in the report are having some formatting like color, font etc.



When the column is changed by using the column selector, the selected column is getting displayed with existing formatting. The default OBI EE format is used for the selected column. Chagned the dim to Brand for the above report and the output displayed is


The format can be retained even when the column is changed in two ways.
1. In compound layout, select other dim value from the column selector.



Go to the edit view of the table view.



Change the format of the column selector column as per the first column’s format



Accept the changes and go back to Compound Layout.

If the report is executed and the columns are switched between Region and Brand, the format will not change.

The same process needs to be repeated for all the columns that are added to the column selector.

2. Other option is changing the XML

<saw:report xmlns:saw="com.siebel.analytics.web/report/v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlVersion="200705140" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sawx="com.siebel.analytics.web/expression/v1">
<saw:criteria subjectArea="Paint">
<saw:columns>
<saw:column formula="Markets.Region" columnID="c0">
<saw:displayFormat suppress="default" interaction="default" fontColor="#000080" fontSize="12" backgroundColor="#e7e7f7" fontFamily="Lucida Sans Unicode" fontStyle="bold"/>
<saw:columnHeading>
<saw:displayFormat interaction="default"/></saw:columnHeading></saw:column>
<saw:column formula="Periods.&quot;Year&quot;" columnID="c1">
<saw:displayFormat suppress="default" interaction="default" fontSize="9" fontColor="#000080"/>
<saw:columnHeading>
<saw:displayFormat interaction="default"/></saw:columnHeading></saw:column>
<saw:column formula="&quot;Sales Measures&quot;.Dollars" columnID="c2">
<saw:displayFormat suppress="default" interaction="default" fontColor="#000080" fontSize="9"/>
<saw:columnHeading>
<saw:displayFormat interaction="default"/></saw:columnHeading></saw:column></saw:columns></saw:criteria>
<saw:views currentView="0">
<saw:view xsi:type="saw:compoundView" name="compoundView!1" rptViewVers="200510010">
<saw:cvTable>
<saw:cvRow>
<saw:cvCell viewName="titleView!1">
<saw:displayFormat/></saw:cvCell></saw:cvRow>
<saw:cvRow>
<saw:cvCell viewName="columnSelectorView!1"/></saw:cvRow>
<saw:cvRow>
<saw:cvCell viewName="tableView!1">
<saw:displayFormat/></saw:cvCell></saw:cvRow></saw:cvTable></saw:view>
<saw:view xsi:type="saw:titleView" name="titleView!1" rptViewVers="200510010"/>
<saw:view xsi:type="saw:tableView" name="tableView!1" rptViewVers="200510010" showHeading="false"/>
<saw:view xsi:type="saw:columnSelectorView" name="columnSelectorView!1" rptViewVers="200510010" labelPosition="left" goButton="false">

<saw:selector columnID="c0" bPrompt="true">
<saw:choice type="column" formula="Markets.Region">
<saw:displayFormat
suppress="default"
interaction="default"
fontColor="#000080"
fontSize="12" backgroundColor="#e7e7f7"
fontFamily="Lucida Sans Unicode"
fontStyle="bold"/>
<saw:columnHeading>
<saw:displayFormat interaction="default"/></saw:columnHeading></saw:choice>
<saw:label>
<saw:caption>
<saw:text>Select Dim:</saw:text></saw:caption></saw:label>

<saw:choice type="column" formula="Products.Brand"/>

</saw:selector>

</saw:view>
</saw:views>
</saw:report>

The first highlighted XML code is responsible for the formatting for the first column.
Second highlighted code is the one whose formatting needs to be chagned. Make the following changes to the XML.

· For the second highlighted code, remove the ‘/’ which is before ‘>’ so that the line will look like
<saw:choice type="column" formula="Products.Brand">


· After the line, copy and paste the first highlighed code below. Now the code will look like


<saw:choice type="column" formula="Products.Brand">

<saw:displayFormat
suppress="default"
interaction="default"
fontColor="#000080"
fontSize="12"
backgroundColor="#e7e7f7"
fontFamily="Lucida Sans Unicode"
fontStyle="bold"/>
<saw:columnHeading>
<saw:displayFormat interaction="default"/></saw:columnHeading></saw:choice>



Same thing can be repreated for all the columns, which are placed in the column selector.

Comments