Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Birt 4.3.1 - Different output on XLS and XLSX for crosstab(Refers to https://bugs.eclipse.org/bugs/show_bug.cgi?id=447399)
Birt 4.3.1 - Different output on XLS and XLSX for crosstab [message #1621017] Tue, 17 February 2015 16:00 Go to next message
Mihnea Lazar is currently offline Mihnea LazarFriend
Messages: 6
Registered: February 2015
Junior Member
Hello,

I have a report containing two crosstabs. Each crosstab contains a grid with multiple rows and columns.
If I save the report in XLS, the output corresponds to the way the crosstab worked.
However, when saving the report in XLSX, each grid is merged into a single cell in the XLSX file. The task for the report demands it be in XLSX format.
I know the bug was reported on bugs.eclipse.org, with the ID 447399.

Has anyone however found a workaround to this?
Re: Birt 4.3.1 - Different output on XLS and XLSX for crosstab [message #1621388 is a reply to message #1621017] Tue, 17 February 2015 21:44 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

XLSX is a totally different emitter. It's the "spudsoft" emitter. I'm not totally familiar with all of the options available with that plugin, but you might take a look at what's available: https://bitbucket.org/yaytay/spudsoft-birt-excel-emitters/wiki/UserProperties. One thing you could do would be to use the Free BIRT iHub F-Type Server to produce your XLS and XLSX outputs.

Michael

Developer Evangelist, Silanis
Re: Birt 4.3.1 - Different output on XLS and XLSX for crosstab [message #1623581 is a reply to message #1621388] Thu, 19 February 2015 07:18 Go to previous messageGo to next message
Mihnea Lazar is currently offline Mihnea LazarFriend
Messages: 6
Registered: February 2015
Junior Member
Thank you for your answer, Michael!

The Free BIRT iHub F-Type Server might not be an option, as the conversion of the BIRT report has to be included into a web application for the client.

However, could you provide a bit more insight on how to use the Excel emitters?
I tried like this

if(reportContext.getOutputFormat().equalsIgnoreCase("xlsx")){
	 reportContext.getDesignHandle().setProperty("ExcelEmitter.ExtractMode", "true");
}


This code is added in the script of the layout of the page, on the initialize action.
But it didn't work. I also tried with the property and the set value in and out of the double quotes, in all combinations.

The ExcelEmitter.ExtractMode seems to show something that might work.

Online research on scripting did not provide that much information.
Re: Birt 4.3.1 - Different output on XLS and XLSX for crosstab [message #1624209 is a reply to message #1623581] Thu, 19 February 2015 16:37 Go to previous message
Mihnea Lazar is currently offline Mihnea LazarFriend
Messages: 6
Registered: February 2015
Junior Member
Found solution:
At first I had the following crosstab, drawn with blue, with a grid inside it, drawn with gray.
index.php/fa/20918/0/

In the XLSX file, the gray grid would be outputted as a single cell, with all grid elements merged into one text.

As Jim Talbut says here, this is caused by the fact that nested elemented are handled with a "one cell in = one cell out" rule, which overrides everything else.

So, my solution: I added another grid, marked with red, like so:
index.php/fa/20919/0/

So, just another grid with 1 row and 1 column, i.e., 1 cell. The outer red grid is treated with the "one cell in = one cell out" rule, and the inner gray grid is displayed correctly in the XLSX file.

Perhaps this will help someone else in the future. Cheers!
  • Attachment: initial.png
    (Size: 28.97KB, Downloaded 1713 times)
  • Attachment: solution.png
    (Size: 5.76KB, Downloaded 1713 times)

[Updated on: Thu, 19 February 2015 16:37]

Report message to a moderator

Previous Topic:FreeFormHandle trouble
Next Topic:Birt 4.3.1 - Crosstab - Hiding default empty rows
Goto Forum:
  


Current Time: Sat Jul 20 14:07:54 GMT 2024

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

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

Back to the top