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

giobby

Members
  • Posts

    42
  • 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 giobby

  1. try to give the same expression ("new Boolean($F{yourData} != null)") also to the property "Print when expression" of the "color" label... it should work and automatically resize the height of the column... maybe... Giovanni ...La puissance est rien sans controle...
  2. hi, i'm not very able with english (and also with reports) so i can't understand very well your first problem but we should consider that the detail band automatically resize itself by contents (the recordset). Otherwise you should wait for another one's reply (more expert then me). For your second problem, instead, you should find in your data textfield properties the property "Print When Expression" and write like expression something like this: "new Boolean($F{yourData} != null)". I hope to help you bye Giovanni ...La puissance est rien sans controle...
  3. understand thanks Giovanni ...La puissance est rien sans controle...
  4. Hi jljunked, first of all sorry for my scholastic english... i'm new with jasper reports but i try to help you: I've tried your code in a project and it works (not in a servlet... and idon't know if is the same thing). The only difference with that you've done is the way to compile. You have used the "JasperCompileManager.compileReportToFile() " method and i've used the "JRXmlLoader.load() method. Have a look at what i've done: String fileJrxml="C:/<windows path>/Results.jrxml"; InputStream is = new InputStream(fileJrxml); //if the path is relative (the jrxml file is in your project) you should use "this.class.getResourceAsStream(fileJrxml)"; JasperReport jr = this.compile(is); //see the attacched code to have a look at this method. JasperPrint jasperPrint= JasperFillManager.fillReport(jr, parameters,<your JRDataSource>) byte[] report = JasperExportManager.exportReportToPdf(jasperPrint); FileOutputStream fos = new FileOutputStream("C:test.pdf"); fos.write(report); fos.flush(); fos.close(); I hope this help you Giovanni ...La puissance est rien sans controle... Code://in this method, to compile, i've used the "JRXmlLoader.load()" method public static JasperReport compile(InputStream is) { JasperReport jasperReport = null; try { JasperDesign jasperDesign = JRXmlLoader.load(is); JRJavacCompiler compiler = new JRJavacCompiler(); jasperReport = compiler.compileReport(jasperDesign); } catch (JRException e) { throw new RuntimeException(e.fillInStackTrace()); } return jasperReport; } Post Edited by giobby at 10/15/2009 09:48
  5. wonderful! this is more clear than my solution... and also allows me to deal the number the variables that i want. For example: new BigDecimal( ( $V{varMain}==null ? 0 : $V{varMain}.doubleValue() ) + ( $V{varSub1}==null ? 0 : $V{varSub}.doubleValue() ) + ( $V{varSub2}==null ? 0 : $V{varSub}.doubleValue() ) + ( $V{varSub...n}==null ? 0 : $V{varSub}.doubleValue() ) ) is true? And also another question: can I do the same thing declaring "new Double(...)" instead "newBigDecimal(...)" at the beginning to avoid to write ".double value()" all the times (assuming that the type of my vars is Double)? ps. I ask this because i can't do any attemps now. All the project are in another place... thanks a lot! Giovanni ...La puissance est rien sans controle...
  6. hi denys i'm not able with english and also not able with reports... but if i've understand what is your problem (and humbly i've to say that i'm not sure...) you should only put your "total" variable in a text field situated in the summary band and not in details one. but if you want to be sure to fix the problem you should waiting for another one's reply (...another one more expert than me) Giovanni ...La puissance est rien sans controle...
  7. Hi everybody, I must doing this operation in a text field: varMain //from main report varSub //from sub report if (varMain != null && varSub !=null) then print varMain.add(varSub) else if (varMain != null && varSub ==null) then print varMain else if (varMain == null && varSub !=null) then print varSub else print null I tried with this solution... $V{varMain} !=null ? new BigDecimal($V{varMain}.toString()).add(($V{varSub} ==null ? new BigDecimal("0") : new BigDecimal($V{varSub}.toString()))) : ($V{varSub} ==null ? null : new BigDecimal($V{varSub}.toString())) ...and it works. Question: Is there a less complicated way to do this kind of operations (especially when the variables to deal are more than 2)? thanks in advance Giovanni ...La puissance est rien sans controle... Post Edited by giobby at 10/14/2009 15:01
  8. thanks for the suggestion Giovanni ...La puissance est rien sans controle...
  9. sorry... Anyway this matter is interesting also for me, so i'll look for something to solve this fix. Au revoir Giovanni ...La puissance est rien sans controle...
  10. Hi, theese are two examples to print a report created with iReport in your servlet. The first print the pdf on your file system. The second print the pdf directly on browser Giovanni ...La puissance est rien sans controle... Code: It helped me. Post Edited by giobby at 10/13/2009 13:25
  11. Hi guys first of all thanks so much for creating this useful forum... Now i can proceed quickly with my job :-). THE PROBLEM: (I've searched a lot but I haven't found nothing about this matter). I met a problem creating an external param which its type is java.lang.Number. THE ERROR IS: "com.jaspersoft.ireport.designer.errorhandler.ProblemItem@1cbf56d Parameter type not supported in query : numOrdini class java.lang.Number net.sf.jasperreports.engine.design.JRDesignQuery@79a8a8" If i put another kind of data type it works... the problem is that i can't change the type on my db... Please help me Giovanni ...La puissance est rien sans controle... Post Edited by giobby at 10/12/2009 10:12 Post Edited by giobby at 10/12/2009 10:13
  12. thanks for the help Giovanni ...La puissance est rien sans controle...
  13. please can someone answer at least to the second question (about differences between details/summary bands an their ralation whit subreports)? Giovanni ...La puissance est rien sans controle...
  14. Hi guys, i'm using i report for 1 week... and after reading a lot of discussions in this (and others) forum i can understand that is complicated make not basilar operations (i met several problems just for reading values from a subreport) . Questions: 1-Someone may help me to find examples to learn all about groups, expressions and the correct use of details/summary bands (and their differrences in relation with subreports)? 2- Only to confirm a matter: when i put a sub report in detail band the result is: ------------------------------------------------------detail band--------------------------------------------------- 1st record->main rpt 1st record-> sub rpt 2nd record->sub rpt ... 2nd record->main rpt 1st record-> sub rpt 2nd record->sub rpt ... 3rd record->main rpt ... ------------------------------------------------------end detail band--------------------------------------------------- is true? And when i want to append the result of a sub report (whitout making an union of queries) i must put the sub in the summary band to obtain: ------------------------------------------------------detail band--------------------------------------------------- 1st record->main rpt 2nd record->main rpt ------------------------------------------------------end detail band--------------------------------------------------- ------------------------------------------------------summary band--------------------------------------------------- 1st record-> sub rpt 2nd record->sub rpt ... ------------------------------------------------------end summary band--------------------------------------------------- isn't true? THANKS Giovanni ...La puissance est rien sans controle...
  15. Hi, trough the registration at the site i've found how to solve the problem... I post the links of the two discussion that helped me to solve the matter. I hope to help the new entries in this complicated realty http://jasperforge.com/plugins/espforum/view.php?group_id=83&forumid=101&topicid=28040 http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=638
  16. Hi, i'm new, but in my case the best way was to dispose all the reports NESTED in the summary band and before the report icon i put an interrupt (break) line also in the summary
  17. Hi everybody, i'm a junior developer and I use Ireport since 1 week... after a full immersion, now I can create report of medium difficulty... but now I meet the problem of return values from a subreport to report main... Please, some one can post me an url of a discussion where the problem is 'clearly' solved? I've searched every where for 2 days but i can't understand the matter of the expressions... P.S. Sorry... i wrote 'clearly' because i'm a littlle bit dummy
×
×
  • Create New...