thibaultleouay/native-excel-emitter-birt-plugin

Missing borders in xls output on merged cells

Opened this issue · 2 comments

At first we're really grateful for that you provided us this useful tool. 
Unfortunately we have a problem with excel output design when we use merged 
cells in our reports. 

Here is how to recall the problem:

1. Put grid of 2 columns and 3 rows on your report.
2. Select all cells in the grid and set "All borders" property to them.
3. Merge two cells in lower right corner (second row, second column cell is now 
merged with third row, second column cell)

Now, when you try to get xls output, the border is missing on the lower right 
corner of the table in the output. Last cell (third row, second column) doesn't 
have it's right and it's bottom border.

We are using Birt 2.6.2 version combined with latest version of the emitter. 
Stuff is deployed on JBOSS 5.1 server running on W7 32bit.

Thank you for your help, we really appreciate it.

Original issue reported on code.google.com by Johny.Ku...@gmail.com on 7 Nov 2011 at 3:37

We have solved the problem of missing borders after some debugging and applying 
few changes to emmiter. The core of the problem lays in mechanism, that emmiter 
uses to add rows and cells to output spreadsheet.

Here is a routine implemented in emmiter:

1) Firstly emitter creates new row object (currentRow variable) using createRow 
method of POIWriterXLS class.
2) After the row object is created, createCell method is being called for every 
cell that has to be added as part of currentRow.
3) If all cells of the currentRow had been added, createRow method is called 
again (first step) and routine repeats until all rows are placed on the output 
sheet.

What causes the problem is calling of createRow method. This can solved by 
altering the routine like this:

1) call to createRow method as many times as many rows you want to place to 
output spreadsheet. In other words, first you have to create all rows you 
specified in the report.
2) after all Row objects are created start adding cells to individual rows.
3) repeat until all cells are created

By altering the emitter's routine you can achieve that all borders are on their 
place and nothing is missing. Pay attention to correctly updating currentRowNo 
and currentRow variables of POIWriter!

Applying the necessary changes wouldn't take much time now, when you know what 
to do.

At the end we want to say thanks one more time for providing us this tool.

Original comment by Johny.Ku...@gmail.com on 15 Nov 2011 at 2:38

Hi Johny,

Thanks for your info on Native emmitter as i am alsousing this emmitter.

I am facing problem in generating excel file report from Birt report engine api.


Actually all other reports are working fine for a single report i am getting a 
pop message "Maximum number of fonts exceeded" .

Please provide me root cause for this pop up message.
can you give me any tips so that i can check this issue.

Birt Version which i am using is:3.7


Thanks & Regards
kishore

Original comment by g.kishor...@gmail.com on 23 Nov 2011 at 7:26