The issue has been reported in the forum: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=66094
---------
I may use external styles with JasperReports and define them with Java expression directly or inside a parameter. That works, and I may use it to specify the directory where the jrtx file is.
But when I do the samething with iReport, iReport seems to not locate the file and shows every text/static field blank in the designer view.
I tried that with 3.6.1.
---------
---------
Let me add something interesting. When I use an expression for the template, it is called. And it just works for purpose of expand the Styles / Template in the Report Inspector with the elements of the external reference.
When my template expression is just a simple ("/path.jrtx") string, everything works. But if it's something like "" + "/path.jrtx" it cause the problem. Looks like in some place it's evaluated different.
And the problem is not that fields and texts become blanks in the designer, but they use the default font, which in my case make it feel they are blank because they are small.
---------
---------
The problems happens dut eto this piece of code in ReportConverter.java, when calling JRExpressionUtil.getSimpleExpressionText:
protected void loadReportTemplateStyles(JRReportTemplate template, Set loadedLocations)
{
JRExpression sourceExpression = template.getSourceExpression();
if (sourceExpression != null)
{
String location = JRExpressionUtil.getSimpleExpressionText(sourceExpression);
if (location == null)
{
log.warn("Template source expression " + sourceExpression.getText()
+ "cannot be evaluated; some styles might remain unresolved.");
}
else
{
HashSet parentLocations = new HashSet();
loadTemplateStyles(location, loadedLocations, parentLocations);
}
}
}
---------
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now