Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Facing problem when using formulas in BIRT report for excel report
Migrateduser
<p>I am working on BIRT report,in this i can successfully export excelformula when export to excel with the use of spudsoft emitter that comes default with birt. The problem is when i reference a sheet from an another sheet it throws error. Like in BIRT report i have two table first table name is table1 and second table name is table2(so that this name is used as sheet name)both first table has pagebreak after always, so two sheets will be created. When i export it to excel, the excel report with two sheets 'table1' and 'table2' created successfuly(without a formula that refer another sheet). </p>
<p> </p>
<p>When a column of table1(sheet1) is refered from table2(sheet2) it refers and exported report works successfuly.</p>
<p> </p>
<p>example-1</p>
<p> a column in table2 refer a value of table1 column( B,the code for that table2 dataelement onRender event is</p>
<pre class="_prettyXprint _lang-js">
if((reportContext.getRenderOption().outputFormat == "xlsx" )||(reportContext.getRenderOption().outputFormat == "XLSX"))
{
p = row.__rownum;
this.text="table1!B"+prow;
}
</pre>
<p>it exports and refer the table1 value correctly.</p>
<p> </p>
<p>But when refering a column of table2 from table1, this time it throws error.<span style="color:#ff0000;">Sheet index (-1) is out of range (0..0)</span></p>
<p> </p>
<p>example-2</p>
<p>a column in table1 refer a value of table2 column(C),the code for that table1 dataelement onRender event is</p>
<pre class="_prettyXprint _lang-">
if((reportContext.getRenderOption().outputFormat == "xlsx" )||(reportContext.getRenderOption().outputFormat == "XLSX"))
{
p = row.__rownum;
this.text="table2!C"+prow;
}
</pre>
<p>My assumption is when table1 is generated that time table2 is not available.If this is the correct assumption, then my solution is to changing the order of element while rendering(i dont have idea for the possiblity).</p>
<p> </p>
<p>Here I have attached working and notworking versions rptdesign with exported excel report for both rptdesigns. Please find it.</p>
<p> </p>
<p>The rptdesign in which referring a upcoming sheet, that means in Sheet1 a column refers a column of sheet2.(Not working version)</p>
<p>
Find more posts tagged with
Comments
There are no comments yet