eclipse-birt / birt

Eclipse BIRT™ The open source reporting and data visualization project.
http://www.eclipse.org/birt
Eclipse Public License 2.0
413 stars 382 forks source link

Excel & Indent: implementation of the "indent"-option for excel output #1666

Closed speckyspooky closed 1 week ago

speckyspooky commented 1 week ago

The current implementation of the excel-emitter doesn't support the usage of the excel formatting option of text-indent. In the most cases addition blank columns were added to get the effect of an indent which increase the report structure and isn't really the best way to handle (simulate) the excel-indent.

The Apache POI library support the method "setIndention()" to set the indent for an excel-cell.

The target of the enhancement will be to add the indent-method and the spacing should be calculated based on the margin- & padding-spacing of the content element and also the cell-padding should be used to calculate the indent in full.

This would be a bigger change of the behavior for the excel output. Therefore I will implements an UserProperty to deactivate the indent setting with the name "ExcelEmitter.DisplayTextIndent" (default: true).

I will create a PR for this enhancement.

speckyspooky commented 1 week ago

The PR #1667 containse the according changes to get the new option of the text-indent for excel. The change includes also the documenten user property "ExcelEmitter.DisplayTextIndent" to disable the indent handling and restore the default behavior.

I created a special reference report to test the label-, text-, dynamic text- and data elements. Attached the following details will be shown:

  1. Screen of the report which will produce 3 pages for the 3 master test cases
  2. Screen of the 3 generated cases
  3. Attachments 3.1 The original report 3.2 The excel-output file with text-indent 3.3 The pdf-output file for comparison

1. Screen of the report

excel-indent

2. Screens of the excel-result

2.1 Labels Test-Case-Labels

2.2 Text & Dynamic Text Test-Case-Text-Elements

2.3 Data Elements Test-Case-Data-Elements

3. Attachments

3.1 The original report excel_indent.zip

3.2 The excel-output file with text-indent demo-excel-indent.xlsx

3.3 The pdf-output file for comparison demo-pdf.pdf

speckyspooky commented 1 week ago

The change is merged to the master-branch.