Issue moved from:
Consult original issue for any attachments.
[ 1483800 ] Addtional functionality added - code in attachment
Submitted By: Colin Saxton - ccsaxtonAccepting Donations
Date Submitted: 2006-05-08 06:27
Last Updated By: ccsaxton - Comment added
Date Last Updated: 2006-05-09 01:44
Number of Comments: 1
Number of Attachments: 1
Assigned To: Nobody/Anonymous
Addtional functionality added - code in attachment
I have added some functionality to JasperReports that you may want to make standard. I have included the files in the attached jar for your reference.
1. I have added a page listener that has a single method which is called on each new page throw. This is useful for report servers so that they can show a visual update of the report as it processes each page.
To use the page listener you just pass an implementation of net.sf.jasperreports.engine.JRPageListener into the parameters like so..
params.put(JRParameter.REPORT_PAGE_LISTENER, apl); and after each page throw the newPage method will be called.
Although you can do this with scriptlets...scriptlets require changes to the report itself (quote me if I am wrong since I am new to jasper reports!) while this
will count the number of pages no matter what jasper report is passed through it. (You may find it useful)
2. I have included support for XMLDB databases so that you can passing an xmldb collection and run XPath/XQuery queries against it. it is very similiar to
using the XML query that already exists. The fieldDescriptions contain the xpath to locate the field data from the returned nodes. The queryString element has the language set to "xmldb" with a valid xpath/xquery string (depending on the implementation of the xmldb database).
To use the XMLDB database just pass the xmldb collection as a parameter like so...
and then the query string in the report will be run against the xmldb collectionYou will also need to include the xmldb.jar file from the XMLDB website...latest version.
I hope you find these additions useful
Colin. (ccs at embrace-software.co.uk)
Date: 2006-05-09 01:44
Sender: ccsaxtonAccepting Donations
Logged In: YES
After reading all of the payed for documentation I see that you can monitor the exporter process a bit like the PageListener interface that I have added. The page listener interface that I implemented works while the JasperPrint instance is being generated not on the exporting of the document to a different format...
jasperupdate.jar, Updated/added class files for jasper report server