Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Why the html content of the same rpt from defferent engines are not same.(Only The DIV in first row has id attribute in from birt engine2.6.1.)
Why the html content of the same rpt from defferent engines are not same. [message #722315] Mon, 05 September 2011 11:12 Go to next message
Ricky Missing name is currently offline Ricky Missing nameFriend
Messages: 6
Registered: January 2011
Junior Member
Dear friends,

After we upgraded birt engine from 2.3.1 to 2.6.1. Some javascript functions work not as expectation because the html content generated by the new engine changes.

The report is simple containing two fields which are ShipCountry and SalesAmount. The part of the report defination is:
Get the full defination from the attachment.
<header>
<row id="9">
<cell id="10">
<label id="11">
<property name="fontWeight">bold</property>
<property name="textAlign">left</property>
<text-property name="text">ShipCountry</text-property>
</label>
</cell>
<cell id="12">
<label id="13">
<property name="fontWeight">bold</property>
<property name="marginTop">0pt</property>
<property name="paddingTop">1pt</property>
<property name="textAlign">left</property>
<text-property name="text">SalesAmount</text-property>
</label>
</cell>
</row>
</header>
<detail>
<row id="14">
<cell id="15">
<data id="16">
<expression name="bookmark">'ShipCountry'</expression>
<property name="resultSetColumn">ShipCountry</property>
</data>
</cell>
<cell id="17">
<data id="18">
<structure name="numberFormat">
<property name="category">Currency</property>
<property name="pattern">$###0.00;$(###0.00)</property>
</structure>
<property name="resultSetColumn">SalesAmount</property>
</data>
</cell>
</row>
</detail>
Below is the part of rows from the new engine(2.6.1)
Only the DIV tag in the first row has the id property whose value is "ShipCountry".
<tr valign="top" align="left">
<td><div id="ShipCountry">Argentina</div></td>
<td><div>$8119.10</div></td>
</tr>
<tr valign="top" align="left">
<td><div>Austria</div></td>
<td><div>$139488.03</div></td>
</tr>
...more rows
Below is the part of rows from the old engine(2.3.1)
<tr valign="top" align="left">
<td><div id="ShipCountry">Argentina</div></td>
<td><div>$8119.10</div></td>
</tr>
<tr valign="top" align="left">
<td><div id="ShipCountry">Austria</div></td>
<td><div>$139488.03</div></td>
</tr>
...more rows

I think the output from the new engine is strange. why only the first row has the id attribute? Is this an engine bug? Is there anything wrong with the report itself? If I want to generate the id attribute for each ShipCountry column in each row, is there some guide on that?

Thanks,
Ricky
Re: Why the html content of the same rpt from defferent engines are not same. [message #722709 is a reply to message #722315] Tue, 06 September 2011 14:37 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Ricky

This does appear to be a change to prevent two items with the same id.
Can you put in an expression for the bookmark like:

"ShipCountry"+ row.__rownum

Jason

On 9/5/2011 7:12 AM, Ricky wrote:
> Dear friends,
>
> After we upgraded birt engine from 2.3.1 to 2.6.1. Some javascript functions work not as expectation because the html content generated by the new engine changes.
>
> The report is simple containing two fields which are ShipCountry and SalesAmount. The part of the report defination is:
> Get the full defination from the attachment.
> <header>
> <row id="9">
> <cell id="10">
> <label id="11">
> <property name="fontWeight">bold</property>
> <property name="textAlign">left</property>
> <text-property name="text">ShipCountry</text-property>
> </label>
> </cell>
> <cell id="12">
> <label id="13">
> <property name="fontWeight">bold</property>
> <property name="marginTop">0pt</property>
> <property name="paddingTop">1pt</property>
> <property name="textAlign">left</property>
> <text-property name="text">SalesAmount</text-property>
> </label>
> </cell>
> </row>
> </header>
> <detail>
> <row id="14">
> <cell id="15">
> <data id="16">
> <expression name="bookmark">'ShipCountry'</expression>
> <property name="resultSetColumn">ShipCountry</property>
> </data>
> </cell>
> <cell id="17">
> <data id="18">
> <structure name="numberFormat">
> <property name="category">Currency</property>
> <property name="pattern">$###0.00;$(###0.00)</property>
> </structure>
> <property name="resultSetColumn">SalesAmount</property>
> </data>
> </cell>
> </row>
> </detail>
> Below is the part of rows from the new engine(2.6.1)
> Only the DIV tag in the first row has the id property whose value is "ShipCountry".
> <tr valign="top" align="left">
> <td><div id="ShipCountry">Argentina</div></td>
> <td><div>$8119.10</div></td>
> </tr>
> <tr valign="top" align="left">
> <td><div>Austria</div></td>
> <td><div>$139488.03</div></td>
> </tr>
> ...more rows
> Below is the part of rows from the old engine(2.3.1)
> <tr valign="top" align="left">
> <td><div id="ShipCountry">Argentina</div></td>
> <td><div>$8119.10</div></td>
> </tr>
> <tr valign="top" align="left">
> <td><div id="ShipCountry">Austria</div></td>
> <td><div>$139488.03</div></td>
> </tr>
> ...more rows
>
> I think the output from the new engine is strange. why only the first row has the id attribute? Is this an engine bug? Is there anything wrong with the report itself? If I want to generate the id attribute for each ShipCountry column in each row, is there some guide on that?
>
> Thanks,
> Ricky
Previous Topic:Get report parameter with Report Engine lib
Next Topic:Scrool bar in a table
Goto Forum:
  


Current Time: Sat Dec 20 04:33:26 GMT 2014

Powered by FUDForum. Page generated in 0.15031 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software