raja_s_patil Posted August 10, 2009 Share Posted August 10, 2009 Hi,I am using ireport to create Report Templates and PHP-Java-Bridge tocompile it through PHP. iReport ver. is 3.5.2, JDK 6, tomcat 6.0, WAMP server.I have succesfully tested master-detail report using local XML data file withxpath2 queries for master and detail in ireport and its giving desired results.However when I am trying to compile reports with PHP following error is thrown net.sf.jasperreports.engine.JRRuntimeException:net.sf.jasperreports.engine.JRException:No query executer factory class registered for xpath2 queries. When I change query language to xpath it compiles fine in both iReport and PHPbut the results are not as expected in both environments which is natural since itneeds xpath2 features.Can somebody guide in this situation ? (The matter is bit urgent)My best guess to this problem is that i might have missed some .jars while copying from jasperreports 3.5.2. If it is so then please tell me which jar is required for using xpath2. Another guess is iReport uses some other compilation jars than whatjasper reports uses but I feel its a remote probability. Thanks and best regards.Raja. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted August 12, 2009 Share Posted August 12, 2009 Hi, I think you first need to understand what the language attribute of the <queryString> tag is for, in JRXML.It specifies the name of a query language that JasperReports understands because it has a query executer factory already associated with it.When you download JR or iR, they already have query executer implementation associated with a language called "xpath".But they do not have any query executer implementation associated with "xpath2", just like they dont have one for a query language called "raja". If you want JasperReports to be able to understand a query language, you need to write a query executer for that language, if it does not already exists. I'm not an expert on XPath, but it might be that you don't have to use a new XPath query executer in order to use XPath 2 queries. The one already existing in JR might work for XPath 2 queries as well. So the first thing to try is to keep the language name as "xpath", regardless whether you actually write XPath 2 queries.If it does not work, the you might need to write an XPath 2 capable query executer and register it with a query language that you invent a name for. This might very well be "xpath2". but you are free to pick whatever name you want for it, as long as you make the appropriate mappings in the jasperreports.proeprties file. Look at the default.jasperreports.properties files inside the JR JAR to see which are the default query executers that JR has and how you could create and add one of your own. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
raja_s_patil Posted August 13, 2009 Author Share Posted August 13, 2009 Thanks,I am designing reports using iReport and in that there are two different query language optionsxpath and xpath2. I got confused because when I use xpath2 the report gets compiled and executes well in iReport. iReport uses jasperReport as base so i felt that I might be missingsomething to get it compiled in PHP with jasperReports. However if I compile template in iReport andexecute it in jasperReport with xpath2 it works fine. So only compilation is affected in jasperReportswith xpath2 query language. Can u take a look at it why only compilation is affected when template is created with iReport ? as of today jasperReports works fine with iReport pre-compiled templates. However I will try same report with xpath as query language in more detail and let u know exactly what is hapenning Thanks and best regards. Raja. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted August 13, 2009 Share Posted August 13, 2009 Hi, Well, this happens because you posted an iReport specific question on the JasperReports forum?You would have got the correct answer from the iReport folks, as the xpath2 query executer is a feature that only exists within iReport and is not part of the JR distribution. Thank you,Teodor Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted August 13, 2009 Share Posted August 13, 2009 Hi Raja,xpath2 requires a special query executer that is not part of the standard JasperReports distribution. It is part of Jasperreports-extensions project, a special project where we commit all the features that are not part of the JasperReports main distribution.The project is:http://jasperforge.org/projects/jasperreportsextensionsThe jar you need to put in your classpath is called jasperreports-extensions-3.5.3 and it is part of the jasperreports-extensions module of iReport.Giulio Link to comment Share on other sites More sharing options...
raja_s_patil Posted August 14, 2009 Author Share Posted August 14, 2009 Thanks giulio,I will Try with jar but can I distribute this jar withmy application. I remmber discussion we had about i report Licensing. Thnaks and best regardsRaja. Link to comment Share on other sites More sharing options...
raja_s_patil Posted August 14, 2009 Author Share Posted August 14, 2009 Thanks Teodor, I posted this question in ireport forum first and waited for two daysthen I thought This might be in perview of JasperReports so I posted ithere also. Sorry for inconvennience. Any how giulio has responded herethe solution. Thanks once again and best regards Raja Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now