[#5434] - Path names containing a $ sign (e.g. home directories on Windows network shares) cause trouble

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

I just installed iReport Designer 4.1.1 on my company's Windows computer. I tried to create a report containing some header images; all data resides on my home directory, which is mapped to the Windows network path: \\servername\username$\data\My Documents\...
Including an image in the designer is no problem, but when switching to the preview page, I get the following compile error:

Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@10d0a57

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
calculator_Test45Searchterms_1314950589243_210676: 157: illegal string body character after dollar sign;
solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}" @ line 157, column 19.
1 error

at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:100)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:188)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:128)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:515)

So I switched to the XML view and escaped the $ sign - the preview works now, but I get broken image icons in the designer instead.

sschlott's picture
Joined: Sep 2 2011 - 12:08am
Last seen: 8 years 11 months ago

2 Comments:

#1

Hello

I have the same issue here any help ?

#2

By using groovy as language, the $ character must probably by escaped.
Try by adding a backslash (\) before the dollar sign

Giulio

Feedback
randomness