raja_s_patil Posted July 21, 2009 Share Posted July 21, 2009 Hi, I have downloaded ver 3.5.2 and installed it on both windowsand Linux and have tried for couple of days to evaluate it asreporting tool for our project in flex.I found it much interesting as far as XML (file as well remote)datasource is concerned and I think I will be using mostlyremote XML data source. As of designing reports we will be usinglocal XML file with test data but for production report it should useactual XML data which will be generated dynamicaly with help of PHP or other serverside technology with different names at different times. What we want to do is Pass that file's name as parameter while invoking thereport at runtime and delete it as soon as report finishes. is it possible with ireport/japserreport ? if yes how can I do that ? Thanks and best regards Raja Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 21, 2009 Share Posted July 21, 2009 The file will be handled in general by your application that will instance a JRXmlDatasource passing the file and will delete it at the end of the report creation.I suggest you to take a look at the xpath2 language. This is a special version of the xpath language provided by jasperreports and is provided as jasperreports-extension. With this language you can set the parameter XML_URL, and it will be used as location to get the xml data to use with the xpath query set in the report. The XML_URL can even be something like file:///C:\test.xml if you want to use local files.This special query executer has actually more features. You can define parameters with the prefix XML_GET_PARAM to pass parameters along with the URL, so for instance you can define a parameter XML_GET_PARAM_CustomerID, and the parameter CustomerID will be passed in the url. Same thing using XML_POST_PARAM_Something, in that case the query executer will use a POST request to get the file. So in example you can have:XML_URL = http://myserver/generate_customer_data.phpXML_GET_PARAM_CustomerID = 5Final url used to get the xml: http://myserver/generate_customer_data.php?CustomerID=5Of course you can have as many parameters you want.Attached there is a simple jrxml that is able to show the titles in a rss document. Execute it using a Query Executer Mode data source. When iReport prompts for the parameter XML_URL, set the url of an rss file or use the default value which points to an RSS file here on jasperforge.org. Giulio Link to comment Share on other sites More sharing options...
raja_s_patil Posted July 22, 2009 Author Share Posted July 22, 2009 Thanks Giulio, Well thing turned out to be simpler than I expected. My impression is the product is based onwell thought design and I am sure that more things will come as this one down the line. /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gifSo I have almost on the verge of finalizing JasperReports/iReport as reporting environment for our first web project.What I would like to know is,1. Where can I find documentation for iReport and jasperreport. I searched site but I could not much of it May be My efforts lack somewhere so i will be gratefull if u give me some urls2. How can I run my reports from flex application. I have chosen Flex/Air for UI and PHP->AdoDB for server side. For display information I am using RPC with amfPHP. I would like to make application database independent so we are enclosing all business logic in PHP scripts so is true for Reporting business logic. We plan to retrieve base data from databse with adodb and process it in PHP and finally spitout XML which either can be stored in disk file or directly consumed by reporting solution. What we need is reporting solution should take the data sequentially and generate report either by grouping or plain columner for almost 95% reports in the application very few require master-detail kind of facility. so in this scenario can u guide me about how Shall I proceed. BTW if flex application makes a call to either serverside viewer and if viewer is able to preview report in a separate tab or window is OK for me. otherwise if server side reprting runtime is able to send txt/PDF/xls/doc file directly to caller depending on parameter passed while calling which user should be able to save/print locally is also OK to me 3. If I notice some bugs where can I log them Thanks once again for speedy response and best regards/tools/fckeditor/editor/images/smiley/msn/thumbs_up.gif Raja Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 22, 2009 Share Posted July 22, 2009 1. www.jasperforge.com (the official manuals are not free, but the price is really reasonable give the amout of information they provide)2. Solution 1: simple java deamon that read request for report execution from a dbSolution 2: java + PHP integration (you can write a generic simple java class to create the reports and instance and call it from PHP)Solution 3: JasperServer + WebServices call from PHP (or other component supporting web services) to execute the reports and get back your favorite file format to be sent to the client3. Bugs can be submit using the Tracker tool (see the menu on top of this page).Giulio Link to comment Share on other sites More sharing options...
raja_s_patil Posted July 22, 2009 Author Share Posted July 22, 2009 Thanks for speedy response,No problem we can buy official manuals once we finalize on JasperReports.>> Solution 1: simple java deamon that read request for report execution from a db<<I have not understood what exactly this is. Can u ellaborate it ?>>Solution 2: java + PHP integration (you can write a generic simple java class to create the reports and instance and call it from PHP)<<This seems to be OK for us. Can u point us to some example/Tutorial URL. ?We do not use java extensively for development but we will be able to manage writing few classes for reporting purpose based on example code. As per present scenario Solution 3 is not a viable from clients perspective but it has gotlot of value. We will keep this in mind and suggest this to our future prospective clients Thanks and best regards Raja Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 22, 2009 Share Posted July 22, 2009 Solution 1: simple java deamon that read request for report execution from a dbA daemon checks every few seconds if there are report job requests in a DB table. If a report execution request is found, a new thread will execute the report and will save it in the specified location. Not very good for report created immediatly.Solution 2: I have not code sample, but you can find a sample about how to instance and use a method of a java class in PHP, while for the java portion, any sample in the JasperREports distribution has the code you need (see SampleApp.java files in each sample directory).Giulio Link to comment Share on other sites More sharing options...
raja_s_patil Posted July 23, 2009 Author Share Posted July 23, 2009 Thanks giulio,I am reading material about PHP/Java Bridge and running jasperreport from PHP.As of now I am able to run some java classes from PHP and going to try Jasper Report tommorow.Meanwhile I would like to know Whether I can use jasperreport in a commercial Projector there are any restrictions. Some articles suggest that some of the Jars in JapserReportcan not be used in commercial projects. can u comment on things which can be used incommercial projects freely.Regarding main topic issue I will comeback after I am able to run jasperReport from PHP Thanks and best regards.Raja Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 23, 2009 Share Posted July 23, 2009 For what I know (and I'm pretty sure about that), all the jars shipped with JasperReports have a license which allows you to use them in a commercial product, included JasperReports itself, which is LGPL.iReport is GPL, this means that you can use it to create your reports, but it can not be shipped as part of your product.Giulio Link to comment Share on other sites More sharing options...
raja_s_patil Posted July 24, 2009 Author Share Posted July 24, 2009 Thanks giulio,What I have understood is The reports designed with iReport can be distributed with acommercial product but iReport itself can not be Distributed in a commercial product.JasperReport Jars can be freely distributed with Commercial product.Please comment if I am under wrong impression. Today i will try PHP/Java Bridge -> JasperReport and if necessary I will post about it Thanks and best regards Raja Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted July 24, 2009 Share Posted July 24, 2009 That's it.Giulio Link to comment Share on other sites More sharing options...
raja_s_patil Posted July 24, 2009 Author Share Posted July 24, 2009 Thanks Giulio, I am studying jasperreport from a Book "Definitive Guide" and very muchimpressed by the basic design developers have adopted. What I can sayis its a "Master Piece Created by Genious" for database application developers.Its ease of use for Programmers, Functionality and Flexibility is enormous. I dont know much about developers of jasperreport but I guess that they must have developed and implemented lot of database applications. Best Regards. Raja. Link to comment Share on other sites More sharing options...
sujith_penta Posted February 16, 2012 Share Posted February 16, 2012 I need to use xml remote datasource for my reports in iReport 4.1.3 versionI can configure the xpath n all..but when i do compile the report i get a message saying the document has no pages..Please do help in this regard. Regards,Sujith Link to comment Share on other sites More sharing options...
sujith_penta Posted February 16, 2012 Share Posted February 16, 2012 I need to calculate the average of the values of the fields..but could not get the logic exactly..Please help in this regard..Regards,Sujith 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