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

jasperbox

Members
  • Posts

    25
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by jasperbox

  1. I'm able to produce the jasper report in PDF format. Now I want to export to CSV format and I'm just using the same Jasper File. I made the changes to use the JasperReportCSVView instead of JasperReportPdfView, and I could produce the CSV result too. However, I realize the numbers are not aligning in the correct column. Any ideas to customize it to make it better? Please advise. thanks!!
  2. I tried to make the dynamic timeline based on the current month, but I'm not sure how to do that in ireport. any ideas? thanks
  3. I tried to make the dynamic timeline based on the current month, but I'm not sure how to do that in ireport. any ideas? thanks
  4. How to control the file name when saving the PDF to the local machine? When I launch the PDF file, the URL becomes http://myserver:8080/studentFinancialReportPdf.do?studentId=437 However, when the users try to save a copy of the PDF to the local machine, the file name is still the same as studentFinancialReportPdf.pdf. Any ideas on the Jasper Report API to control the file name that I want to save? Thanks
  5. I just ran into the following out of memory problem for running jasper. I googled it and people said to increase the heap size. Now JVM heap size set to 2GB. Now I just ran 1 report, and sometimes got the memory error. The users even want to integrate multiple people's reports in 1 SINGLE PDF file. If 1 report got problem, then it's a problem. any other suggestions? java.lang.OutOfMemoryError: PermGen space at com.lowagie.text.pdf.PdfWriter.(Unknown Source) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:464) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:363) at Thanks in advance!!
  6. I have the following text fields (field1,2,3) line by line, but some text fields maybe empty and my goal is NOT to have the gap if the one of the field is empty. field1 field2 field3 I already set the "position type: float" and I thought this is the only property that I need. I also set "remove line when blank ." However, it still have gap. I'm not sure about the stretch type. Now it is set to relative to band height. There are no stretch or relative to tallest object any ideas? Thanks a lot in advance!! I'm so frustrated and need demo tomorrow.....
  7. What's the correct way to float the text fields? I always set the following properties, but looks like sometimes not working well. I'm not sure about the usage of streth type. position type: float stretch type: no stretch stretch with overflow
  8. thanks Rajendra. I'm doing multiple reports (same report but multiple users. i.e. 1 user has 1 report) in 1 PDF. In iReport Designer, I put the page break command on the last page footer. I expected it will produce a page break after producing each user report, but it didn't and just continue for the next user report afterwards and no gap. I have no idea what went wrong now.
  9. The text fields are working and float. However, it's funny that the static texts not help, it still remain in the same position even I do the following properties. position type: float stretch type: no stretch any ideas? thanks!!
  10. I'd like to have the page break onn the last page footer, as the same PDF output can have multiple reports in it. Each report can begin with the page break. I have the following code but still displays the second report on the same page. Any ideas? thanks!! <lastPageFooter> <band height="50"> <break> <reportElement x="0" y="31" width="100" height="1"/> </break> </band> </lastPageFooter>
  11. I have the comment box text field, and below there are other text fields too. I already put the 'Stretch with Overflow' property in the comment box text field, it is able to overflow when there are more text values. However, it is overlapping the text fields in below. any ideas how to solve this? thanks so much!!
  12. I have the comment box implemented with the rectangle box, and inside with the text field. The java comment field has the '\n' for the new line, but it still shows '\n' in the pdf output. any ideas what's the correct way to produce the new line in the text field? thanks so much!!
  13. I'm trying to figure out the textField Expression on the font style based on the field value. I have the 2 text fields (field1 and field2) , and all I want is to put the logic that if field1 value is 'ADD', then the font of field2 value will be bold and italic. Now I hardcode the field2 value as bold and italic. I have no idea how to put this expression to put in this scenario: ( <condition> ? exp1 : exp2 ). Any ideas? Thanks so much!!! <textField isBlankWhenNull="true"> <reportElement x="91" y="0" width="28" height="15"/> <box> <pen lineWidth="0.25"/> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{field1}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="128" y="0" width="22" height="15"/> <box> <pen lineWidth="0.25"/> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement textAlignment="Center"> <font isBold="true" isItalic="true"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{field2}]]></textFieldExpression> </textField>
  14. thanks sanda. I tried again by selecting font 'DejaVu Sans' and text property \u2713, but it displays \u2713 instead of check mark. I wonder if the highlighted part is correct. <staticText> <reportElement x="464" y="0" width="100" height="20"/> <textElement> <font fontName="DejaVu Sans" /> </textElement> <text><![CDATA[\u2713]]></text> </staticText>
  15. Hi sanda, In iReport Designer, I put the static text properties \u2713, and what should the true type font be? I tried different ones but still doesn't show the check mark. Thanks again!!
  16. If the length of a text field we designed in ireport is 20 characters, but the length of the text field exceeds 20 characters, it seems the jasper report will truncate the EXTRA CHARACTERS automatically for me. I want to know if this is always the case? If this is the case, I don't need to do anything on the java side then? When I tried the date if the field length is too short, it seems doesn't display on the pdf. thanks so much!!
  17. Does iReport support check mark character? I tried to put the value '/u0033' in the text field as suggested when I googled. However, it didn't work. I tried to put the image but didn't show up too. Any ideas or workarounds? thanks so much!!
  18. I have the master report with a subreport and then a page footer. If there is no data in the subreport, it will leaves a big whitespace gap. I set 'Remove line when Blank' for the subreport properties but doesn't help. For the subreport properties, I set the 'No Data Section' for 'When No Data' and doesn't help too. any ideas? thanks so much!!
  19. I have the 2 text fields (field1 and field2) , and all I want is to put the logic that if field1 value is 'ADD', then the font of field2 value will be bold and italic. Now I hardcode the field2 value as bold and italic. I have no idea how to put this expression to put in this scenario: ( <condition> ? exp1 : exp2 ). Any ideas? Thanks so much!!! <textField isBlankWhenNull="true"> <reportElement x="91" y="0" width="28" height="15"/> <box> <pen lineWidth="0.25"/> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{field1}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="128" y="0" width="22" height="15"/> <box> <pen lineWidth="0.25"/> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement textAlignment="Center"> <font isBold="true" isItalic="true"/> </textElement> <textFieldExpression class="java.lang.Integer"><![CDATA[$F{field2}]]></textFieldExpression> </textField>
  20. I have the following page footer in the master report, and the master report has other sub-reports. I only want the page footer to show ONCE on the last page of the report. However, it turns out it shows on every single page. Any ideas? thanks a lot!! <pageFooter> <band height="50"> <rectangle> <reportElement x="2" y="0" width="465" height="40"/> </rectangle> <staticText> <reportElement x="1" y="0" width="463" height="39"/> <textElement/> <text><![CDATA[This is the sample footer]]></text> </staticText> </band> </pageFooter>
  21. I tried to find the samples on how to put the condition logic in ireport. Here's my problem: I have the text fields field1 and field2, if the value of field1 is 'ADD', then I need to bold/italic the value of field2. Any ideas? Thanks in advance! <textField> <reportElement x="139" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{field1}]]></textFieldExpression> </textField> <textField> <reportElement x="320" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{field2}]]></textFieldExpression> </textField>
  22. I have the employeeList as the JRBeanCollection input. Each employee object is a single report (1 report/page). That means if there are 5 employee objects, I want to create 5 reports (5 pages) but in a single PDF file. However, it couldn't show the second employee info. any ideas what I did wrong? public class Employee { private String name; private String dept; } thanks so much
  23. The javabean datasource has a list of list of collection, and each collection has a list of collections. And then I used the subreport to accomplish that. I'm able to make the subreport for the list of collection, but I cannot go to the next level (Dist and SpecialAppt Lists in below) and it always has error cannot find the bean. When I do the subreport of subreport, I'm not sure what's missing and I used the same approach I did for subreport. Am I in the wrong approach? Please advise what's the CORRECT way to design the following Java Bean Hierarchies: Thanks so much, and I really so frustrated and don't know what to do. public class Account implements java.io.Serializable { private String acctId; private String acctType; private List<Appt> apptList = new ArrayList<Appt>(); //etc... } public class Appt implements Serializable { private String apptId; private List<Dist> distList = new ArrayList<Dist>(); private List<SpecialAppt> ppsAppList = new ArrayList<SpecialAppt>(); //etc... } public class Dist {....} public class SpecialAppt { ...}
  24. The javabean datasource has a list of list of collection, and each collection has a list of collections. And then I used the subreport to accomplish that. I'm able to make the subreport for the list of collection, but I cannot go to the next level and it always has error cannot find the bean. When I do the subreport of subreport, I'm not sure what's missing and I used the same approach I did for subreport. thanks so much!
  25. I have the array list of Person, and each person has the array list of phone list. In Java code I used JRBeanCollectionDataSource to populate the list of Person. The followings are the classes. I have no problem to print the lastName and firstName ($F{lastName}) in jrxml, but I got troubles in the phoneList. Any ideas how to represent Person.phoneList.phoneType or even worse that Person.phoneList.addressList.address in jrxml? Please help advise. thanks a lot!!!! net.sf.jasperreports.engine.JRException: Error retrieving field value from bean : phoneType <field name="phoneType" class="java.lang.String"/> <textFieldExpression class="java.lang.String"><![CDATA[$F{phoneType}]]></textFieldExpression> public class Person { private String lastName; private String firstName; private List<Phone> phoneList = new ArrayList<Phone>(); ..... } public class Phone { private String phoneType; private String phoneNumber; private List<Address> addressList = new ArrayList<Address>(); }
×
×
  • Create New...