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

wjones14

Members
  • Posts

    32
  • 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 wjones14

  1. We have a graphic that is 107KB. The graphic is in the Page Header section of a PDF report. Normally this report is less than 10 pages so the graphic size is not a problem. However, occasionally the report can be 500 pages or more. What we did not realize is that the graphic is apparently embedded in each page of the PDF, so the file size of a 500 page report is ~50MB! We can definitely reduce the quality of the graphic and bring it down to 5KB or so. But is there a way that the graphic can be referenced on each page rather than embedded in each page?
  2. I actually just did the following: in iReport 3.0, added the font .ttf file to it's font folder. So, when looking at the properties of the cell, I set the Font Name = Courier New, and the PDF Font Name = Courier New (cour.ttf). checked the PDF Embedded check box. Created a jar file with the .ttf file inside it, and put this jar in the runtime classpathNow, when I run the report, the new Font is in there. Looking at the PDF file properties, I see CourierNewPSMT (Embedded Subset) and type = TrueType. And the wrapping is definitely behaving differently, but there are still missing values... What am I missing? When generating the report, we are not using the PDFExporter. Instead, we are using JasperRunManager.runReportToPdf(). Do I need to use the Exporter and force some more PDF Font properties? Thanks, Bill
  3. Can someone point to a tutorial on the steps for packaging fonts in JR v3.0? I do have the Jasper Reports Ultimate Guide Third Edition (that we actually paid for when it was not free), and I have all the demo/samples. I would love to upgrade to a newer version of Jasper Reports and iReport, but our current application has a lot of working reports, and upgrade would mean extensive regression testing that we cannot afford right now. From what I see, it is much easier to package fonts with a report after version 3.1.3 or something, but that's not an option for us at the moment. The report we want to package fonts with is a PDF report. There is only one cell in the report that is giving us problems - we populate this cell with a long string of values - anywhere from 1 to several thousand values. The values are normally the same length in a given report, and may look like this: 12345678(1000) 12345678(1001) 12345678(1002) 12345678(1003) 12345678(1004) 12345678(1005) 12345678(1006) 12345678(1007) 12345678(1008) and so forth. Most of the time, the report works and there are no issues. But certain value lengths cause problems where some values are missing in the final report. In the font properties for the cell, we are using Font Name = monospaced, and PDF Font Name = Courier. It does not seem to matter if we check the PDF Embedded box or not. I think we want to package the font Courier New in this report to use for this cell. Can someone point to a tutorial on how to do that? Thanks!
  4. I did get it to work using a Frame, but it was not as obvious as I would have thought. This is what I did: put a Frame where each cell is. Each Frame has 4 borders "Print when detail overflows" = true "Print repeated values" = true Stretch type = "Relative to tallest object" put a TextField where each cell is, on top of each Frame, but NOT inside the Frames. Each TextField has NO borders "Print when detail overflows" = false Stretch type = "Relative to tallest object"
  5. If a subreport did not override a report property specified in the main report, would the subreport inherit the property? How about Custom properties? If the main report added this Custom property, would the subreports all inherit it? net.sf.jasperreports.export.pdf.force.linebreak.policy true
  6. We have 5 textfield elements in a detail band, all stretching relative to tallest object. There is a border around all 4 sides of each cell. When the data in one cell stretches so that it causes the row to span multiple pages, the border on that cell prints for each page, but the other cell borders do not print. I can fix this by putting a frame around each cell, and having the frame print when detail overflows, but is there a way to make the textfield borders print without doing this? The report is PDF, and we are using JasperReports 3.0. Post Edited by wjones14 at 03/16/2012 21:34
  7. teodord Wrote: Hi, You no longer need the pdfFontName and isPdfEmbedded attributes at text field level, because you already specified them in the font extension config file. Only the fontName is needed. Also, the markup attribute deprecates the formed isStyledText attribute. isStyledText="true" is equvalent to markup="styled", but the markup attribute takes precedence, if present. Can you upload your JRXML file and maybe the PDF you get using it? Thank you, Teodor Okay, I modified the JRXML file, removing all the text field attributes except markup="styled" and fontName="Courier New", and now it works! So the textField properties look like this: <textElement markup="styled"> <font fontName="Courier New"/> </textElement> Thank you for the help.
  8. Thank you for the support. We have also purchased the JR Ultimate Guide 3rd Edition, and find it very helpful. Despite all this help, we are still having problems getting HTML markup (the <b> bold tag) to work within a textField. We have done the following per your advice above and the Simple Font Extension Tutorial in the guide: Upgraded to Jasper Reports 3.1.3 Created a font jar containing: 8 .ttf True Type font files (2 font families - Arial and Courier New) jasperreports_extension.properties jasperfonts.xml Used these properties on the textField: isStyledText="true" markup="html" fontName="Courier New" pdfFontName="cour.ttf" isPdfEmbedded="true" Attached are the extension.properties and jasperfonts.xml files from our fonts jar. Are we missing something else?
  9. It would be awesome if someone who has good experience with the JasperReports fonts provided an example, along with a clearly detailed explanation. I have been struggling with font problems now for a couple weeks, including the EXACT same problem you have, where only the underline HTML tags work within a PDF report. I posted that question a few weeks ago, and Lucien explained the problem with this answer: "You need to configure a bold PDF font for the text field. You can either do this by using the FONT_MAP export parameter (as seen here), or font extension on newer JR versions." You can't be any more clear than that as far as what we need to do. However, how do we do it (using font extension on newer JR versions)? :-) I have also had problems with linebreaking, where the PDF output was truncating parts of the field when dealing with large Strings of output. The answer I got for that was to look at the FAQ, and then the font example from any version of JasperReports 3.1.3 onward in the /demo/sample/fonts directory. http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/faq.html?group_id=252#FAQ25 It's all very helpful, and we have since upgraded from JasperReports and iReport version 3.0.0 to 3.1.3 just to tackle these problems. However, the example font report does not explain a lot of the questions we still have. It does not say in general how you map a PDF font to an AWT font. It does not give a "best practices" approach for including additional fonts with a deployed application. It does not say when to use embedded pdf fonts, or why. There seems to be a big mystery surrounding the details of the new font support in JR 3.1.3.
  10. Can anyone tell me why the HTML underline tag does work in my textField, but the HTML bold tag does not? <u>MyText</u> works <b>MyText</b> does not work We are using JasperReports 3.0, iReport 3.0, JDK 1.5. The properties of the textField are: Font Name = Courier New PDF Font Name = Courier Markup = HTML IsStyledText not checked PDF Embedded not checked. We are using the JasperRunManager.runReportToPDF() method to stream the report.
  11. We figured out a way to do this so I thought I would share the answer. The report output looks like this: col1 col2 col3 col4 col5 data data data data data data data data data data data data data data data data data data data data data data data data data data data data data data So what we did was to have col1, col2, col3, and col4 be ordinary textField elements. But col5 is a subreport. In addition to the Fields declared for col1, col2, col3, and col4, we have col5 declared as a Field of class type JasperReport. The main report's subreport properties are also Fields. And the main report's DataSource is a JRMapCollectionDataSource, so each report row contains maps with the subreport's parameter map, it's data source, and the compiled subreport. The subreport's data source is also a JRMapCollectionDataSource, created with a list of maps, each with key that matches the subreport textField expression name, and a value of the actual data. The subreport is real simple. It is simply a detail band containing a single textField. The report properties have column count set to 5 and the printOutput property is horizontal.
  12. We still have an issue with a report cell, where the line breaking / word wrapping is not always working right in our PDF report, and the report sometimes is missing data. Teodor replied, saying the issue might be font related. He suggested reading this section of the FAQ for ideas: http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/faq.html?group_id=252#FAQ25 And actually, after reading that, we tried changing the net.sf.jasperreports.export.pdf.force.linebreak.policy property to true. This fixed the problem of missing data, but introduced a new problem where the data was no longer lined up in neat columns, and the line breaks were happening in the middle of words. So by trial and error, we also started changing the fontName and pdfFontName values for the textField from the iReport default of San Serif and Helvetica. We changed them to this: <textElement> <font fontName="Times New Roman" pdfFontName="Times-Roman"/> </textElement> This seems to fix the problem, although we can't test it with every possible data configuration we might have. Are the PDF font metrics equal to the Java/AWT font metrics with these two fonts?
  13. If Jasper cannot accept a List of Strings as input for a textField, can it display an HTML table in the cell? This is a PDF report.
  14. Presently, we have a textField cell where the data is a long single String. We generated the String before sending it to the report, by concatenating a list of Strings, each separated by a comma and a space. See the last column in the attached file for an example. We're wondering if it's possible to send a textField a List of Strings, and have Jasper format the list by columns? It would be similar to how Microsoft Word allows you to format using "newsletter-style" columns. Post Edited by wjones14 at 06/12/2009 15:51
  15. I said that setting the PDF linebreak property to true fixes the problem in our report, where we were previously losing data in certain cases. However, now we have another problem where the line breaks are unpredictable and happening in the middle of words. I have attached two small files, one showing our original problem of missing data, and another showing how the PDF linebreak = true property fixes the missing data, but causes line breaks in the middle of words. These reports are packing lists. The problem data is in the last column, with header: Subject(Visit) / Kit ID(Usage Seq). If you look at the pdf_linebreak_false attachment, you see that the numbers inside the parentheses are sequential, i.e. 50501, 50502, ... The first page ends at number 50788. The second page begins with 50813, so the report is missing 50789 through 50812. And the last line on the last page ends with Kit number 51286. Now, by using the PDF linebreak = true property in the pdf_linebreak_true attachment, you see that are problem is fixed and there are no more missing kits. The first kit is 50501, and the last kit is 51300, so all 800 kits are displaying. This property, however, has added a new problem where the lines are breaking unpredictably in the middle of Kit IDs. Also attached is the .jrxml file containing the subreport. The problem field is textField-7 Other details about this report: jasper reports version: 3.0 ireport version: 3.0 JVM version: 1.5.06
  16. Thank you Teodor, Changing the net.sf.jasperreports.export.pdf.force.linebreak.policy property to true fixes the problem! For now, I have just changed the property in the report that was a problem. However, we're thinking that it might be a good idea for us to change the property globally for all of our reports. Is there a standard convention for this? Do you copy the default.jasperreports.properties file, and place it outside the jasperreports.jar, and put the external file in the front of the classpath? Thanks again for the solution! Your support is highly appreciated.
  17. If you're trying to call your class from within the Jasper report, you need to import the class into the report: <import value="yourpackage.*" /> alternatively, you could decrypt the value by processing the result set first (outside of Jasper), and then build your Jasper DataSource with the decrypted result.
  18. I'll add one more bit of information about this problem. We have a similar report that has a cell able to expand over several pages properly - but the difference is that this cell is 90% of the row width, and the other 10% is another column - so there are only 2 columns in the row. So on the report with the problem, the cell that can't always expand enough is perhaps 40% of the row width, and the other 60% of the row is taken up by 7 smaller columns. I don't know if this has anything to do with the problem or just coincidence.
  19. We have a report that recently overflowed a cell so that the remaining data was not displayed. The detail band is set to isSplitAllowed=true. The text fields are set to isStretchWithOverflow=true and isPrintWhenDetailOverflows=true. So our cell had a list of 250 things in it, but only the first 234 were displayed and the rest were just missing. Every row was like this, and it didn't matter if the row started near the top of the page or the bottom. It seemed to span pages correctly, but the row height just could not expand enough to display all 250 items. Is there a setting I might be missing, or is there a limitation on the cell height? We are using Jasper Reports 3.0.0 and the report is PDF. Thanks, Bill
  20. Did you try inserting a Page Break at the top of the subreport? Or in the main report, just before the subreport (if you know the subreport will always have data - otherwise, you won't want the page break I don't think).
  21. I found a solution that works. In the report properties, declare the paper size as LETTER (8.5 inches wide by 11 inches high) instead of the actual HALFLETTER (8.5 inches wide by 5.5 inches high). Then, remove the top and bottom margins from the report, and fix the first line to print exactly on the page where you want it to print (Fixed position). Size the detail band to 1/2 the page size; 792/2 = 396. Then the report will print 2 records on LETTER paper, but one record on the HALFLETTER paper. The only downside to this is if you print an odd number of records, there will be one blank paper at the end. But that is far better than every other page, and perfectly acceptable for my application.
  22. I have a very simple report that prints to an Epson LQ-2180 dot matrix printer. The report prints to envelopes of size HALFLETTER. HALFLETTER is one-half the height of LETTER paper, so it is 5.5 inches (13.97 cm) high by 8.5 inches (21.59 cm) wide. I am using Portrait mode. My report properties are like this: name="blindbreaker" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="612" pageHeight="396" columnWidth="446" columnSpacing="0" leftMargin="87" rightMargin="79" topMargin="76" bottomMargin="49" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false" I have tried printing the report as both PDF and directly to the printer using the PrintServiceExporter. In both cases, it prints an empty page in between each printed page. In Adobe, the PDF report looks good, with no empty pages in between. The height of all report bands is 0, except for the detail, which is 271 [396 - (76 + 49)]. Does anyone know how to eliminate the empty pages? Thanks, Bill
  23. I have a standard Cover Sheet subreport for other reports. One of the things we wanted to show on this cover sheet is the total number of pages for the report. How can I access the PAGE_NUMBER variable of the main [parent] report from this subreport?
  24. I have a report that has subreports. If you want a Thin border around two subreports, is it better to use a rectangle or a frame? In general, how do you choose between the two? thanks, Bill
  25. Doesn't the newline slash go the other way? Post edited by: wjones14, at: 2007/01/10 14:40
×
×
  • Create New...