Actions
Task #3310
openSQL Universal report - XLSX is not (or badly) rendered if multiple columns have the same name
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/22/2023
Due date:
% Done:
0%
Estimated time:
Owner:
Description
Tested on idm-reports 4.0.0
When running a report with a custom SQL code, which results in multiple columns with the same name (this can easily happen when joining multiple tables), then you are not able to download the XLSX at all (with the error below), or it contains mixed data in the common column.
Example SQL to try it:
select code, name, environment as code from idm_role
Mar 22 10:46:52 idmsnt czechidm[1031]: 2023-03-22 10:46:52.798 ERROR 6105921 --- [http-nio-8080-exec-6] eu.bcvsolutions.idm.core.exception.ExceptionControllerAdvice.log : [core:INTERNAL_SERVER_ERROR:438340fb-9079-4369-ba51-073a09ea872b] null ({}) Mar 22 10:46:52 idmsnt czechidm[1031]: eu.bcvsolutions.idm.core.api.exception.ResultCodeException: null Mar 22 10:46:52 idmsnt czechidm[1031]: #011at eu.bcvsolutions.idm.rpt.rest.RptReportController.renderReport(RptReportController.java:314) ... Mar 22 10:46:52 idmsnt czechidm[1031]: Caused by: java.lang.IndexOutOfBoundsException: Index 389 out of bounds for length 389 Mar 22 10:46:52 idmsnt czechidm[1031]: #011at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) Mar 22 10:46:52 idmsnt czechidm[1031]: #011at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) Mar 22 10:46:52 idmsnt czechidm[1031]: #011at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) Mar 22 10:46:52 idmsnt czechidm[1031]: #011at java.base/java.util.Objects.checkIndex(Objects.java:372) Mar 22 10:46:52 idmsnt czechidm[1031]: #011at java.base/java.util.ArrayList.get(ArrayList.java:459) Mar 22 10:46:52 idmsnt czechidm[1031]: #011at eu.bcvsolutions.idm.reports.sqlreport.SqlXlsxRenderer.fillRows(SqlXlsxRenderer.java:73)
Files
No data to display
Actions