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

soham

Members
  • Posts

    21
  • Joined

  • Last visited

soham's Achievements

Explorer

Explorer (4/14)

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

Recent Badges

0

Reputation

  1. soham

    Bug?

    Hi, Mine is not a upgrade. I did a fresh installation of JasperReports server 4.1 on Linux, and have the exact same problem. The ad hoc reports runs fine by itself. But, the dashboard has that "The report is empty frame" even when there is data. I doubt if I can use that buildomatic approach you mentioned as this is not an upgrade. Is there any other way we could resolve this. Please suggest.
  2. We had to upgrade from 3.5.0 to 3.5.3 to resolve our build failures.
  3. Code:If i understand it right, you are trying to add two variables returned from sub reports in another variable which is not possible as far as i know. But, the solution to your problem would be to return those two totals directly to a new variable by using the CalculationType as Sum in your returnValueExpression. HTH Naveen
  4. Hi I think Maven does not bring all the dependencies of JasperReports to your classpath as the pom.xml of JasperReports has some of the dependencies with optional attribute as true. The reason could be - we require only few dependencies to be on our classpath based on the JasperReport features we use in the application. See the pom here. http://mirrors.ibiblio.org/pub/mirrors/maven2/jasperreports/jasperreports/3.5.3/jasperreports-3.5.3.pom So, for all the dependencies where the optional attribute is true in the JasperReport's POM.xml, you need to add that dependency as direct dependency in the POM.xml of your application. In your case, you probably need to add the POI dependency(shown below) as direct dependency to your application's pom since you are either reading or writing content to Excel file. HTH, Naveen Code:<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.2-FINAL</version> </dependency>
  5. Hi, I know there are several posts related to PDF wrapping. But, none "completely" resolve my issue. I have a text field which mostly wraps to two or three lines which we do not require. So, i uncheck the option "StrechWithOverflow" which kind of truncates the remaining part. While wrapping, the engine wraps by word which is the problem for me. I need it to wrap by character - To fit as much as content of the text field(partial words). The solution i tried is to set the custom element property net.sf.jasperreports.text.truncate.at.char = true This actually works as expected when run using Empty Data source in IReport. But, it does not truncate for "some" of the records(text field is in detail) when the report is in the application. We do not have any custom JR properties file defined in application. Actual Data PDF from IReport PDF from Application Notes SOMETHING COMMUNCATION INC SOMETHING COMMU SOMETHING COMMU Wraps correctly(Wraps by character) FIRE EXTINGUISHER INC FIRE EXTINGUISHE FIRE wraps by word in app THE JOHNNY S. JOHN EYE CLINIC THE JHONNY S. J THE JHONNY S. wraps by word in app Looking at the documentation of this property(in IReport ), it does say that "When text element is rendered on multiple lines, line break still occurs at word boundaries. That said in documentation, i am not sure why IReport did not wrap by word in the second record of the above example. I came up with a solution by printing the first X characters, but, that is the least preferred option for me. Any other way to achieve wrap by character? I can create a feature request if this cannot be done(Not sure how much this helps others). Thanks, Naveen Post Edited by soham at 01/28/2010 22:01
  6. lucianc Wrote: soham Wrote: When there is no data for a sub report(No pages on no data), i am trying to return the GrandTotal as 0.00, but, it returns null. Is there anyway i could return 0.00? Try to set 0 as initialValueExpression for the subreport variable. I am already keeping the initialValueExpession as 0.00(report language groovy). For some reason, the subreport seems to override the initialvalueExpression and replaces it with null. I also noticed that if i set to nodata type to "AllSectionsNoDetail", then, the engine returns the 0.00. Also, i was not able to store the addition of SR totals into a masterreport variable(tried System and nothing Calc types). I could print the additon using a text field in the title band. But, cannot put the same expression in a variable and use that variable to print in the same location. I need to use this grand total repeatedly in the master report, and i have 5 subreports. If i can't store this in a variable, i will have to use the expression $V{1}+$V{2}+$V{3}+$V{4}+${5} in several locations such as conditional styles etc. Using variables with values returned from subreport in other variables' expression will not work. What you can do is to have total variable where you sum the values at the moment they are returned from subreports. See below. Regards, Lucian Code: Sounds great. I will try this. Never thought about the calculation attribute of return value. Thanks, Naveen
  7. I have a master report which should add all the sub report totals. So, each sub report returns its total to the main report. Here is the master report's layout. Title band : SR1total variable( Calculation type - System, Reset type - Report) SR2total variable(Same as above) Detail band: SR1(Returning GrandTotal to SR1total); GrandTotal's Calulation type is Sum with initialValue as 0.00 SR2(Returning GrandTotal to SR2total); GrandTotal's Calulation type is Sum with initialValue as 0.00 When there is no data for a sub report(No pages on no data), i am trying to return the GrandTotal as 0.00, but, it returns null. Is there anyway i could return 0.00? Also, i was not able to store the addition of SR totals into a masterreport variable(tried System and nothing Calc types). I could print the additon using a text field in the title band. But, cannot put the same expression in a variable and use that variable to print in the same location. I need to use this grand total repeatedly in the master report, and i have 5 subreports. If i can't store this in a variable, i will have to use the expression $V{1}+$V{2}+$V{3}+$V{4}+${5} in several locations such as conditional styles etc. JR version: 3.5.0 IReport version: 2.0.5 Report language: Groovy Any help would be appreciated. Thanks --Naveen
  8. Hello all, Can any latest IReport version be used for designing reports for older version of JasperReports?. If i need to design a report for JasperReport 3.1 version, do i need to set any option in IReport 3.6.2. We cannot make use of latest IReport version if it is not backward compatible until JR 2.0.5 version. Please suggest. -- Naveen
  9. I think you could just recompile using the older version of IReport. If your application has JaspeReport version 3.6.1, then you can use IReport 3.6.1 , otherwise you can use any older version of IReport lower than the JasperReport version you have. HTH Naveen
  10. Hi, I need to design the reports for JR 2.x versions and JR 3.x versions. Currently, I am using IReport 2.x for both JR versions which is good and works fine. The problem is when i compile with latest IReport version and upload it to a application which has minor JR version. My question - How would i use latest version of IReport to generate compiled reports(as we directly use *.jasper files in our application) for older versions of JR. Thanks, Naveen
  11. Hello all, Our reports use some Java classes(lets say for some complex formatting ) in the expressions of text fields. The report compiles successfully using IReport( 2.0.5 ). But, when we run the report(in IReport) it provides the specified exception. Does this mean IReport is missing some required jars that need to be in classpath. Do i really need an additional jar to run my report(JDOM?) apart from what exists in the Ireport's lib directory. If so, which version of JDOM is compatible with groovy-all-1.0? Everything is fine when the report language is set to Java. Thanks, Naveen Code:Exception:java.lang.NoClassDefFoundError: org/jdom/Element at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at groovy.lang.MetaClassImpl$8.run(MetaClassImpl.java:1552) at java.security.AccessController.doPrivileged(Native Method) at groovy.lang.MetaClassImpl.addMethods(MetaClassImpl.java:1550) at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:149) at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:1879) at groovy.lang.MetaClassRegistry.getMetaClass(MetaClassRegistry.java:136) at org.codehaus.groovy.runtime.Invoker.invokeConstructorOf(Invoker.java:162) at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:140) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:243) at LogSumByLogDate_1250720161515_380390.evaluate(calculator_LogSumByLogDate_1250720161515_380390:249) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:186) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:537) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:505) at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:813) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:365) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:352) 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.fillTitle(JRVerticalFiller.java:311) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:247) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:895) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:798) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:947) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.jdom.Element at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 31 more
  12. Hello all, Our reports use some Java classes(lets say for some complex formatting ) in the expressions of text fields. When we try to set the report language to Groovy, the expression validation complains with below error message. However, the report compiles successfully using IReport( 2.0.5 ). But, when we run the report it provides the specified exception. Does this mean IReport is missing some required jars OR Did i configure the IReport incorrectly? Everything is fine when the report language is set to Java. I am not bothered about the expression validation as long as the report compiles and runs successfully. Any suggestions? Thanks, Naveen Code:Error message:startup failed, Script1.groovy: 1: unable to resolve class MyClass @ line 1, column 43.1 error-----------------------------------------------Exception:java.lang.NoClassDefFoundError: org/jdom/Element at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at groovy.lang.MetaClassImpl$8.run(MetaClassImpl.java:1552) at java.security.AccessController.doPrivileged(Native Method) at groovy.lang.MetaClassImpl.addMethods(MetaClassImpl.java:1550) at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:149) at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:1879) at groovy.lang.MetaClassRegistry.getMetaClass(MetaClassRegistry.java:136) at org.codehaus.groovy.runtime.Invoker.invokeConstructorOf(Invoker.java:162) at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:140) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:243) at LogSumByLogDate_1250720161515_380390.evaluate(calculator_LogSumByLogDate_1250720161515_380390:249) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:186) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:537) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:505) at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:813) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:365) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:352) 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.fillTitle(JRVerticalFiller.java:311) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:247) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:895) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:798) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:947) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.jdom.Element at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 31 more
  13. Hello all, I am using IReport 2.0.5 and was wondering if there is anyway to default a parameter(with $P!{parm} syntax) in the SQL Query window of the report wizard. So, whenever a user creates a report using report wizard, he will see that parameter and can decide to add another piece of the query. For ex: The parameter in the sql query window should be defaulted to $P!{DefaultJoinsAndWhereClause} So, the user will be adding Select employid, name from employee $P!{DefaultJoinsAndWhereClause} in the SQL query window of the wizard. Is this possible in this version or any newer versions? Thanks, Naveen Post Edited by soham at 08/18/2009 14:11
  14. So, I was doing a wild goose chase then. Anyways, CBox and Lucian, appreciate your responses. It would be nice if we could have that feature at the earliest. Not sure if it helps anybody checking this post, I was able to fix my problem while exporting to XLS(only) by applying the pattern as $#,##0.00 ;[Red]$ (#,##0.00) and setting the custom element property(using IReport), net.sf.jasperreports.print.keep.full.text, of the amount field to true. This solution was posted by someone in the forum. Thanks, Naveen
  15. Hello, I have a requirement to display currency(a BigDecimal) in red with parenthesis when the respective amount is negative. I am able to achieve it by creating a conditional style and applying the pattern as $#,##0.00 ;$ (#,##0.00). However, I have several Fields(of amount/currency type) for which I have to this conditional style. As the example specified in the code section, for each field, I am creating a conditional style. Now, I have more than 10 fields for which I have to create 10 conditional styles. For all the fields, the requirement is same(red in parenthesis if negative). And, each of them is a BigDecimal. Also, for each field I have a corresponding total field in the pagefooter section. For instance a $V{TotalAmount1} for $F{Amount1}. So, I created a new conditional style for the variable. Altogether, there will be 20 conditinal styles for 10 fields and their respective 10 totals. Is there any way I could create one style(where I do not have to refer the field name in the condition like $F{Amount1}.intValue <0 ) and apply that style to all the 10 Fields? In our application we display the report in HTML and export it to several formats such as PDF, XLS and CSV. I would to like display this red amounts in PDF, XLS and HTML. Could anybody suggest if there is any alternative way of doing this apart from creating conditinal style for each field. Thanks, Naveen Code: Post Edited by Naveen K at 12/11/08 19:35 Post Edited by Naveen K at 12/11/08 19:56
×
×
  • Create New...