Jump to content
We've recently updated our Privacy Statement, available here ×

gevattertod

Members
  • Posts

    17
  • Joined

  • Last visited

gevattertod's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. 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 long Jan *this is a signature*
  2. 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*
  3. Honestly I dont know. I just can guess. And I would guess, that you can't call your Driver multiple times. And thats what you are doing, if you execute your class 3 times in the same thread. I would recommend to call your class just ONCE, because the subreport handling is done by iReport. As said above, this is just a guess. Greetz Gevatter *this is a signature*
  4. iReport can't load the file: /findb/sw/fin/java/CreateReportCPPI/reports/subGestore.jrmxl I would expect that: either it doesn't exist, or the path is wrong. Greets Gevatter *this is a signature*
  5. 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*
  6. Try compiling your Subreport (like you did with your Main Report), that you get your subreport.jasper file. Then run your mainReport. So long GevatterTod *this is a signature*
  7. I would recommend to set in the Options Menu: Compilation and Execution Tab *Use Report Directory to compile* Then all your reports will be compiled to your report folder. eg. you have a diretory called "report" In there all your reports are located. If you check Use Report Directory to compile, the *.jasper Files will be generated in this folder. Now set the Parameter "SUBREPORT_DIR" to "C://report//" A little Trick for subreports going deeper: eg. MainReport.jrxml contains a subreport MainReport_Subreport.jrxml, and this subreport contains another Subreport MainReport_Subreport_Subreport.jrxml Now you move your complete Reporting to another directory (For example you develop on a Windows Machine, but deploy it on a Linux Server) it is a good Idea, to pass your SUBREPORT_DIR via Parameter down to the other subreports. So you only have to change your Parameter SUBREPORT_DIR in the MainReport, and all the subreports get the changed SUBREPORT_DIR by Parameter Pass. This also works out, if you work with i18n. You specify the Resource Bundle in the MainReport, pass the Parameter REPORT_RESOURCE_BUNDLE down to all of your SubReports, and SubSubReports. So, if you want to change your Resource Bundle you only have to specify your ResourceBundle in the Main Report, and all the subreports will get the new Resource Bundle by the passed Parameter. This comes very Handy if you call your Report from Servoy. The JasperPlugin for Servoy provides the report with the i18n values out of the - in the ServoySolution specified - i18n table. So if you dont pass the REPORT_RESSOURCE_BUNDLE to the subreports, the will not receive the i18n Values. So long: GevatterTod *this is a signature*
  8. 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*
  9. In general the footer in a subreport displays without any difficultys. I didnt try out the stretch to TallestObject thing. If i want my Subreport filling the whole page, i check run to bottom. Quite in fact its hard to help you with that little of Information you provided. ;) Have you tried what happens, if you change the Stretch type to no stretch? *this is a signature* Post Edited by gevattertod at 10/21/2009 11:50
  10. Hi. Try out the following ( I Dont know if this works) Create a parameter and call it for Example WhereClause from type String. Write in your query: Select FUND_CODE from FUND $P{WhereClause} $P{PARAM_FUND_CODE} leave both Parameters empty for a selection of all rows. If you want to add the where Clause, give $P{WhereClause} the value " where FUND_CODE=" and $P{PARAM_FUND_CODE} the ID. Greets GevatterTod *this is a signature* Post Edited by gevattertod at 10/21/2009 11:41
  11. Fu** Me! I Did it! *GevatterTodStartsDancingAroundInTheForum* :) Hoping this might help someone: If you follow my steps as described above, you have to click in your Subreport on the ReportQuery Tab, which should be empty.(Because you don't use a Datasource Connection) There you Click on the tab: JavaBean Datasource. Enter the name of the Object Class you stored in your ArrayList. For me it has been "TableOfContent.HeadingBean". The you click read Attributes. After that you get displayed the Type of the Class, and the Fields this Class provides. It should look similar to this: class(java.lang.Class) headingText (java.lang.String) pageIndex(java.lang.Integer) Then I selected headingText and pageIndex and clicked on the "Add selected field(s)" button. After that, the fields are displayed in your PopUpWindow, as well in the field Area of the ReportInspector. Now you can just "Drag and Drop" the fields in your report. So long! Yours GevatterTod *this is a signature*
  12. First of all: Thanks for your reply. At least i figured out that you have to reference like this: Package.Class if your class is in a package, and the package is added to your classpath in iReport. If you just compile your class without belonging to a Package you have to reference: Class And add the folder of your class to the classpath. Means for me: -code snipplet from myClass- package TableOfContent; public class HeadingScriptlet extends JRDefaultScriptlet { public Boolean addHeading() throws JRScriptletException {...} } And I reference this in iReport with: TableOfContent.HeadingScriptlet (which also works out with TableOfContent.calculate for Example, which means, the class doesn't have to end with Scriptlet.) But now i have the next Hurdle. I am trying (nobody would have guessed, by the name of the class and the package) to generate a Table Of Content. I've tried to be as close to the TableOfContent Sample provided by JasperReports/Demo as possible, but didnt figure out, how to acces the objects I have put in my ArrayList in the summary Band. I gave the Subreport a Datasource Expression as DataProvider Connection type Use a datasource expression new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($V{HeadingsCollection}) HeadingsCollection is defined as follows: Variable Class: java.util.Collection Initial Variable Class: new java.util.ArrayList() The ArrayList is being filled in the main Report and it has the the number of entrys as expected. But how do I work with this datasource in my subreport? How do I acces the Values which are stored in my objects in the ArrayList? Greetz GevatterTod *this is a signature*
  13. Hi. I am trying to get a real simple scriptlet to work, but i got stuck. I allways get this exception: Error filling print... Error creating scriptlet class instance : calculate net.sf.jasperreports.engine.JRException: Error creating scriptlet class instance : calculate at net.sf.jasperreports.engine.scriptlets.DefaultScriptletFactory.getScriptlet(DefaultScriptletFactory.java:121) at net.sf.jasperreports.engine.scriptlets.DefaultScriptletFactory.getScriplets(DefaultScriptletFactory.java:73) at net.sf.jasperreports.engine.fill.JRFillDataset.createScriptlets(JRFillDataset.java:465) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:582) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1234) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:865) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:814) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:421) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:251) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:898) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030) Caused by: java.lang.ClassCastException: calculate cannot be cast to net.sf.jasperreports.engine.JRAbstractScriptlet at net.sf.jasperreports.engine.scriptlets.DefaultScriptletFactory.getScriptlet(DefaultScriptletFactory.java:113) ... 12 more Print not filled. Try to use an EmptyDataSource... How do i avoid this exception, or better asked: What the He** im doing wrong? below the code of my scriptlet. Code: Post Edited by gevattertod at 10/21/2009 10:16
  14. Sorry, but I just don't understand HOW you move the page to the top. Could you please give a more detailed instruction than the one above? I tried to find out more about the JasperPrint, but i just don't get the clue... Thanks in Advance! GevatterTod
  15. As said above, everything works fine by now. Nevertheless : Thanks ! ;)
×
×
  • Create New...