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

Peetzer

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Peetzer's Achievements

Explorer

Explorer (4/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. I don't know if this is related, are you using the latest Adobe Reader 10 (10.1.3)? With previous 10 version you could get empty pdf's but only with IE.
  2. I registered the java AWT fonts (registerFont) and pdfFontName pointing to the TTF font embed as resource. This worked fine on Solaris and Ubuntu with java 1.5.xx and using reportFont in textElement. When changing to java 1.6, the font is shown and looks exactly the same, only the text does not fit sometimes. On local machine the text fits and on server (for example) one letter is missing. The isstretchwithoverflow is set and I put JRPdfExporterParameter.FORCE_LINEBREAK_POLICY, Boolean.TRUE. But to no avail. Also what changed is that I use now JRStyle to set the styles after calling JasperFillManager.fillReport. Three general styles are included in every report and referenced by the reportElement. With this I can manipulate the font being used in the reports and show also Japanese, Korean and Chinese characters. Templates are generated by iReport 3.0.0. Anybody has the same problem? BR, Peter
  3. Thanks Lucian, barcode4j is in Jasper Reports but development is pretty long time stopped ago. QR code support is missing in these versions but alternative is Zxing (and this is also added in later iText versions but with AGPL license)
  4. Thanks :) Only my layouts are now -90C turned after upgrading JR 2.0.5 to JR 4.5.1 and itext 2.0.6 to 2.1.7. BR, Peter
  5. What latest itext version goes together with Jasper reports 4.5.1 ? BR, Peter
  6. JRPdfExporter, JRPdfExporterContext, JRPdfExporterTagHelper, PdfTextRenderer and BreakIteratorSplitCharacter refer to com.lowagie.text, in the latest itext libraries this is changed to com.itextpdf.text. Solution is to refer to old library like itext-2.0.6.jar (or manually patch above files). Note, barcode4j and itext are both referenced in JasperReports. Itext alone will suffice for barcodes with latest version (also with QR barcode which barcode4j doesn't support) Regards Peter
  7. sanbez Wrote: Maybe u solve your problem by setting parameter "When No Data"? In iReport properties on master (and maybe in subreport). Set "When No Data"="No Pages" or "All Sections, No Detail". One of this choices (in various specific variants) must to help you I have set 'When no data' to No Pages for both reports, main and subreport. The resultSet (dataSource) in the main report has data even though I don't show this on the page, it still results in a blank page.
  8. sanbez Wrote: 1. Try use checkbox "remove line when blank" on field of master report and subreport or 2. Move field of master report and subreport into frame, and use this checkbox for the frame 1) have 2) tried I have one group, grouped on name in the master report with one field showing. The master report contains one datasource. In the detail section of the report I have one subreport, showing details of the parent element. This is a seperate datasource with the primary of the main datasource as input. When I remove the header and even the subreport, I still get a blank page. Since the master report always contains data and the subreport can contain data, I want to show only the pages which contain subreport data. Maybe there is some post process filtering to indicate what pages to export to pdf (print) and what not.
  9. I use now a variable to be returned from the subreport (count of pages). This variable is returned to the master report, when evaluating if there is no data <printWhenExpression> it still leaves empty space :(
  10. kcd Wrote: Are the elements' subreport returning white space? If the elements' subreport only contains a detail band and that detail band is empty will it return with a 0 height (and therefore not print a blank page)? I've never tried it. The subreport has no data and is blank (when there are no details of the element). The main report is grouped on the element and shown on every page and I want it not to be shown, when no details for this element exist. If all data would be in one datasource then this would work but it is cleaner programming to seperate datasources. I wish there would be an option to set in the main report 'if no data in subreport' then no pages or something.. I don't see how I can filter/ evaluate before the report is filled....
  11. The main report contains selected elements. On the main report the name is printed. Every element has a subreport containing details. If there are not details of the element, how can the whole page, main and subreport be skipped? This to prevent a lot of pages to print (depending on the size of the selection) with only a name of the element. I don't know if this is possible, considering these are two dataSources in which the main report always contains data. Basically I want the subreport to pass on a 'no data' to the parent. Kind regards Peter
  12. Hi, I'm using Jasper reports 2.0.5. In my template I have defined one base font; <reportFont name="TimesNewRoman10" isDefault="false" fontName="Times New Roman" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="" pdfEncoding="" isPdfEmbedded="false"/> For displaying Chinse, Japanese or Korean glyphs (this case Chinese) I have added iTextAsian.jar and iTextAsianCmaps.jar to my classPath <reportFont name="TimesNewRoman10" isDefault="false" fontName="" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H" isPdfEmbedded="false"/> I read about the syle and locales in Jasper Reports 4.0.1. What I gather is that the font will be selected based on your locale. Can this be placed in the jrxml? Can both fonts be used with one locale (example en_GB) in which Chinese is extended font? I want to prevent generating the same templates with only different font. Kind regards, Peter
  13. Hi Victor, I have this but the problem is that I have two datasources. The main report contains always data, like the header (group) label. In my case this is a reader. In the subreports I show the details of the particular reader, when accessed etc. So when there is no data in the subreports, I always see the particular reader (label) with blank details. I'm looking for an option or filtering, like 'No pages when no subreport data' but I don't think there is one that is why I looked if I can check for data in the subreports. Problem is that you have to know everything before filling/ printing and show what you want. I know when you put all in one datasource ( resultSet ) and you don't have data, you see no pages but to seperate datasources is more logical. Basically what I want to show is only pages that contain details. If I select 1000 readers, I get 1000 pages and maybe only ten contain data ( details ) that I want to see ( and print ). I hope this is implemented or there is some work-around. Regards Peter
  14. Is there a way to check if a subreport has data? I have a main report with an own datasource (element) and subreports with seperate datasources ( details of the particular elements ). When the subreports contain no data, I want to show nothing on the page ( so no data from the main report ). I'm using JasperReports2.0.5. I was digging in the subreports but see no clue as to get the datasource; (I look only at the detail band as example) If I can get the parameters, I can get the REPORT_DATA_SOURCE but at this point the data is not evaluated yet. If I look at the JasperPrint, then I only get JRPrintElement's and have no clue in what subreport has a datasource with data. Code:JasperReport jasperReport = (JasperReport) JRLoader.loadObjectFromLocation(reportPath + "jasper");List<JRBaseSubreport> subReports = jasperReport.getDetail().getChildren();for (JRBaseSubreport subReport:subReports) {//evaluate expression??JRExpression expression = subReport.getDataSourceExpression();}JasperPrint jasperPrint = JasperFillManager.fillReport(reportPath + ".jasper", reportParameters, queryHandlerJRDataSource);List<JRBasePrintPage> pages = jasperPrint.getPages();for (JRBasePrintPage page:pages) { List<JRPrintElement> element = page.getElements(); //no data in subreport, remove page somehow?? //pages.remove(page);} Post Edited by peetzerrr at 10/19/2010 05:12
  15. When I have multiple parallel subreports in one main report I encouter an 'invalid cursor position'. When one subreport doesn't have a next record and the other subreports do, still a call on resultSet.next is made causing the invalid cursor position. I have looked at the "JRRewindable Datasource" and split band and implemented the moveFirst method. When placing a breakpoint and setting split to false in the Detail band the moveFirst method is reached. However the invalid cursor position still occurs. Should I file this as a bug or is there something else I could try? Regards Peter
×
×
  • Create New...