Category: | Bug report |
Priority: | Urgent |
Status: | Feedback Requested |
Project: | Severity: | Minor |
Resolution: | Open |
|
Component: | Reproducibility: | N/A |
Assigned to: |
Hi,
I created a jasper report in JasperSoft Stutio v6.12.2, with an editable text field and a normal text field placed in the header, but the editable text field was only displayed on the first page, it was missing on the other page.
It Seems it was a UUID duplicated issue. Did anyone have any idea to fix it?
Attacted jrxml.
Thank you.
XML source:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.12.2.final using JasperReports Library version 6.12.0 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Testing" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ca2bda50-a4b3-41ce-8088-981b760da0ac">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<queryString>
<![CDATA[]]>
</queryString>
<pageHeader>
<band height="100">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField>
<reportElement mode="Opaque" x="0" y="0" width="555" height="45" uuid="43daecbd-5fc7-4d4d-8027-55aaf532ce50">
<property name="net.sf.jasperreports.export.pdf.field.type" value="Text"/>
<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
<propertyExpression name="net.sf.jasperreports.export.pdf.field.value"><![CDATA["Editable Text Field"]]></propertyExpression>
</reportElement>
<textElement textAlignment="Center">
<font fontName="DejaVu Sans Mono" size="24"/>
</textElement>
<textFieldExpression><![CDATA["Editable Text Field"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="50" width="555" height="45" uuid="d95a6222-f41f-4cb7-b9d1-17acfc231616">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<textElement textAlignment="Center">
<font fontName="DejaVu Sans Mono" size="24"/>
</textElement>
<textFieldExpression><![CDATA["Normal Text Field"]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<detail>
<band height="350">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<frame>
<reportElement x="0" y="11" width="555" height="54" uuid="62bdd922-8e5e-4bfc-854e-3b938f861953">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<pen lineWidth="1.25"/>
</box>
<textField>
<reportElement x="0" y="0" width="555" height="54" uuid="868127f4-2195-4b43-9f72-dac4d0807878"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="36"/>
</textElement>
<textFieldExpression><![CDATA["Detail ... "]]></textFieldExpression>
</textField>
</frame>
</band>
..... Other detail .....
</detail>
</jasperReport>
6 Comments:
Hi I just tried to run your sample report with the latest 6.17.0.
It appears to be fine with both the textbox shown in all pages.
Can you give it a try with a more recent version?
Best regards,
Massimo.
P.S: about the UUID duplication, did you get some exception/error?
Hi Massimo,
Thank you for your reply, but I confused that your report seems different from mine, the editable text field cannot edit in your report.
I tried v6.17.0, but the editable text field still cannot show, I run the report in jasper studio then export it as pdf and open it with Adobe Reader, attached the report generated just now and the screen capture of my report. As the screen show, the editable text field only displays on the first page.
Hi,
sorry about the delay but the bug slipped under my radar.
Since you mentioned Acrobat Reader I tried with that as well. I usually use Preview (Mac internal app). Besides those two ones I also gave it a try with the Edge browser to see all the different behaviours.
I registered the following screencast: https://www.screencast.com/t/lNGnpn8CYxxJ
Definitely there is some kind of problem somewhere. The three software are behaving differently. I would say that the best one is Preview, while the worst is Acrobat not showing the editable text in the page 2 and 3.
I'm not sure which is the real reason for that. It could be something caused by the underlying iText Library or something that we can fix at JRL level.
I will try to re-assign to JasperReports Library project and see. Definitely I would exclude it is something related to Jaspersoft Studio.
Best regards,
Massimo.
Hi,
You need to use the following custom property for your text field, with a dynamic value for each occurrence:
http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasper...
If not specified, the ID of the editable field is the same as the UUID of the element, but will be the same for all occurrences of the text field in the document, hence the problem.
Use a property expression and include the $V{PAGE_NUMBER} variable in the formula to make sure the name will be different on each page.
I hope this helps.
Teodor
Hi,
The duplicate UUID problem is fixed, thank you for your help. But is there any way to fix some charater cannot type in some viewer problem? such as chrome broswer.
Typing problem screen:
https://www.screencast.com/t/lNGnpn8CYxxJ
Best Regard.
Derek