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

yuv

Members
  • Posts

    19
  • Joined

  • Last visited

yuv's Achievements

Apprentice

Apprentice (3/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Hello, If i am giving a List of Java Beans to Jasper to print as PDF. Now if my Bean itself Contains a List which i want to print in some key groups..How should i do that..? How should i refer to this list and an element in List..? Does someonoe have any clue..?
  2. hi jacasoj ..i dont see your post on this page which i received in mail i got : Hello Yuv! I think we both have (we'll, you had), the same problem. I've done just the same as you but it just displays a sympathetic 'null' in the variable print... If you can please post your scriptlet just the way you did, you'll help me plenty! Thanx :cheer: i dont know if you found the solution..still i am attaching my scriptlet here import net.sf.jasperreports.engine.JRDefaultScriptlet; import net.sf.jasperreports.engine.JRScriptletException; /** * This class to use User Defined Variables inside JasperReports * @author YVa * */ public class ReportScriptlet extends JRDefaultScriptlet { /** * To initialize the variable when report initializes */ public void beforeReportInit() throws JRScriptletException { Integer intVal = (Integer) this.getVariableValue("MyPageCounter"); if (intVal == null) { intVal = new Integer(1); } this.setVariableValue("MyPageCounter", intVal); } /** * We want to use this variable as if page counter , hence increment by one * here */ public void beforePageInit() throws JRScriptletException { Integer intVal = (Integer) this.getVariableValue("MyPageCounter"); this.setVariableValue("MyPageCounter", new Integer(intVal.intValue() + 1)); } }
  3. yuv wrote: I found the answer infact now...after debugs in JasperCode..hooohh.. So you need to keep following settings to make your variable work as if page counter [i dont know may be there other ways ..] define your variable with some name class name=java.lang.Integer reset type= Report Level increment type= None calculating type=System define Scriptlet to increment your variable => eg in scriptlet's beforeReportInit() method .. initialize your variable ...may be new Integer(0) in scriptlets beforePageInit() method increment your variable may be MyVariable=MyVariable+1 This should work as page counter. PS: scriptlet is must Thnx Yuv Post edited by: yuv, at: 2007/09/28 16:34
  4. hello, I am genberating a PDF report. In my report properties the size mentioned is Custom (portrait). [22.2 , 29.7] Now when i generate report it looks quite ok. However when i print this with settings A4..the report page shrinks from top and bottom by 5% each..i get 90% space to print..due to this there is blank space at Top and Bottom on printed pages.. Is it possible to remove this with same setup... why i am confused is i can seee all things well in PDF so does it shrinks to 90% when prints... i want to print on A4 pages only.. can someone help...? --Yuvaraj
  5. hello, I am using one custom variable to count the pages.=>myPageCounter I cannot use PAGE_NUMBER as i need to reset it after my group change. However when i print this varible on page..it doesnt seem to be calculated properly.. The varible is - ResetLevel =>Report Increment=>page calculation=>count variable expr=>new Integer($V{MyPageCounter}.intValue()+1) initial value expr=> new Integer(1) According to this i think counter should be increentd on each page... however ..It doesnt increment..It just iniitialize to 1 and on each page it comes 1. Now if i change ResetType => None then it increments by one however doesnt initialize to 1 but 0 [that is logic in JRCalculator]..one more strange thing is when my group changes PAGE_COUNTER resets to 1 and my counter increments by 3 [if its 8 then 11 directly ]:laugh: dont know why.. i modified varible to change few properties lie reset type to column etc..but invain...:( does anybody knows wht shd be done to resolve this...? Thnx, Yuv Post edited by: yuv, at: 2007/09/20 12:18
  6. hello, Is it possible to print records on Even / Odd pages as per some criteria...? also.. I am using PageNumber reset after keygroupchange... So is there any varibale which give me current page number in pdf document... eg. i have 10 pages in keygroup ..so next keygroup will start again from number 1...howvere pdf document will have page number = 11...is there any way to get this 11 number..? plz reply asap -yuv
  7. hello, i found <filterExpression> to filter the data. It works fine ..i have tested it for my report. However when i use PAGE_NUMBER varible in same expression...i think it filters all records ..only single page report generated.. :( My requirement is to print specific records(depends on single field value in my record)..on Even Page only.. [i also have reset page after keygroup change enabled] so i want to check in filter expression => if field from record is with some specific value and page number is even then only print this record.. Is it possible../ any alternate way available..? -Yuvaraj
  8. hi lucian .. can you plz provide me link..where i can find this.. bye d way i am developing report thr Ireport 1.3... but i dont see any option from where i can set FilterExpressions.. can you help.. -Yuv
  9. hello if i am using ireport 1.3 ...how should i put this thr it .. or is it an element property for report element or for every field.. any illustrationn will be of gr8 help -Yuv
  10. hi shreerish ..did u find a solution..? i am in similar kind of problem.. neverthless i do think setting expression for each field [also details part fields / subreport ] shd provide the solution...offcourse it will process tht record unnecessoriry.. let me know if u applied any fix to this prblm... Thnx, Yuv
  11. ***save heap*** use Boolean.valueOf(..) instead of new Boolean(..) :)
  12. ***save heap*** use Boolean.valueOf(..) instead of new Boolean(..) :)
  13. yuv wrote: Thnx Lucian. Its much better than before. However yet i get few gaps. I just foundout frm few posts that using rectangles will give better accuracy. I am on that. Thnx for your help! Yuvaraj I tried using Lines only and its quite good..i donot want to use blocks so i didnt use rectangles.. Thnx
  14. any idea how to do it..? from anyone .. thnx yuvaraj
×
×
  • Create New...