OBIEE - How to create an HTML view (Narrative, Static Text) to get a good Excel formatting ?

Saw Object

About

When you download an answer to Excel, you have all the chances to get a bad alignment of the cells when you use a view with HTML tag (such as a narrative view of a static text).

OBIEE uses MHTML as the formatting code when downloading files to Excel then one cell in Excel correspond to a TD HTML tag in a TABLE.

Permission

See OBIPS - Allow HTML markup

Reasoning Steps

HTML pattern for a view

When you examine the source code of an answer, you will find this HTML pattern for a view in an answer.

<td class="CVView" valign="top" style="vertical-align:top;" vid="o:go~r:report~v:compoundView!1~v:pivotTableView!4" sid="saaaiom6me4r1e6ctuaa78sio6">
	<table class="CVFormatTable" border="0" style="width:100%;" cellspacing="0">
		<tr>
			<td class="CVFormatCell" align="left" valign="top" style="vertical-align:top;">
				<a href="javascript:void(null)" onclick="IgnoreEvent();" title="PivotTable" name="SectionElements"></a>
				<div id="idPivotTableParent">
				----- Here my Pivot
				</div>
			</td>
		</tr>
	</table>
</td>
<td class="CVView" valign="top" style="vertical-align:top;" vid="o:go~r:report~v:compoundView!1~v:narrativeView!4" sid="saaaiom6me4r1e6ctuaa78sio6">
	<table class="CVFormatTable" border="0" style="width:100%;" cellspacing="0">
		<tr>
			<td class="CVFormatCell" align="left" valign="top" style="vertical-align:top;">
				<a href="javascript:void(null)" onclick="IgnoreEvent();" title="Narrative" name="SectionElements"></a>
				<div style="">
				----- Here my narrative view	
				</div>
			</td>
		</tr>
	</table>
</td>

HTML Content of a simple pivot table

If you examine the HTML code from the section (—– Here my Pivot), you will get something like this:

<div id="idPivotTableParent">
	<table class="PTSectsTable" border="0" cellspacing="3px">
		<tr class="PTSectRow">
			<td class="PTSectCell" align="center">
				<table class="PivotTable" id="saw_49253_9" border="0" cellspacing="0">
					<tr class="PTRowLabelsRow">
						<td class="PTRH OOLD" style="border-right-style:none;border-top-style:none;">Attribute Name</td>
						<td class="PTCOL1 PTCIL" style="width:10px;">Measure</td>
					</tr>
					<tr>
						<td class="PTROW1 PTRIL OOLD">Member 1</td>
						<td class="PTC OORD">75</td>
					</tr>
					<tr>
						<td class="PTROW1 PTRIL OOLD">Member 2</td>
						<td class="PTC OORD">72</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</div>

OBIEE makes use of two tables to render the pivot view. See the

tag.

HTML Content template for a narrative

As OBIEE uses two nested tabels to render the pivot view and that we want that the cell of our narrative must be aligned with the cell of the pivot view, the narrative has to use also two nested tables.

With this remarks, we can deduce that a HTML Content template for a narrative with a good alignment with a (pivot) table is:

<table class="PTSectsTable" border="0" cellspacing="3px">
    <tr class="PTSectRow">
	<td class="PTSectCell" align="center">
	-- My Narrative HTML tag here
	</td>
    </tr>
</table>
  • With a colspan property, you can expand your text on several cells. will span the content on two cells
    • The height and width HTML properties control also the height and width of an Excel cell

Obiee Narrative Template For Excel

Documentation / Reference





Discover More
Obiee Css Width None
OBIEE - Cosmetic Formatting (Style, Css)

Cosmetic formatting is independent of a condition whereas a Conditional Formatting is dependent of a condition. To suppress the inheritance of the default 100% width property of the dashboard...



Share this page:
Follow us:
Task Runner