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

malliboy

Members
  • Posts

    10
  • Joined

  • Last visited

malliboy's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. Phew. I solved my problem. I was trying to run 2.0.4 code in 3.5.2. Silly me! And I never noticed it. :) Now it is running very fast!
  2. Thank you, I made the changes by placing the PageNumber code in master report as mentioned by you. Its is coming up fine now. But in our report we have a 'Cover Page'(first page) where in we shouldnt print this page nbr and also page nbr should start from next page (ie., 2nd page). How to impliment this? Thanks,Malliboy.
  3. Hi All, I have a main report and 3 sub reports. I want the page number to be displayed continuously across all the sub reports in ‘Page X of Y format’, for which I am using the below code in each of the subreports. <textField> <reportElement x="627" y="11" width="49" height="15"/> <textElement> <font isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField evaluationTime="Report"> <reportElement x="671" y="11" width="31" height="15"/> <textElement> <font isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[" of "+$V{PAGE_NUMBER}]]></textFieldExpression> </textField> But unfortunately the page number is being reseted while going from 1st subreport to 2nd, and 3rd. Any help regarding this matter is appreciated. Thanks, Malliboy.
  4. If you use a List or a Collection, we can refer it only by the index. I was looking for a key-value pair. Yes, adding them to the 'parameters' hashmap serves the purpose, but again, if I need to pass 100 strings, I need to explicitly include the parameters in the jrxml. I was looking for a solution and found one - Another hashmap within 'parameters'. HashMap myMap = new HashMap(); myMap.put("1", "A"); myMap.put("2", "B"); myMap.put("3", "C"); Map parameters = new HashMap(); parameters.put("myMap", myMap); In the jrxml, fetch values using '$P{myMap}.get("1")'. The advantage is that we don't to specify A, B and C in the parameter section of the jrxml. Looks like anything - Tree, Map can be used. Hope that helped. :)
  5. To pass parameters, I can do the following. Map parameters = new HashMap(); parameters.put("imageDir", imageDir); What if I wanted to pass 100 strings? Do I need to write 100 statements like the one above? Or can I pass them as a list or something? If so, how do I access it from my jrxml? Thanks, Malliboy.
  6. Fill time - Answer to ChristophLeser's question. Post Edited by malliboy at 07/30/2009 12:16
  7. I'd like to reopen my question. Let me rephrase the whole thing. Hope Jinal and I are talking about the same thing. :( Hi All, I\'m trying to replace my project\'s reporting tool with JasperReports. Here are some quick details - Weblogic 8.1, Solaris, jdk 1.4.2. Things are working. I can create reports in my environment. The problem is with the performance. I tried the same thing in Windows; it works like lightning. In UNIX, it is painfully slow. I took the liberty to put SOPs in JasperReports library files and figured out where it is getting stuck. In JRFillElementContainer.prepareElements there is a call to JRFillElement.prepare(). Let me put down that piece of code for your reference. *************** tmpWillOverflow = element.prepare( availableHeight + getElementFirstY(element), isOverflow ) || tmpWillOverflow; ************** I kept experimenting with JRFillElement.prepare. Commenting out stuff etc. I put an SOP just before the 'return false;' statement. I guess it is returning from the function pretty fast. But the statement I've pasted above is taking a LOT of time! :( It runs fast in Windows and as standalone program in UNIX. The problem is when I bring in Weblogic into the picture. Any clue? Thanks, Malliboy.
  8. Hi All, I'm trying to replace my project's reporting tool with JasperReports. Here are some quick details - Weblogic 8.1, Solaris, jdk 1.4.2. Things are working. I can create reports in my environment. The problem is with the performance. I tried the same thing in Windows; it works like lightning. In UNIX, it is painfully slow. I took the liberty to put SOPs in JasperReports library files and figured out where it is getting stuck. In JRFillElementContainer.prepareElements there is a call to JRFillElement.prepare(). Let me put down that piece of code for your reference. *************** tmpWillOverflow = element.prepareme( availableHeight + getElementFirstY(element), isOverflow ) || tmpWillOverflow; ************** I kept experimenting with JRFillElement.prepare... commenting out stuff etc. Finally I made another method with exactly the same signature and body (obviously a different name) and changed the calling method. And voila!! It worked just as fast as it did in Windows. From my analysis, it seems that the above is the only point in the whole report generation process which is taking time. Does anyone have a clue? Because of this, what should take 15 seconds takes 10 minutes! A mere change in the function name seems to have done the trick! Thanks, Malliboy. Post Edited by malliboy at 07/22/2009 06:51 Post Edited by malliboy at 07/22/2009 06:54
×
×
  • Create New...