Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Display data from DataSet in every page header and footer.
AcTech
<p>Tried to search this forum to achieve what I thought was quite a simple function.</p>
<p>I have a logo and contact details which come from the data set. How can I put them in the header and footer of the report?</p>
<p> </p>
<p>As far as I understood we cannot put table directly in the master page footer or header.</p>
<p> </p>
<p>Any help will be appreciated.</p>
Find more posts tagged with
Comments
CodeRookie
<p>Are the logo and contact details static values? If so, just save them out to /Resources/Images folder (instead of calling them from the data set) as .jpg / .png / .bmp files, then right click in the header / footer where you want them, select 'Insert Image', then point to where the image(s) are stored. We use this for signatures.</p>
<p> </p>
<p>Hope this helps!</p>
<p> </p>
<p>Scott</p>
AcTech
<p>Thanks Scott,</p>
<p>Unfortunately using static resources is not an option since report is run in multitennant environment. We have to stick with data sets in this case.</p>
Clement Wong
<p>The order of BIRT report generation events (<a data-ipb='nomediaparse' href='
http://www.informit.com/articles/article.aspx?p=1748188&seqNum=3'>http://www.informit.com/articles/article.aspx?p=1748188&seqNum=3</a>)
doesn't make this 'simple'. However, you can dynamically change images or add data in the header (or footer) of the master page. </p>
<p> </p>
<p>Here are various options to meet your requirement:</p>
<p> </p>
<p> </p>
<p>1. Option 1 based on PaulCooper's post @ <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/37245-sum-value-in-table-but-display-in-the-master-page-header/#entry139188'>http://developer.actuate.com/community/forum/index.php?/topic/37245-sum-value-in-table-but-display-in-the-master-page-header/#entry139188</a></p>
;
<p> </p>
<p>The attached sample ("Topic_40462__Show data in masterpage header from dataset SIMPLE using data.rptdesign") we are setting an image URI based on the dataset. The trick is to use the dynamic image and point to the column name so that the image is bound to a dataset. With the dynamic image, it's expecting a blob. So, then, you go in to the URI option, and choose the JavaScript expression builder to select the column for the URI.</p>
<p> </p>
<p> </p>
<p>2. Option 2 is similar to option 1, but you set a report variable based on the value returning from the data set in the onCreate event of your table on the report. Then in the onRender of your image on the master page, you can assign this.URI to that value.</p>
<p> </p>
<p>The attached example's dataset returns a image URI. Look at the onCreate event of the table:</p>
<pre class="_prettyXprint">
vars["myReportVariable"] = this.getRowData().getColumnValue("imgURL");</pre>
<p>In the onRender, you add:</p>
<pre class="_prettyXprint">
this.URI = vars["myReportVariable"];</pre>
<p>3. A more complex example using the DEAPI in the beforeFactory is outlined here:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/38962-need-to-create-dynamic-number-of-images-in-masterpage-header/?p=142785'>http://developer.actuate.com/community/forum/index.php?/topic/38962-need-to-create-dynamic-number-of-images-in-masterpage-header/?p=142785</a></p>
;