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

dogmac

Members
  • Posts

    9
  • Joined

  • Last visited

dogmac's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Yay! I finally got it working, so in the public interest (and for my own reference should I ever have to do this again) I'm writing down step by step things before. In Eclipse, I had a package called Reports. In the build path of this package, I needed to add the lib iReports.jar (found in iReport-1.3.0iReport-1.3.0lib) This also needs to be added in build.xml <include name="iReport.jar" /> and application.xml <module> <java>iReport.jar</java> </module> Then the .java code that calls the report needs to have import it.businesslogic.*; within it. For safety's sake (well, I'd tried this first), I put all my scriptlet .class and .java files in a .jar file and did the same adding to my package. All working now! Hope this helps anyone else who has been struggling like me. Cheers Di
  2. Can you tell me exactly where you needed to add the lib? I've been adding mine everywhere, but still getting the same error. It is just not finding it at all.
  3. Sorry to be completely picking your brain, and I know this one isn't directly ireports related, but still... HELP! It was missing the commons.jci.core file, which I have now added, but it is still not actually finding it. I've added this to my project build path, the .build file and the .application file, and it is still not finding it. From googling, I've come to the conclusion that I need to add something to my .project file in Eclipse, but I can't for the life of me work out what it would be. A maven connection maybe? Has anyone had any experience with this? Thankyou so much Di
  4. I spoke too soon!! It worked beautifully within ireports, but as soon as I tried to call it via my webinterface, I started getting the following error: java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getErrors()[Lorg/eclipse/jdt/core/compiler/IProblem; 17:15:33,953 ERROR [sTDERR] at net.sf.jasperreports.engine.design.JRJdtCompiler$2.acceptResult(JRJdtCompiler.java:389) 17:15:33,953 ERROR [sTDERR] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417) 17:15:33,953 ERROR [sTDERR] at net.sf.jasperreports.engine.design.JRJdtCompiler.compileUnits(JRJdtCompiler.java:463) as soon as it tried to compile. I'm assuming this is because it can't find the tools.jar. I've put the tools.jar in my project, and added it to the build and to the application.xml. I check the tmp jar that is deployed and it is definitely there. I've tried putting it into my jboss classpath, and that makes no difference. I can't find anything online that matches this, there are a few close ones, but all the ones I have attempted have failed. Help! Thankyou Di
  5. Thankyou so much! It worked beautifully (once I worked out where to put the tool.jar) I really appreciate it Di
  6. Hi, I need to do a growth chart, with differences between each row. eg Code: Services Growth Jan 15 - Feb 20 25% Mar 30 33% But I can't work out how to carry forward the services field value to the next row. I've tried setting a variable, but it is calculated at the start of each row, not the end, so I am always getting 0%. Is there a cunning way I can do this? Thanks Di
  7. Hi, I was wondering if anyone had a brilliant solution for me. I have a crosstab of date and types such as below Code: type1 type2 Activated | Deactivated Activated| Deactivated date1 12 | 1 123 16 date2 1234 | 123etc, etc What I want is to put a total for each type which is the difference between activated and deactivated. I've tried negating deactivated, and then summing, but it seems to only take the positive option. ie Sum (12, -1) = 13 not 11. Is there any way that I can do this? Because there are several types for the same date, and we want to compare all of them, a crosstab seems to be the sensible way to go (tried columns as well), but the difference is failing me miserably. HELP!! thanks in advance Di Post edited by: dogmac, at: 2007/06/29 00:36
  8. Hi Lucian, Thankyou for your reply. Hopefully I'll be able to clarify. No, the Datasource doesn't take care of it. What we thought we would be able to do (and please tell me if we are wrong) is to import that class with the enums into the jrxml file and then use some of the existing procedures from there. So, we would want to import it and then use $F{TYPE}.getLabel, which would convert the bigDecimal to a string. Is this possible? Thanks Dianne
  9. Hi everyone, I am new to Jasper Reports and really like things thus far, but am currently stuck. I haven't been able to find a similar query in the archives. Our database is recording enum values, enums like: public enum Status { active, inactive, closed, deleted; public String getLabel() { String key = "status_"+this.toString(); try { return Messages.instance().get(key).toString(); } catch (Exception e) { return key; } } public static List<Status> valuesAsList() { return Arrays.asList(Status.values()); } So what is recorded is just a BigDecimal value. How do I translate this on a report back to something that the user can understand. I am importing the class in which the enum lives, and trying to set either a variable or a field with the details from there: eg: <import value="net.sf.jasperreports.engine.data.*" /> <import value="com.ibas.domain.Service" /> <queryString><![CDATA[select s.type from AMT from service_t s where...]]></queryString> <field name="TYPE" class="com.ibas.domain.Service"/> <variable name="ENUMType" class="java.lang.String" resetType="Report" calculation="Nothing"> <variableExpression><![CDATA[$F{TYPE}.getLabel()]]></variableExpression> </variable> I think logically I should have access to the Class declarations, but I can't work out exactly how to do it? I hope this makes sense. Thanks Dianne
×
×
  • Create New...