intive-FDV / DynamicJasper

Dynamic Reports using Jasper Reports
http://intive-fdv.github.io/DynamicJasper/
GNU Lesser General Public License v3.0
241 stars 128 forks source link

Lost ColumnProperty :: fieldProperties #86

Closed fireplace009 closed 4 years ago

fireplace009 commented 4 years ago

I'm using DynamicJasper 5.1.2

Class DynamicJasperHelper Method private static void registerOtherFields(DynamicJasperDesign jd, List fields) {...}

only uses the element.getValueClassName() and element.getProperty() However the element also contains "fieldProperties" But these are not transferred into the created JRDesignField

And I was trying to use these properties to force the code in class JRResultSetDataSource::getColumnIndex to use the 'searchColumnByName(field)' method

(this because if not, it will pick the Name before the Label, and then in my case it picks a wrong value (seeing I have two same column names (but different labels)) if (columnIndex == null) { columnIndex = searchColumnByName(fieldName); }

if (columnIndex == null) { columnIndex = searchColumnByLabel(fieldName); }

Am I doing it wrong? Is there another way?

Kind regards, b;

fireplace009 commented 4 years ago

I've added the code to pass the fieldproperties However this did not fix it ... the jasperreport librairy itself throws an exception because of this.

So I'm closing this and have opened one here https://github.com/TIBCOSoftware/jasperreports/issues/115

fireplace009 commented 4 years ago

Correction !!!

This DID fix the issue. (I was just setting the incorrect properties)

This code needs to be added to the master. Pullrequest incoming ...