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

Field won't show up on label #5

Open
garrettgirard opened this issue Jul 9, 2015 · 0 comments
Open

Field won't show up on label #5

garrettgirard opened this issue Jul 9, 2015 · 0 comments

Comments

@garrettgirard
Copy link

Issue: One or more fields won't show up on generated labels even though the field is in SpiReport. For example, Variety and Variety Author weren't showing up for me, even though they were present in the database's taxon form under Full Name. So, after adding the Full Name field to the report and trying to generate a new label, I got an error message. If your error message looks like this one (pasted at bottom), then you are probably running into the same issue and can use the following solution.

Solution: Export any labels using the same saved query as is used by the faulty label, and then delete those labels in the database as well as the query they use. Next, open up the label file using an archive manager (such as 7-zip) and extract all the files. After you extract the files, you need to edit the data.xml and the SpReport.xml files. Open up these files (with something like Notepad) and find all instances of the field name within them, then change each instance so that it's name matches what's in the database. For example, I had to change all instances of "variety" and "variety author" to "Variety" and "Variety author". After the changes have been made, save and select the all the extracted/edited files (app.xml, data.xml, SpReport.xml), right-click and select "send-to" then "Compressed (zipped) file". Finally, name this file whatever you want your label name to be and take off the .zip. You can now import this label back into the database (as well as any other labels you had to extract/delete) and it will automatically recreate the query it used. Now, generating the report should fix the issue and you should be able to see the missing fields.

Error message:
net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
1. Field not found : 1,9-determinations,4.taxon.variety
2. Field not found : 1,9-determinations,4.taxon.variety
3. Field not found : 1,9-determinations,4.taxon.variety Author
4. Field not found : 1,9-determinations,4.taxon.variety Author
net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:271)
net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:153)
net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:354)
net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:270)
net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:252)
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:551)
edu.ku.brc.specify.tasks.subpane.JasperCompilerRunnable.run(JasperCompilerRunnable.java:205)
java.lang.Thread.run(Unknown Source)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant