Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Page n of m display error in PDF
Muthul
Below HTML Dynamic Text works in BIRT Viewer and viewing in PDF always display Page 1 of 1
Page <value-of>pageNumber</value-of> of <value-of>totalPage</value-of>
Is there are any fix available to display this correctly. Usign Autotext displays additional extra space. Please let me know if you know any other approach as well.
Find more posts tagged with
Comments
Fly_PT
Hi, I'm facing a similar problem.
I added a "Page n of m" to my footer. I put the text and autotext components inside one grid cell, inline style, with align right. Something like this:
<cell id="90">
<property name="textAlign">right</property>
<label id="819">
<property name="display">inline</property>
<text-property name="text">Page</text-property>
</label>
<auto-text id="102">
<property name="style">inline</property>
<property name="type">page-number</property>
</auto-text>
<label id="820">
<property name="display">inline</property>
<text-property name="text">/</text-property>
</label>
<auto-text id="150">
<property name="style">inline</property>
<property name="type">total-page</property>
</auto-text>
</cell>
When I create a PDF with RunAndRenderTask in the output I get Page 1/________1 ,
How can I remove the extra spaces?
Thanks.
EDIT: BIRT version: 3.7.0
mcremer
<blockquote class='ipsBlockquote' data-author="'Muthul'" data-cid="81464" data-time="1313065335" data-date="11 August 2011 - 05:22 AM"><p>
Below HTML Dynamic Text works in BIRT Viewer and viewing in PDF always display Page 1 of 1<br />
<br />
Page <value-of>pageNumber</value-of> of <value-of>totalPage</value-of><br />
<br />
<br />
Is there are any fix available to display this correctly. Usign Autotext displays additional extra space. Please let me know if you know any other approach as well.<br /></p></blockquote>
<br />
The fact is that the size is difrent the web viewer This is becouse the webvier doesnt stick to a page size (eg 297x x210mm). So when you convert from the webviewer to your PDF page numbers wont be correct (there alredy rendert for the webvierer and your just converting it to pdf not re rendering it).
mcremer
<blockquote class='ipsBlockquote' data-author="'Fly_PT'" data-cid="81507" data-time="1313142704" data-date="12 August 2011 - 02:51 AM"><p>
Hi, I'm facing a similar problem.<br />
<br />
I added a "Page n of m" to my footer. I put the text and autotext components inside one grid cell, inline style, with align right. Something like this:<br />
<br />
<cell id="90"><br />
<property name="textAlign">right</property><br />
<label id="819"><br />
<property name="display">inline</property><br />
<text-property name="text">Page</text-property><br />
</label><br />
<auto-text id="102"><br />
<property name="style">inline</property><br />
<property name="type">page-number</property><br />
</auto-text><br />
<label id="820"><br />
<property name="display">inline</property><br />
<text-property name="text">/</text-property><br />
</label><br />
<auto-text id="150"><br />
<property name="style">inline</property><br />
<property name="type">total-page</property><br />
</auto-text><br />
</cell><br />
<br />
When I create a PDF with RunAndRenderTask in the output I get Page 1/________1 ,<br />
<br />
How can I remove the extra spaces?<br />
<br />
Thanks.<br />
<br />
EDIT: BIRT version: 3.7.0<br /></p></blockquote>
Set the column margins. My footer looks somting like this:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<page-footer>
<grid name="LS Footer Grid" id="1111">
<property name="canShrink">false</property>
<property name="width">280mm</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">Column Binding</property>
<expression name="expression" type="javascript">new Date()</expression>
<property name="dataType">date</property>
</structure>
</list-property>
<column id="1112"/>
<column id="1114">
<property name="textAlign">right</property>
</column>
<row id="1115">
<cell id="1116">
<grid name="DatumInfoGrid" id="1117">
<column id="1118">
<property name="width">25mm</property>
</column>
<column id="1119"/>
<row id="1120">
<cell id="1121">
<label name="LS Aanmaakdatum" id="1122">
<property name="style">Standard-Bold</property>
<property name="fontSize">8pt</property>
<property name="fontWeight">bold</property>
<property name="textAlign">left</property>
<text-property name="text">Aanmaakdatum :</text-property>
</label>
</cell>
<cell id="1123">
<data name="LS datum" id="1124">
<property name="style">Date_dd-MM-yyyy</property>
<property name="resultSetColumn">Column Binding</property>
</data>
</cell>
</row>
<row id="1125">
<cell id="1126">
<label name="LS Run Time" id="1127">
<property name="style">Standard-Bold</property>
<property name="fontSize">8pt</property>
<property name="fontWeight">bold</property>
<property name="textAlign">left</property>
<text-property name="text">Aanmaaktijd :</text-property>
</label>
</cell>
<cell id="1128">
<text name="LS Run Time 2" id="1129">
<property name="style">Date_HH-MM-ss</property>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of format="Short Time">new Date()</value-of>]]></text-property>
</text>
</cell>
</row>
</grid>
</cell>
<cell id="1131">
<property name="textAlign">right</property>
<grid name="PageinfoAndBatchRun" id="1198">
<property name="fontWeight">bold</property>
<column id="1199"/>
<column id="1200">
<property name="width">16mm</property>
</column>
<column id="1201">
<property name="width">10mm</property>
<property name="textAlign">right</property>
</column>
<column id="1202">
<property name="width">6mm</property>
</column>
<column id="1203">
<property name="width">10mm</property>
</column>
<row id="1204">
<property name="height">3mm</property>
<cell id="1205"/>
<cell id="1206">
<text name="LS Pagina" id="1207">
<property name="textAlign">left</property>
<property name="contentType">plain</property>
<text-property name="content"><![CDATA[Pagina :]]></text-property>
</text>
</cell>
<cell id="1208">
<auto-text name="LS Pagina NR" id="1209">
<property name="fontWeight">normal</property>
<property name="textAlign">right</property>
<property name="type">page-number</property>
</auto-text>
</cell>
<cell id="1210">
<text name="LS van" id="1211">
<property name="textAlign">left</property>
<property name="contentType">plain</property>
<text-property name="content"><![CDATA[van]]></text-property>
</text>
</cell>
<cell id="1212">
<auto-text name="LS Pagina tot" id="1213">
<property name="fontWeight">normal</property>
<property name="textAlign">right</property>
<property name="type">total-page</property>
</auto-text>
</cell>
</row>
<row id="1214">
<property name="height">3mm</property>
<cell id="1215"/>
<cell id="1216">
<property name="colSpan">1</property>
<property name="rowSpan">1</property>
<property name="fontWeight">bold</property>
<label name="LS Bachrun" id="1217">
<property name="fontWeight">bold</property>
<property name="textAlign">left</property>
<text-property name="text">Batchrun :</text-property>
</label>
</cell>
<cell id="1218">
<property name="colSpan">3</property>
<property name="rowSpan">1</property>
<property name="style">Standard-number</property>
<text-data name="LS Bachrun ID" id="1219">
<property name="fontWeight">normal</property>
<property name="textAlign">right</property>
<expression name="valueExpr">vars["batchrun_ID"]</expression>
<property name="contentType">html</property>
</text-data>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</page-footer>
</pre>
Fly_PT
Thanks a lot mcremer, the width in the column was a perfect fix
sthilak
<blockquote class='ipsBlockquote' data-author="'Fly_PT'" data-cid="81523" data-time="1313178256" data-date="12 August 2011 - 12:44 PM"><p>
Thanks a lot mcremer, the width in the column was a perfect fix
<br /></p></blockquote>
<br />
Hi,<br />
<br />
Even after fixing the column width , I am still getting the spaces in front of the total pages. I also set the below properties. Is there a way to trim the spaces for the total-page property type.<br />
<column id="894"><br />
<property name="width">15mm</property><br />
<property name="textAlign">left</property><br />
<property name="canShrink">true</property><br />
<expression name="value" type="javascript">BirtStr.trim("")</expression><br />
</column>