[#13891] - net.sf.jasperreports.style.pen.lineWidth has no effect

Category:
Bug report
Priority:
High
Status:
New
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

Hello There 

I am using jasper reports library 6.17.0 to make nice dfp files wich is lovely)

After lates update I have faced with rectangle border issue - the border became visible (the border was here always but was invisible because overlaping).

<detail>
<band height="20" splitType="Prevent">
<rectangle>
<reportElement style="alternateRow" stretchType="RelativeToBandHeight" x="0" y="0" width="539" height="20"/>
</rectangle>
<textField isBlankWhenNull="true" pattern="d MMM yyyy">
...........
</textField>
.................
</band>
</detail>

pens still overlaped partyally but visible. Note that my 'alternateRow' styling is not a reason, it do not draw any pens, just overlap the rectabgle's  ones. 

I really want to make it invisible. I can do it easely for certain report like:

<rectangle>
<reportElement style="alternateRow" stretchType="RelativeToBandHeight" x="0" y="0" width="539" height="20"/>
<graphicElement >
<pen lineWidth="0.0"/>
</graphicElement>
</rectangle>
but  I need to do it globally since I have a lot of similar templates. As I understood the :

net.sf.jasperreports.style.pen.lineWidth=0.0

property is exactly what i need  (docs: http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasper...) but  can not set it globally.

I have tried to put it into jasperreports.properties file - no luck (note that other jasper props from thatfile applies correctly)

I have tried to set it programmatically in java code like:

var exporter = new JRPdfExporter();
exporter.setExporterInput(SimpleExporterInput.getInstance(printJobs));
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(exportOutput));

SimplePdfExporterConfiguration conf = new SimplePdfExporterConfiguration();
conf.setCompressed(true);
exporter.setConfiguration(conf);
exporter.getExporterContext().setValue(net.sf.jasperreports.engine.style.PropertyStyleProvider.STYLE_PROPERTY_PEN_LINE_WIDTH, "0.0");
exporter.getExporterContext().getJasperReportsContext().setProperty(net.sf.jasperreports.engine.style.PropertyStyleProvider.STYLE_PROPERTY_PEN_LINE_WIDTH, "0.0" );

No affect!

Eventyally I have put it into JRXML file directly:

<property name="net.sf.jasperreports.style.pen.lineWidth" value="0.0"/>

Doesn't help.

I am not quite sure in which version of jasper the bug introduced and how long time it exists.

Dear support, could you please let me know what I am doing wrong?
Thanks

v6.17
jasper library
artyom's picture
3
Joined: Jul 1 2021 - 3:29am
Last seen: 1 week 6 days ago
Feedback