This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Jasper Reports Cookbook- userdefined XML to PDF possible Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jasper Reports Cookbook- userdefined XML to PDF possible" Watch "Jasper Reports Cookbook- userdefined XML to PDF possible" New topic
Author

Jasper Reports Cookbook- userdefined XML to PDF possible

Vidhya DeivaMani
Greenhorn

Joined: Jun 16, 2010
Posts: 7
Hi Bilal,

Good Day!


I am working in Temenos . A banking product company,

I learn this Jasper Reports from www.nebteans.org one article, From that onwards i used this jasper reports to my college final year projects.

But all examples are i hands on from data base,

Our company product don't have inbuilt customized reporting tool. I R&D personally for few months out of my work to implement this jasper reports
to our T24 product.

I have formed user defined or customized xml from our product , I wish to populate to jasper reports , Is it possible to convert the attached xml to customized JRXML.


Please find the xml and its schema.

Customized or User-defined XML




Customized or User-defined SCHEMA xsd



Many Thanks

vidhyadharan D





Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi there,

This should certainly be possible using a XSL stylesheet!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Vidhya DeivaMani
Greenhorn

Joined: Jun 16, 2010
Posts: 7
Can you please give me some example

Many Thanks
vidhya
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Well I've never tried your specific use case before but using a style sheet to transform an XML document that meets one schema to another XML document that meets a second schema is quite common. I sugget you start here!
bilal sidiqui
Author
Greenhorn

Joined: Aug 09, 2010
Posts: 17
Hello Vidhya,

JasperReports provides full flexibility of using a wide variety of datasources including XML.

Acting as a consultant for an energy meter manufacturing company, I designed the XML schema to represent energy consumption data of a metropolitan city. The city had many grid stations, each grid station had several feeders, each feeder was feeding into a number of transformers and eventually each transformer was connected to a few dozen electricity consumers. I used JasperReports to provide a set of very comprehensive reports about the energy consumption data of the entire city consisting of over a million consumers.

So, customized XML is no problem for JasperReports. You can use XPath to map data elements from your XML to JasperReports data fields. Then you design your Jasper report using the data fields.

This extract from my JasperReports book is a step-by-step demonstration of creating a Report from customized XML using XPath.

http://www.packtpub.com/article/jasperreports-creating-report-from-xml-data-using-xpath

Please try this recipe and I hope it will show you exactly what you need to do with your customized XML in order to generate a report. And, if you have a spec of time, please let us all know on this forum what you learned from my recipe.

Bilal Siddiqui, Author of JasperReports 3.6.0 Development Cookbook
 
GeeCON Prague 2014
 
subject: Jasper Reports Cookbook- userdefined XML to PDF possible