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

lukus

Members
  • Posts

    39
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by lukus

  1. Hi sionut1984, Your SQL will fail due to the way you are using your parameters. Defining parameters in the 'Report Query' window as $P{my_parameter} will cause the parameter to be written with '"' wrapped round the content. To avoid this you need to use the '!' in the definition. Simply defing your query as follows should solve the problem. select ann.id ID, ann.name PROKYRIXI from announcements ann where to_char(ann.deadline,'YYYY')<= $P!{endYear} and to_char(ann.begin_date,'YYYY')>= $P!{startYear} Cheers Lukus
  2. Hi Joe, You may be able to achieve this using a crosstab report but this may cut down on the type of formatting you want to achieve. If I were you I would perform this task in the Query before the data set hits the report. You could insert a corolated sub query in your SELECT statment to get the customer total for each tupple. eg SELECT i.customer, i.invoice, i.amount, (SELECT SUM(amount) FROM invoicetable WHERE customer = i.customer GROUP BY customer) AS totalinvoice FROM invoicetable i ORDER BY totalinvoice DESC, i.customer This may be too costly to perform but there are many ways to rewrite the query if you wish Cheers Lukus
  3. Hi kchaudhry, There are 2 other approaches you could also use here. They both have their compromises so they may not suit. 1) ensure that the 'Start on a new page' check box is ticked in the groupproperties - of course this will mean each new group will appear on a new page. 2) Check 'Ignore Pagination' under Edit->Report Properties->More. Of course this is only good if you don't plan on printing the report Cheers Lukus
  4. Hi dreporter, I think you're after something like the following. I havent tested this but it should get you on the right track. Cheers Lukus Code: Post Edited by Luke Cottier at 11/11/08 00:52
  5. Thanks Matt / Evelyn, I'll put on a feature request. In the short term I've rolled back to iReport 3.0.0 (classic) which still has the compile option. Thanks for the advice and feedback Cheers Lukus
  6. Hi Mathew, Not sure if this solution will suit or if there is another way but what I have done in the past is create aditional groupings that change on each record (the same as the 'Detail' section). You can then hide all groupings only showing the band that matches the parameter. Cheers
  7. gar Wrote: I tried doing that, but without the ! after the P, and it didn't work. What the heck is the difference?? Is this stuff documented anywhere? I can't seem to find anything other than the samples, which aren't comprehensive. The difference is... $P{whereclause} evaluates to "WHERE appleid = 456" $P!{whereclause} evaluates to WHERE appleid = 456 The '!' simply removes the '"' which will muck up you query syntax. Cheers
  8. Thanks for your reply evelyn. I had found the preview button but quite frequently I want to just recompile the report after a minor change of some sort. I do not always wish to view the report in these cases. In fact viewing the report can be a little painful given that frequently there are external data sourses and parameters being passed to the report at launch time. Of course this causes errors which I am fine with and I do still get my report compiled but it does tend to be a hog on the memory while it goes about generating the errors that I know I'll recieve at launch time anyway. Are you able to just compile the report like I've been able to do in versions prior to 3.1.0? Cheers
  9. I feel a bit stupid but... I can't see how to compile my report in iReport 3.1.0 without trying to run it. Can anyone point me in the right direction? Cheers
  10. Hi kalafyan, I'm not sure I understand the question but here goes... What I do is extract all the jar files my reports need into a single dir and then create my own jar file. Seems to work well Cheers
  11. Hi Rufus, Try... "My little sentince $" + new BigDecimal($F{loan_amount).intValue()/100).toString() + " and some moer words" Check out the Java API. Its pretty straight forward for these sort of conversions. Most objects will have a toString() method. Also since you are using a BigDecimal I am thinking you'll need the decimal places returned as well...? What you have here will round to the nerest whole number. Again check out the Java API. You'll need to either use the devide() method or use $F{loan_amount}.doubleValue(). Cheers
  12. Hi There, I have an issue with one of my reports not launching due to a serialVersionUID difference. I have reciently upgraded my server to use 'jasperreports-3.1.0.jar' (my own server) and I now this report won't run... First step was to compile the report with the correct libs which was done using iReport 3.1.1. All the java classes used in msy erver are the same as those supplied in the iReport package. I would ahve thought a recompile would have solved the problem. If someone could take a look at my stacktrace and let me give me some feedback on possable waysto tackel this problem I would be very gratful. Cheers Code:net.sf.jasperreports.engine.JRException: Error loading object from file : Sub_Report5.jasper at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:96) at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:262) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:311) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:260) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:426) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1380) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:692) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:888) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:810) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:517) at LaunchReport.CreateReport(ReportServer.java:672) at LaunchReport.<init>(ReportServer.java:557) at ServerThread.run(ReportServer.java:294)Caused by: java.io.InvalidClassException: net.sf.jasperreports.crosstabs.base.JRBaseCrosstabGroup; local class incompatible: stream classdesc serialVersionUID = -6144263542628036271, local class serialVersionUID = 7685014062058258277 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at java.util.ArrayList.readObject(ArrayList.java:591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:92)
  13. Hi lucianc, Thanks for the patch. This worked fine for me. A small note on implementation though. Ensure that the patch is included early in your class path. I have built my own jasper jar including the various components I need and when the patch was included after this in the class path the patch failed to work - I guess this actually makes sense when you think about it but was a little confused to begin with. Cheers Post edited by: lukus, at: 2007/09/19 03:11
  14. Hi lucianc, Thanks for the patch. This worked fine for me. A small not on implementation though. Ensure that the patch is included early in your class path. I have built my own jasper jar including the various components I need and when the patch was included after this in the class path the patch failed to work - I guess this actually makes sence when you think about it but was a little confused to begin with. Cheers
×
×
  • Create New...