Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception "invalid cell range" when using Spudsoft Excel emitter with AutoFilter ON #998

Closed
rneumerkel opened this issue Jun 21, 2022 · 5 comments
Assignees
Labels
BugFix Change to correct issues
Milestone

Comments

@rneumerkel
Copy link

After upgrading from BIRT 4.3 to BIRT 4.9 we experience the following behaviour:

When trying to export a report consisting of a text element and a table element using the Spudsoft Excel emitter with AutoFilter enabled, we sometimes get the following exception from within Apache POI (CellRangeAddress.java):

java.lang.IllegalArgumentException: Invalid cell range, having lastRow < firstRow || lastCol < firstCol

This always happens when the dataset returns no results, leaving just the header row of the table along with the text field preceeding it. In this case, when trying to apply the auto filter, the starting row equals 1 while the last row equals 0, hence the exception from Apache POI.

Note 1: this ONLY happens when there is at least one text-element or label preceeding the empty table.
Note 2: if the table DOES have values, then the report is generated without errors

I have attached a sample report using the built-in datasource ClassicModel to demonstrate this behaviour.

How to reproduce:

  1. Open the attached report in Eclipse BIRT designer 4.9
  2. Run "View Report as XLS_Spudsoft" or "XLSX"

How to fix:

In uk.co.spudsoft.birt.emitters.excel.handlers.TopLevelTableHandler.endTable(..) (and possibly other locations), the code should check if startrow <= endrow and startCol <= endCol before attempting to call new CellRangeAddress(..)

bug_report.zip

@wimjongman
Copy link
Contributor

Thanks for reporting. Can you supply a patch?

https://github.com/eclipse/birt/blob/master/CONTRIBUTING.md

@rneumerkel
Copy link
Author

Yes, that should be possible.

@wimjongman
Copy link
Contributor

Thank you. It is important that you:

  • Create an Eclipse account
  • Set your Github id in the Eclipse account
  • Sign the Eclipse Contributor Agreement
  • Use the e-mail address in your Eclipse account to commit

@speckyspooky
Copy link
Contributor

The issue will be fixed with PR #1431

@speckyspooky
Copy link
Contributor

The fix is included in the latest nightly built of BIRT 4.14

@speckyspooky speckyspooky added the BugFix Change to correct issues label Oct 15, 2023
@speckyspooky speckyspooky self-assigned this Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugFix Change to correct issues
Projects
None yet
Development

No branches or pull requests

3 participants