gevattertod Posted October 21, 2009 Share Posted October 21, 2009 Old Problem solved, here is a new one! ;) With the new version of iReport there is no ReportnameApp.java file automatically generated.According to the tableOfContent Sample provided by jasperreports, I have to do the "moving" in this file. But, as said before it is not automatically generated any more.So my question is:What to do?generate a Class with ReportnameApp as the classname?Will this file be automatically accessed after filling the report, and before generating the pdf?What would be the approach to move a TableOfContent with iReport 3.6? Thanks in advance GevatterTod *this is a signature* Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted October 21, 2009 Share Posted October 21, 2009 Hi GevatterTod,The general idea of the sample is:1. Create a report (TableOfContentsReport) having a subreport in the summary band (HeadingsReport).2. The subreport uses as data source a JRBeanCollectionDataSource. The list of beans used to feed this data source is generated using a scriptlet (HeadingsScriptlet) which collects all the TOC items as HeadingBeans.3. After the generation you get a report with the TOC in the summary band. Here is where TableOfContentsApp code takes part: it moves the content of the summary band (one or more pages) at the beginning of the jasperPrint object (using the placeholder (the static text at the beginning) to identify exactly where to put the TOC.iReport (any version, not just iR for NB) is not able to run the code of TableOfContentsApp.java which in some way performs some sort of report post processing.TableOfContentsApp.java is never generated. It is just a sample app of what you should do in your application to achieve what you need.Giulio Link to comment Share on other sites More sharing options...
gevattertod Posted October 21, 2009 Author Share Posted October 21, 2009 Maybe i havent been exact enough.I designed a very complex report, and during the runtime i generate the ArrayList, containing the Information i need for the summary.The whole report including the scriptlet AND the summary band where the TOC is generated works like a dream. The only problem i face is, How to move the TableOfContent at the desired position.Its not a Problem of understanding the Java Code provided by TableOfContentApp.java, HeadingBean.Java, HeadingScriptlet.java, but dont know, where i have to call the TableOfContent-Move performed by the TableOfContentApp.java?So Points 1-3 of your Answer are understood, but where do i call the the Class?As far as i understood, in previous releases there was a ReportNameApp.Java File automtically created when compiling the Report.But maybe i am wrong there.In the TableOfContentsApp.java sample Main Method generate the report, and there is also the call for MoveTableOfContents method.So my Question is:I am calling the Reports out of Servoy.My Report gets generated with the TOC at the last pages. Till here everything is fine.But Where do I have to call the MoveTableOfContents method?Do i need to build a "caller" in the report?For example creating a field in the summary Band which would look like this:$P{REPORT_SCRIPTLET}.MoveTableOfConten()Is there any way that the TOC automatically gets put to the according page i want to have it when i call it out from servoy?In the Sample provided it looks like you have to run the main Method of the Class TableOfContentApp which is calling jasperserver to create the report.Am I that wrong? Like I said. My Scriptlet is working, my Report is working, but i dont know where the hell I have to call the "moving"... *this is a signature* Link to comment Share on other sites More sharing options...
thanatonaute Posted May 19, 2010 Share Posted May 19, 2010 Hello there,I spent days desperately trying to move the TOC from the summary band, last page, to the first page of the repport.And I find this posts ;)Giulio, isn't there any way to achieve this in Ireport only ? :/Yann Link to comment Share on other sites More sharing options...
gevattertod Posted May 19, 2010 Author Share Posted May 19, 2010 Finally I did get it working.From where are you calling the Report?From a webpage, an application (Servoy eg.) or somewhere else?I'm not shure if it is now possible to perform a move action within Ireport (we are still using 3.52), but I could help you if you privide further information. So long Jan ;) *this is a signature* Link to comment Share on other sites More sharing options...
thanatonaute Posted May 19, 2010 Share Posted May 19, 2010 Hi Jan,Actually I call the report from JasperServer.Ireport is connectet to the JasperServer Server and files are directly modified there.I really really need this feature. If you have a solution i will give it a try. Event if I have to move from JasperServer ;)thanksYann Link to comment Share on other sites More sharing options...
gevattertod Posted May 19, 2010 Author Share Posted May 19, 2010 Hi Yann.I havent worked with JasperServer, so I can't help you there.If I understand you correctly, you call the report directly from the JasperServer, and your Customers(the ones who actually need the report) Connect first to the JasperServer, and trigger their report from there.What might be an aproach (and this one only results out of my not knowing how JasperServer works) is to create a new Servlet on the Apache where JasperServer is running, and in this Servlet you could create a Class, which only creates this particular report. Its more or less a sledgehammer apraoch, but it might work out. In my company we are using Servoy to build our customer backends, and thats from where we trigger our Report. There is a plugin available for Servoy which already has the MoveTableOfContent function implemented. So you could start whith a ready (tested) plugin. What would be your favorite way of calling the report, if not from JasperServer? So longJan *this is a signature* Link to comment Share on other sites More sharing options...
did1979 Posted June 9, 2011 Share Posted June 9, 2011 Hello, Is there anybody that could explain to me how when can put the summary band with the TOC to to to of report in ireport. I also use the jasperserver Pro and I cannot find the solution to have the Table of contents a the beginning of my report. Thanks.Didier 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