Hi, Have anyone tried to import user defined classes in jasper report (.jrxml file)? I want to use some (user defined) Util class inside my jasper report to cook some bean attributes. I am using Javabean datasource
Please let me know if you need further clarification.
syntax to import class is
<import value="java.util.HashMap"/>
I want to use
<import value="mypackage.MyUtil" />
....
....
<field name="myVar" class="java.lang.String">
<fieldDescription><![CDATA[MyUtil.cook(myData)]]>
</fieldDescription>
</field>
The simple definition for MyUtil.java could be
package mypackage;
public class MyUtil
{
public static String cook(String data)
{
return data + "_cooked";
}
}
Thanks Nayn