Jump to content
Changes to the Jaspersoft community edition download ×

Can i pass in an object as parameter to jasper


Recommended Posts

Hi all experts,


is there possible to pass in an object as parameter to jasper?.


Actually what i need is only display the xml data into jasper report instead of the whole XML included the tag<>.


the xml is in string, so i convert it to object and hope can just display the xml data and not the whole xml.


I have tried the following way but get an error


ERROR: Caused by: java.lang.NoClassDefFoundError: net/sourceforge/barbecue/Barcode

10:37:39,587 ERROR [sTDERR] at auditLog5_1179801424719_5174.evaluate(auditLog5_1179801424719_5174:306)


my code is as below:


String xmlLog = null;


Object object = getAuditTrailDao().convertXMLStringToObject(xmlLog);


parameters.put("XML_LOG", object);


fyi, classType of XML_LOG is java.lang.object, and textfield expression is java.lang .string


Any help would be highly appreciated!!


Thanks in advance..

Post edited by: junioryy, at: 2007/05/22 02:36

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Objects can be passed as parameters, e.g. I pass HashMap objects to reports and subreports. You have to change the class for the parameter to the right class, e.g. org.w3c.dom.Document. But I would not recommed to pass XML documents as parameter. Integrate them as datasource in your report. You can navigate to your XML elements and attributes via XPath expressions in your fields.
Link to comment
Share on other sites

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...