|
From: Peter S. <co...@pe...> - 2007-07-20 09:25:01
|
Hi Roberto, The XML servlet is great, and it's much better to use in iReport. Did you manage to use the remote xml datasource? (I had some problems with it..) This would be even better. One downside with the xml datasource, is that the Report Wizard won't accept it. Is there a way around this? Suggestions? About this: http://localhost:8080/lmas-addons-example/reportservlet?reportName=Report_1 It does always delete my report - and I know it's because of the "Print current report" function - but could we make it possible get an on-demand pdf without deleting? Further - in addition to pdf - could we also get an Excel doc - just like when using the excel preview function in iReport? Maybe introduce some switches? : http://localhost:8080/lmas-addons-example/reportservlet?reportName=Report_1&type=excel&delete=false (other types pdf, and the print current report could use delete=true) And - regarding xsl transformation (to google kml's and other htmls) - any suggestions on how to solve this? Should we introduce xsl template uploading? We can use the reportservlet for also viewing xsl reports, the servlet will figure out if the template used is xsl? regards, Peter On Friday 20 July 2007 08:01:29 you wrote: > He Peter, > > I have committed the functionality to retrieve searches in XML. I > modified the existing report servlet to handle this. So now if you > navigate to: > > http://localhost:8080/lmas-addons-example/reportservlet?searchName=Search_1 > > you will get an XML representation of the search result (see > attachment). I also removed the dynamic bean creation stuff an modified > the pdf creation to use this XML as a data source. This makes authoring > jasper templates in iReport even easier. You should use the actual XML > file and setup a datasource. In the query window select XPath, and use > "/searchResults/row" as the search expression. Form the XPath selection > drag and drop to define your fields. I also updated the sample jasper > templates in the full example project. > > The PDF functionality is still there and you can get a PDF of a report > if you navigate to (this URL is also used form the meta data applet): > http://localhost:8080/lmas-addons-example/reportservlet?reportName=Report_1 > > Please have a look and send me your comments. > > Regards, > Roberto > > Peter Salomonsen wrote: > > On Monday 16 July 2007 06:55:16 you wrote: > >> I have started working on implementing the feature. I have created a new > >> servlet - XmlReportServelet. My idea is to be able to use the reporting > >> template mechanism that we have, but load report templates in XSLT > >> format. The results of a saved search would be represented in a fixed > >> defined XML format, for e.g.: > >> > >> <searchResults latest="true"> > >> <row> > >> <column name="id" >1</column> > >> <column name="airportName" >JFK</column> > >> <column name="latitude" >- 44.98</column> > >> <column name="longitude" >15.63</column> > >> <column name="altitude" >128</column> > >> <column name="windSpeed" >43</column> > >> </row> > >> <row> > >> <column name="id" >2</column> > >> <column name="airportName" >JFK</column> > >> <column name="latitude" >- 44.98</column> > >> <column name="longitude" >15.63</column> > >> <column name="altitude" >128</column> > >> <column name="windSpeed" >43</column> > >> </row> > >> </searchResults> > > > > This is a very good idea. Is this format compatible with the XML data > > source that you have in iReport? Eventually could you change it so that > > it would be compatible? > > > >> The new servlet would apply the XSL transformation to this XML and > >> return the result. It would receive the the template and search names > >> (unique IDs) as URL params for e.g.: > >> /xmlReport/Position.klm?template=Placemark&search=Vehicle1 > > > > XSL transformation is a good way of providing the kml. Actually I don't > > think you should implement this part then. Providing the xml is enough, > > and let external applications apply xsl templates for now. I think just > > providing the stored search as xml is sufficient for now - and we'll make > > the decision about also storing xml templates later. > > > >> This would ultimately allow us to have URLs that generate HTML reports, > >> RSS feeds etc. > > > > That is exactly what we want. > > > > Since we're now going for XMLDatasources would this eliminate the need > > for the DynamicBean? I see a problem with this regarding datatypes. The > > DynamicBean makes everything as strings, and this is e.g. a problem when > > sorting numbers in the report. > > > > With the xml datasource we wouldn't any longer have to use the csv for > > designing templates in iReport - right? > > > > Another thing - iReport has a possibility of viewing the report as Excel > > - could we use the same mechanism to send an excel file rather than pdf? > > > > regards, > > > > Peter |