brijesh.singh
-
Posts
2 -
Joined
-
Last visited
Content Type
Forum
Downloads
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Events
Profiles
Posts posted by brijesh.singh
-
-
Is there a any where a SQL query defined in report template can fetch XMLType data from Oracle DB and be treated as XMLData source?
I have a set of tables with XMLtype datafield, I need to define a SQL either in report template or pass that as parameter using JasperReport API only to fetch XMLtype data for report. I don't want to use a separate JDBC connection and jdbc executable statement to fetch XMLType data from table and then feed that data to Jasper report or custom XMLdataType source.
I am looking if jasper API can help out to pull XMLType data from table and that would be treated as data source for report, in other words, does Jasper supports SQLType data supported in JDBC4 as XML data source for report?
Please assist me, I will appreciate your help.
XMLType Data fetch by SQL in jasper report
in Products
Posted
Thanks, Olga, for your suggestion, I tried following things but that did't work:
1) Created a XmlTypeJdbcQueryExecuter class and factory classes as well that extends JRJdbcDataSource that returns JRXmlDataSource.
public class XmlTypeJdbcQueryExecuter extends JRJdbcQueryExecuter ......
2) Registered a new language sqlXML using these classes.
3) Created a report template using sqlXML language where I define a DB SQL that returns XMLType and a set of fields with XPath expression
3) tryed to execute report, not data displayed on report, bank page got created., not sure JRXmlDataSource got used or not, configured SQL executed properly, How this data would be available to report? I didn't add any PARAMETER_XML_DATA_DOCUMENT at all.
4) I tried to wrap XMLType data in JRXmlDataSource and pass to report fill manager that didn't work either, If I am passing JRXmlDataSource as report data, do I need to specify PARAMETER_XML_DATA_DOCUMENT with Xpath based template or this only needed if feeding data as DOM object.
Not sure how I can debug or where things are wrong.
I appreciate your help and assistance.