Jump to content
JasperReports Library 7.0 is now available ×

rene.beck

Members
  • Posts

    25
  • Joined

  • Last visited

rene.beck's Achievements

Contributor

Contributor (5/14)

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

Recent Badges

1

Reputation

3

Community Answers

  1. i found a solution, i do it like this way new java.text.DecimalFormat("#,##0.###").format($F{BEST_PHY}).replace(",", "'") + " " + $F{EINHEIT_ME};
  2. Hi I must format a decimal with thousand and decimal seperator. Right now I do this like that new java.text.DecimalFormat("#,##0.###").format($F{BEST_PHY}) + " " + $F{EINHEIT_ME}; the decimal 104100.34 is then displayed as 104,100.34 but I need it this way 104'100.34 How can I do this? Regards René
  3. forget my post above, I just have to get multiple id's in my select in the report and it works as wanted
  4. Hi i have a report, lets call it wbz.jasper which take a id as parameter. If I have to print for example 5 wbz for different id, i call 5 times exporter.exportReport(). Since i let them run parallel, the order of printing is not quaranteed. Is there a way to 'load' the export with all the 5 wbz and then just execute exporter.exportReport() once? BR René
  5. Hi If I print a simple report on an Zebra ZT230, the printing starts to early and the beginning of the label is not on the paper. anybody has an idea? If I print the report in crystal reports, the label is printed properly. find attached the report and the output. René
  6. Hi from what I understood it ist only possible to have a list of values as a parameter if I use JasperSoft Server? i need something like this BR René
  7. hi all I have report where I have to print a customer logo. There are about 30 different logos (png files), depending on the data i have to display the corresponding image. what is the best solution for this? - a subreport with 30 bands and image on it, activating just the one band? - one image in the main report and selecting the corresponding image in the expression? BR René
  8. If I generate a report i get this for the images, the same appear for subreports (schb7vm-bbm1:celvsadm[]) /home/celvsadm/Beck/dist/scripts> anta_palettenflagge_pdf.sh 18:42:32.800 [main] DEBUG com.swisslog.antalis.genpdf.GenPdf - GenPdf starts with args [/home/celvsadm/Beck/dist/pdf/palettenflagge_beck.pdf, palettenflagge, 9482511, 1, 2033625439, 1, 1] 18:42:32.804 [main] DEBUG com.swisslog.antalis.genpdf.GenPdf - printPalettenflaggeReport start 18:42:32.805 [main] DEBUG com.swisslog.antalis.genpdf.GenPdf - Opening connection to jdbc:oracle:thin:@lpar8:1521:mldb 18:42:34.598 [main] DEBUG com.swisslog.antalis.genpdf.GenPdf - Connection opened 18:42:34.599 [main] DEBUG com.swisslog.antalis.genpdf.GenPdf - Compiling report reports/palettenflagge.jrxml 18:42:36.028 [main] DEBUG com.swisslog.antalis.genpdf.GenPdf - Compiling done 18:42:36.029 [main] DEBUG com.swisslog.antalis.genpdf.GenPdf - Creating Report /home/celvsadm/Beck/dist/pdf/palettenflagge_beck.pdf 18:42:36.423 [main] ERROR com.swisslog.antalis.genpdf.GenPdf - GenPdf fails with exception java.lang.RuntimeException: net.sf.jasperreports.engine.JRException: Byte data not found at: images/antalis.png. at com.swisslog.antalis.genpdf.GenPdf.print(GenPdf.java:461) ~[GenPdf.jar:SVN: 438417, Build: 2020-12-22T18:32:48] at com.swisslog.antalis.genpdf.GenPdf.printPalettenflaggeReport(GenPdf.java:321) ~[GenPdf.jar:SVN: 438417, Build: 2020-12-22T18:32:48] at com.swisslog.antalis.genpdf.GenPdf.run(GenPdf.java:134) ~[GenPdf.jar:SVN: 438417, Build: 2020-12-22T18:32:48] at com.swisslog.antalis.genpdf.GenPdf.main(GenPdf.java:67) ~[GenPdf.jar:SVN: 438417, Build: 2020-12-22T18:32:48] Caused by: net.sf.jasperreports.engine.JRException: Byte data not found at: images/antalis.png. the part in the report looks like this <detail> <band height="722" splitType="Stretch"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <image> <reportElement x="417" y="304" width="136" height="60" uuid="a431c58d-bdb6-49f2-bedb-7b93dd4dea1c"/> <imageExpression><![CDATA[($F{FSC_TYPE} == "M") ? "images/umweltlabel_m.png": ($F{FSC_TYPE} == "R") ? "images/umweltlabel_r.png" : "images/umweltlabel_r.png"]]></imageExpression> </image> <image> <reportElement x="383" y="44" width="164" height="89" uuid="1806ba55-7bb8-4b5d-9e38-f466a4647b88"/> <imageExpression><![CDATA["images/antalis.png"]]></imageExpression> </image> I run my reports on linux and all my images, reports, suberports are in the same directory, i even created a directory images with the images inside (schb7vm-bbm1:celvsadm[]) /home/celvsadm/Beck/dist/reports> ls -al total 904 drwxr-xr-x. 3 celvsadm weblogic 4096 Dec 22 18:45 . drwxr-xr-x. 9 celvsadm weblogic 4096 Dec 22 16:50 .. -rw-r--r--. 1 celvsadm weblogic 58441 Dec 15 13:59 antalis.png -rw-r--r--. 1 celvsadm weblogic 20981 Dec 22 16:24 beleg.jasper -rw-r--r--. 1 celvsadm weblogic 2776 Dec 15 13:54 beleg.jrxml drwxr-xr-x. 2 celvsadm weblogic 72 Dec 15 13:53 images -rw-r--r--. 1 celvsadm weblogic 3922 Dec 16 18:58 palettenflagge_empf.jrxml -rw-r--r--. 1 celvsadm weblogic 35298 Dec 22 18:42 palettenflagge.jasper -rw-r--r--. 1 celvsadm weblogic 11537 Dec 22 18:42 palettenflagge.jrxml -rw-r--r--. 1 celvsadm weblogic 21745 Dec 22 16:24 quadrant.jasper -rw-r--r--. 1 celvsadm weblogic 3478 Dec 15 13:54 quadrant.jrxml -rw-r--r--. 1 celvsadm weblogic 4070 Dec 22 16:23 sendelistedenner_empf.jrxml -rw-r--r--. 1 celvsadm weblogic 48359 Dec 22 18:23 sendelistedenner.jasper -rw-r--r--. 1 celvsadm weblogic 21443 Dec 22 18:23 sendelistedenner.jrxml -rwxrwxrwx. 1 celvsadm weblogic 43 Dec 14 11:27 switch_to_SansSerif.sh -rw-r--r--. 1 celvsadm weblogic 128417 Dec 15 13:59 umweltlabel_m.png -rw-r--r--. 1 celvsadm weblogic 154281 Dec 15 13:59 umweltlabel_r.png -rw-r--r--. 1 celvsadm weblogic 48231 Dec 22 16:24 versandlabel4x6.jasper -rw-r--r--. 1 celvsadm weblogic 19993 Dec 15 13:54 versandlabel4x6.jrxml -rw-r--r--. 1 celvsadm weblogic 47532 Dec 22 16:24 versandlabelA6.jasper -rw-r--r--. 1 celvsadm weblogic 19070 Dec 15 13:54 versandlabelA6.jrxml -rw-r--r--. 1 celvsadm weblogic 3681 Dec 15 13:54 versandlabel_abladestelle.jrxml -rw-r--r--. 1 celvsadm weblogic 21778 Dec 15 14:14 versandlabel_empf.jasper -rw-r--r--. 1 celvsadm weblogic 3500 Dec 15 13:54 versandlabel_empf.jrxml -rw-r--r--. 1 celvsadm weblogic 21287 Dec 15 14:14 versandlabel_etiknr.jasper -rw-r--r--. 1 celvsadm weblogic 3819 Dec 15 13:54 versandlabel_etiknr.jrxml -rw-r--r--. 1 celvsadm weblogic 49047 Dec 15 14:14 versandlabel.jasper -rw-r--r--. 1 celvsadm weblogic 22040 Dec 15 13:54 versandlabel.jrxml -rw-r--r--. 1 celvsadm weblogic 20398 Nov 30 17:56 versandlabel.jrxml.old -rw-r--r--. 1 celvsadm weblogic 54615 Dec 17 18:52 wbz.jasper -rw-r--r--. 1 celvsadm weblogic 22253 Dec 17 18:52 wbz.jrxml (schb7vm-bbm1:celvsadm[]) /home/celvsadm/Beck/dist/reports> ls -al images total 344 drwxr-xr-x. 2 celvsadm weblogic 72 Dec 15 13:53 . drwxr-xr-x. 3 celvsadm weblogic 4096 Dec 22 18:45 .. -rw-r--r--. 1 celvsadm weblogic 58441 Dec 15 10:23 antalis.png -rw-r--r--. 1 celvsadm weblogic 128417 Dec 15 10:24 umweltlabel_m.png -rw-r--r--. 1 celvsadm weblogic 154281 Dec 15 10:25 umweltlabel_r.png i switched recently from jasper 6.1 to 6.11. If I'm not wrong it worked with jasper 6.1. anybody has an idea? best rené
  9. Hi I'm migrating cystal reports to jasper reports. Regarding the formula on the fields in crystal, there is no such thing in jasper, except the expression on the fields. But this is not so powerful? Is there another way to implement more complex fomula/calcluation? BR René
  10. Hi is there any difference when it comes to performance if I do expressions in the jasper report compared to the case I write the expressions in the database (create a special view)? BR René
  11. in the subreport mand_id is also INTEGER <parameter name="MAND_ID" class="java.lang.Integer"> <parameterDescription><![CDATA[mand_id aus Hauptreport]]></parameterDescription> </parameter> even if I pass directly the parameter mand_id from the main report (which is also Integer) I get the same error, but only on linux. anyway, I found a workaround for my problem. I defined a Variable <variable name="mandIdInt" class="java.lang.Integer"> <variableExpression><![CDATA[new Integer(Integer.valueOf($P{mand_id}))]]></variableExpression> </variable> and pass this to the subreport. best rené
  12. Hi I have a parameter mand_id <parameter name="mand_id" class="java.lang.Integer"> <parameterDescription><![CDATA[MandId]]></parameterDescription> </parameter> and I pass this parameter to a subreport. <subreportParameter name="MAND_ID"> <subreportParameterExpression><![CDATA[new Integer(Integer.valueOf($P{mand_id}))]]></subreportParameterExpression> </subreportParameter> If I run this report on windows in the jaspersoft Studio, it runs perfect. runnning on linux I get this exception and I don't know how to fix. java.lang.RuntimeException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: new Integer(Integer.valueOf($P{mand_id})) at com.swisslog.antalis.genpdf.GenPdf.print(GenPdf.java:444) ~[GenPdf.jar:SVN: 436767, Build: 2020-12-09T16:22:26] at com.swisslog.antalis.genpdf.GenPdf.printVersandlabelReport(GenPdf.java:328) ~[GenPdf.jar:SVN: 436767, Build: 2020-12-09T16:22:26] at com.swisslog.antalis.genpdf.GenPdf.run(GenPdf.java:156) ~[GenPdf.jar:SVN: 436767, Build: 2020-12-09T16:22:26] at com.swisslog.antalis.genpdf.GenPdf.main(GenPdf.java:86) ~[GenPdf.jar:SVN: 436767, Build: 2020-12-09T16:22:26] Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: new Integer(Integer.valueOf($P{mand_id})) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:291) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:618) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:586) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRFillSubreport.getParameterValues(JRFillSubreport.java:686) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateParameterValues(JRFillSubreport.java:484) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:464) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:351) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:281) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:504) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2029) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:755) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:262) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:122) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:555) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:91) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:456) ~[jasperreports-6.1.1.jar:6.1.1] at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:863) ~[jasperreports-6.1.1.jar:6.1.1] at com.swisslog.antalis.genpdf.GenPdf.print(GenPdf.java:396) ~[GenPdf.jar:SVN: 436767, Build: 2020-12-09T16:22:26] ... 3 common frames omitted Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at versandlabel_1607957341918_955029.evaluate(versandlabel_1607957341918_955029:363) ~[na:na] at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:277) ~[jasperreports-6.1.1.jar:6.1.1] ... 21 common frames omitted
  13. i know my mistake is not put sub report by size band. Size band and sub ​​report must be the same size so that no blank page will come out.
  14. Hi i have a report which has 3 subreports on it. If I have all 3 subreport on then report I always get a blank page at the end. If have only 1 specific (versandlabel_empf) subreport on the report, the blank page is not generated. So it must be something wrong with my 2 other subreports. But I don't know what, I already checked, the page formats. Looks good for me. Anybody has an idea? BR René
  15. Hi I know there have been previous posts about the migration from crystal reports to jasper. But no one was helpfull. In one question there was a link http://community.jaspersoft.com/questions/994346/convert-crystal-report-jasper-report but I cant access this link. anybody has a suggestion how to do the migration easily? somehow export in crystal? BR René
×
×
  • Create New...