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

abhimanyu.prasad

Members
  • Posts

    15
  • Joined

  • Last visited

abhimanyu.prasad's Achievements

  1. Hi All, I need to display the data in specific format. Column 1Column 2Column 3Row 1 Cell 1Row 1 Cell 2Row 1 Cell 3Row 2 Cell 2Row 2 Cell 3 The column1 have only one value means there will be no data for row greater than 1. For column2 and column3 the data will increased or decreased dynamically. It will come from database. Means column2 and column3 maps to the columns of the database while column1 is not. The requirement is that i need borders for column2 and column3 values and the width of value of column1 (row1 cell1) should be dynamic i.e. it should increase according to the data of column2 and 3. As the jasper will not have concept call dynamic width. Thanks in advance.
  2. Hi All. I have image which need to display on each page.But i can not put this image into page header section as every page has some different text on it.So i have out it into band section. This works fine if my data limits to single page but if dynamic data goes to the next page.The next page not having image. How to fix this problem..? Please find the attachement image for more understanding. Thanks in advance.
  3. I have the XML as datasource, <RescueInfo><aprRate>43</aprRate><planName>WLPLan101</planName><RuleDetails dataStr="list"><RescueValue_Pesos>96.44</RescueValue_Pesos><Status>Success</Status><YearValue>1</YearValue><CumulativePremium>3016.2</CumulativePremium><RuleName>RescueValueFirstYear</RuleName><AnnualPremium>3016.2</AnnualPremium><FaceAmt>11221</FaceAmt><StatusCode>1</StatusCode></RuleDetails><RuleDetails dataStr="list"><RescueValue_Pesos>96.6</RescueValue_Pesos><Status>Success</Status><YearValue>2</YearValue><CumulativePremium>7329.37</CumulativePremium><RuleName>RescueValueSubsequentYearAge_2</RuleName><AnnualPremium>4313.17</AnnualPremium><FaceAmt>16046.03</FaceAmt><StatusCode>1</StatusCode></RuleDetails></RescueInfo><RescueInfo><aprRate>45</aprRate><planName>WLPLan102</planName><RuleDetails dataStr="list"><RescueValue_Pesos>96.44</RescueValue_Pesos><Status>Success</Status><YearValue>3</YearValue><CumulativePremium>5555.2</CumulativePremium><RuleName>RescueValueFirstYear</RuleName><AnnualPremium>5555.2</AnnualPremium><FaceAmt>55555</FaceAmt><StatusCode>1</StatusCode></RuleDetails><RuleDetails dataStr="list"><RescueValue_Pesos>96.6</RescueValue_Pesos><Status>Success</Status><YearValue>4</YearValue><CumulativePremium>6666.37</CumulativePremium><RuleName>RescueValueSubsequentYearAge_2</RuleName><AnnualPremium>66666.17</AnnualPremium><FaceAmt>6666.03</FaceAmt><StatusCode>1</StatusCode></RuleDetails></RescueInfo> The report showing,plan1yearValue of ruletag1yearValue of ruletag2yearValue of ruletag3yearValue of ruletag4plan2yearValue of ruletag1yearValue of ruletag2yearValue of ruletag3yearValue of ruletag4 The op should be, plan1yearValue of ruletag1yearValue of ruletag2plan2yearValue of ruletag3yearValue of ruletag4 I have made the ruledetails node as record node and added the year as node with creation of dataset.
  4. You can go through the article posted at the following link: http://www.jcombat.com/spring/adding-unicode-font-support-to-jasper-report-generation
  5. Find the process at the following link: http://www.jcombat.com/spring/adding-unicode-font-support-to-jasper-report-generation
  6. Could you please share the jrxml segment where you are displaying the image?
  7. String sourceFileName = "D://../../DemoReportPT.jrxml"; JasperCompileManager.compileReportToFile(sourceFileName);[/code]The .jasper file gets generated at the same location with the same name as your jrxml file, unless and until you have not specified the name explicitly in the jrxml file.
  8. You can use: <jasperReport ... whenNoDataType="AllSectionsNoDetail" ...>[/code]This will never show up the bands in <detail> if the datasource is empty or there are no existing rows. or use <printWhenExpression> at the band level.
  9. Replace: JasperDesign design = JRXmlLoader.load(input);[/code]with: JasperDesign design = JRXmlLoader.load(reportFile);[/code]Hope this works.
  10. Hi llokk2007, Modify your code flow to something like below: JasperDesign jasperDesign = JRXmlLoader.load(sourceFileName);JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);JRXmlDataSource xmlDataSource = new JRXmlDataSource(inputStream, jasperReport.getQuery().getText());JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, xmlDataSource);JasperExportManager.exportReportToPdfFile(jasperPrint, resultpath);[/code]If you are good with your jrxml, then this will definitely do it for you. Let me know if you still face the same issue.
  11. Probably, give a try with some other unicode font. Hopefully, that will work.
  12. Could you please share how you are retrieving the values in the JRXML?
  13. Hey thanks a lot, Ben. Actually, I had tried with the double quotes, but I was always evaluating it under <variableexpression>. The same thing worked if we do the same inside <initialValueExpression>: <variable name="encImage" class="java.lang.String"> <initialValueExpression><![CDATA["iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAA…"]]></variable>[/code]The thing striked as soon as I saw your reply. Regards, Abhimanyu
  14. This doesn't work now, if it worked ever before. It gives compilation error with base64 data in jrxml.
  15. I have already gone though the instructions provided at http://community.jaspersoft.com/questions/523992/tip-embedding-images-reports But, when I declare a variable in my JRXML file something like: <variable name="image" class="java.lang.String"> <variableExpression> <![CDATA[iVBORw0KGgoAAAAN2TywgvThXo6zmQqSkeB29keB9/JGVlWmyjrJu5yV7vvbwVfZpMt6baX2QZZVhw1rB1cWfZLQN3dMKWddRRY6t9N1ncr6dI4uSfRDossO1g8/ZqkJ8sKOZKQrKj5/LTNuKHkha53kxXF33bSqHdnyEXWVOurL+B6suSKZ5xvPFlRUh6V1hsx7ydr54HF0+/7i5pZ1tQgLr/a7cmyXsXQYVlRthFIl/l8Z91+eEdZUbr1yKI+WADOsqYJ/fKPBnxZYgQd5+aArI3ymvWNbfchzz1lRXEefFpeHEWpb/05ii9LzBTjZnXqPTfse2tSuQU21krDeWp8Ttbrniw50TXKz/04Rp1+6PTl1h861eZlIbEPmelxRNwu18yHBl1ZvfoqAw9x0+JTW81fVF2EJLIKUGVWTDRFnPKIbDj9ztMyD5Zbj5DDLWsy1F7+CZ32g18v1tiMj3WTFf3SOU82XvqxvqgPCOa0E5t3EVbSZ19kzckfXvDjzAtYsvpXup2xAVmCTCyufkw/KJeHkrdm8P+EblZ+mwZk/xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANyRfwA6ydK0t2f0GgAAAABJRU5ErkJggg==]]> </variableExpression> </variable> [/code] I always get compilation errors. Can anyone suggest me any solution for this? Thanks
×
×
  • Create New...