Jump to content
Changes to the Jaspersoft community edition download ×

Reporting BUG

Recommended Posts

By: Sofiane - sofianito

Reporting BUG

2003-02-13 03:50



Great job with version 0.0.8, but I'd like to report the following bug which still persist:


- Image Expression of class String are always quoted even if Image Expression is a variable or java expression.




<variable name="vImagePath" class="java.lang.String" resetType="Report" calculation="System">



When The variable is referenced in an Image Expression, iReport transforms it to:


<imageExpression class="java.lang.String"><![CDATA["$V{vEstrategiaChart_1}"]]></imageExpression>


which generates Runtime Exception because the expression is considered as String constant and though is not evaluated.




<variable name="vStaticImagesDirectory" class="java.lang.String" resetType="Report" calculation="System">



Java Image Expression like : $V{vStaticImagesDirectory} + "filename.jpg" is transformed by iReport to:


<imageExpression class="java.lang.String"><![CDATA["$V{vStaticImagesDirectory} + "Imagen3.jpg"]]></imageExpression>


which generates Exception at Compile time because of the presence of the quote " before $V





By: Giulio Toffoli - gt78

RE: Reporting BUG

2003-02-13 07:18

You have right.

iReport assume that the string is a file name....

We will looking for a workaround.

I.e. we can assume that if the class is a String and the value begin with $, also this is not a file name...


The shortcut to subreports (written by Dominique) is affected by a similar bug: it assume that if the subreportExpression is a String, also it is the file name of the subreport. Really in a lot of cases, teh classtype is String but the expression is a parameter. We could interpret this parameter or variable trying to use its default value....


Stay tuned!







By: Sofiane - sofianito

RE: Reporting BUG

2003-02-13 09:00

I beleive that the workaround should be as easy as the next statement:


In the case of Image expressions ( and could be applied for the rest of expressions ), iReport should save expression as it is without adding or removing any quote. Adding a <![CDATA[expression_that_user_typed]]> will not disturb ;o).

You could also add quotes control when user set the expression of an element by imposing a even number of not crossed quotes in the expression (0,2,4,...)


Well, it's just and idea, maybe I'm totally wrong...


Waiting for ur comments :o)



Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...