Community
Participate
Working Groups
Build Identifier: 20100917-0705 I'm using BIRT 2.6. Consider a BIRT report with a table that has many columns with considerable width (generally exceeding the default width of the selected page type - letter, US Legal etc.). When such a report is exported to excel the print setting or page-setup in excel is not maintained properly. The columns of the table break and appear on different pages (e.g if the table has 10 columns, then 6 columns may appear on one page and the rest 4 will appear on some other page). This issue can be corrected by setting the "Fit to Page" and "Fit to Height" properties of the exported excel report in BIRT. I looked at the BIRT source code and i think that these properties can be set by adding a few lines to the ExcelXmlWriter.java file of the org.eclipse.birt.report.engine.emitter.excel package. I tried modifying the plugin source and building a jar file, but wasn't able to make the jar file work with the BIRT Report Designer. I'm attaching the modified ExcelXmlWriter.java file (changes are on line numbers 836-838 and 841-842 in the declareWorkSheetOptions method). Reproducible: Sometimes Steps to Reproduce: 1. Create a BIRT report with A4 letter layout and landscape orientation. 2. Add a table to the report with many columns (more than 6-7 should do) and put some dummy data. 3. Export the report to excel and go and see the print preview. All columns do not appear on the same page since the page-setup is not done properly by BIRT while exporting the report.
Created attachment 190093 [details] This file belongs to the org.eclipse.birt.report.engine.emitter.excel package and is in the org.eclipse.birt.report.engine.emitter.prototype.excel_2.6.2.r262_v20110215.jar file. I've made some changes to this file to set the "Fit to Page" and "Fit Height" options of the exported excel file of the BIRT report so that the print-setting/page-setup is set properly for excel. Please note that by setting the "Fit to Page" option, the scaling of the excel file doesn't need to be set as it will be determined automatically by excel. Changes are on line numbers 836-838 and 841-842 in the declareWorkSheetOptions method.
This bug was reproducible in the 2.6.1 release, but can not be reproduced in the latest 2.6.2 release. Set as fixed.