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

Neobye

Members
  • Posts

    29
  • 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 Neobye

  1. As far as we could test, the image caching is only working for png (/jpeg/tiff/bmp), but not for scalable graphics like svg. We would like to use an svg logo in our documents, but when producing documents with tousands of pages, the svg logo is added as many pages as the document has. I saw, that the used code for svg is absolutely different from the code used for png. For png, the Renderer is identified by id and stored in a HashMap, so that the image with the same renderer is reused from the map. While using svg, each svg produces an PdfTemplate with its svg-path in the document. I would expect the same mechanism as for png, while the svg-path would be stored only once in the pdf, and each re-occurence would just produce a kind of reference in pdf. I'm not very familiar with itext, but I would expect to have such references in iText. Is there a way to have caching with svg?
  2. We try to fill the reports in a parallel mode to speed up the fill process. JasperReports allows to fill a a report with a list of objects (JRBeanCollectionDataSource), but the filling is done serial, even when you use JRThreadSubreportRunnerFactory. Therefore we try to use Java parallelStream. The trial setup is the following: public class MyReportManager{ JasperReport jasperReport; LocalJasperReportsContext context; public MyReportManager(InputStream theInputStream){ // single instance of JasperReport // jasperReport = (JasperReport) JRLoader.loadObject(theInputStream); // single instance of context // context = new LocalJasperReportsContext(DefaultJasperReportsContext.getInstance()); context.setClassLoader(getClass().getClassLoader()); } public parallelFill(List<MyReportData> myReportData){ // parallel fill process myReportData.parallelStream().forEach(data-> { JasperFillManager fillManager = JasperFillManager.getInstance(context); JasperPrint jasperPrint = fillManager.fill(report, data.getParams(), data.getDataSource()); data.setJasperPrint(jasperPrint); }); } ... }[/code] public class MyReportData{ Map<String, Object> params; JRDataSource dataSource; JasperPrint jasperPrint; public MyReportData(Map<String, Object> theParams, JRDataSource theDataSource){ params = theParams; dataSource = theDataSource; } public Map<String, Object> getParams(){ return params; } public JRDataSource getDataSource(){ return dataSource; } public JasperPrint getJasperPrint(){ return jasperPrint; } public void setJasperPrint(JasperPrint theJasperPrint){ jasperPrint = theJasperPrint; }}[/code] When we call the parallelFill with about 15000 ReportData, the process is working...most of the time, but not always. Sometimes we suddenly encounter an JRException: net.sf.jasperreport.engine.JRException: Byte data not found at: myStyle.jrtxat net.sf.jasperreports.repo.RepositoryUtil.getBytesFromLocation(ReporitoryUtil.java:210)at net.sf.jasperreports.engine.xml.JRXmlTemplateLoader.loadTemplate(JRXmlTemplateLoader.java:114)at net.sf.jasperreports.enginge.fill.JRFillReportTemplate.loadTemplate(JRFillReportTemplate.java:110)...[/code] It looks like it tries to load the style in every fill process. My Questions: is it possible to use parallel stream in conjunction with JasperFillManager? How do we achieve this?do I have to use a separate context for every fill process?why is the JasperStyleTemplate not loaded once in the JasperReport during it's load through JRLoader? regards
  3. created an issue for this problem: http://community.jaspersoft.com/jasperreports-library/issues/3708
  4. I encountered the same problem in JasperReports 5.2.0. I guess this is still a bug!
  5. Hy Morlandin, thank you for the very quick analysis and bugfixing! Do you already know in which version of JasperSoftStudio this bugfix will be available. regards
  6. I would like to have a Header that contains a different title for every detail band in the masterReport. Scenario: I do have the following layout: MasterReport PageHeader -> containing HeaderSubreport & a textFields for "Page / Pages"Detail1 -> containing DetailSubreport1Detail2 -> containing DetailSubreport2HeaderSubreport containing Logo & TextField for a HeaderTitleDetailSubreport1 containing Data1 -> should have Title1 in HeaderDetailSubreport2 containing Data2 -> should have Title2 in Header Question Is it possible to define a PageHeader Band in the Master & a Subreport ? (I tried it but it lead to infinite loop) Most desired I would like to keep the HeaderSubreport in the PageHeader band of the MasterReport (because of single place of declaration and because of textFields "Page / Pages". But I have to set the title depending on the current DetailSubreport that is currently processed. Is there a possibility to set a global variable in the detail band of the Masterreport?
  7. Hy Teodor, Is marging mirroring still an unsupported feature in JasperReports? iText supports the method setMarginMirroring(true) on the Document (resp. PdfDocument) that does the mirroring of even/odd pages. I think it would be nice to have this feature in the JRPdfExporter by setting a JRPDFExporterParameter.MARGIN_MIRRORING or the JRPdfExporterParameter.MARGIN_MIRRORING_TOP_BOTTOM. What do you think? regards Andi
  8. Changed Assigned User from @User_306070 to @anonymous Hy Massimo,Our IDE is completely disconnected from the internet!To reproduce the problem you can just disconnect from the internet, create a new jrxml and a StyleTemplate with some styles and use this StyleTemplate in your jrxml for various text fields. I don't used specific components, just text fieldsYou will notice that the editor is slowing down extremely.My current version is 5.2.0, and I don't think that there were some bugfixes in 5.5 on such a topic.My thought was that there could be some validation/access to the internet in the background, but I was able to detect it really.you can use a new jrxml and just add some styles.regards Andi
  9. Found the solution: If you take the jasperreports-chart-themes-x.x.x.jar and try to create your custom chart-theme, you 2 possibilities: either just add your customChartPropertiesBean.xml, register it in the chartThemesBeans.xml and repackage to jasperreports-chart-themes-x.x.x.jar -> this has the disadvantage that if you like to use this chart-theme, you have to statically package this to your eclipse-plugin net.sf.japserreports_x.x.x.jar to be available during developmentcreate your own customChartPropertiesBean.xml, register it in your own customChartThemesBeans.xml and configure this customChartThemesBeans.xml in your jasperreports_extension.properties of your extension jar. -> take attention that you use a unique name for your chart themes bundle xml (e.g. myChartThemesBeans.xml), because if you reuse the name "chartThemesBeans.xml" for your custome extension, it won't work!
  10. I got a report that takes 300kb when it's saved as pdf. When I print this report directly from JasperReports, it sends about 130mb to the printer. But the same report printed from Acrobat only sends about 3mb. When I remove the charts from the report, both JasperReports-printing and Acrobat-printing are equal. I already tried to switch the render type in Jasperreports between default, draw, image, svg, but with no change to memory consumtion in printer. What could be the problem with charts?
  11. I created my own custom charttheme as a spring-bean-based-extension.jar It works in the runtime if I add the spring-bean-based-extension.jar to the classpath. But I also want to use the charttheme in Jasperstudio during design-time. Jasperstudio doesn't seem to recognize my custom charttheme meanwhile if I put the spring-bean-based-extension.jar to the classpath of the project. Question: How do I have to configure Jasperstudio/MyProject so that my custom charttheme is available for selection in the properties of the charttheme editor.Is the spring-bean-based charttheme the better one or shall I use the .jrctx approach (castor). I have the problem that I have to remove shadows in PieCharts and Labels and found no solution in the .jrctx apporach, but with the spring-bean approach it's very easy and clear.BTW: It works in iReport if I add my spring-bean-based-extension.jar to the classpath of iReport.
  12. Hy Lucian, I just uploaded a test jrxml and the corresponding pdf output. I guess I found the solution (I also created a bug report and will document there the problem and the solution -> see http://community.jaspersoft.com/jasperreports-library/issues/3004-0#comment-803340
  13. I like to use bookmarking in pdf creation out of JasperReports. Therefore I use the anchorNameExpression-tag and the bookmarkLevel-attribute on textField elements. They automatically produce bookmark in pdf when the jasperPrint is exported as pdf. But the position of the bookmarks are calculated with the wrong position. They use relative position of the text elements instead of absolute position on a page. What I do is the following: I got a jrxml which contains the following elements textField1 (position x=10, y=10)a frame2 (position x= 50, y=50), which contains itself a textField2 (position x=5, y=5)I have designed the following anchors in jrxml: textField1: anchorName="bookmark1", bookmarkLevel=1textField2: anchorName="bookmark2", bookmarkLevel=1What happens is that the bookmarks in pdf will have the following positions: bookmark1: position x=10, y=10bookmark2: position x=5, y=5-> the bookmark should have the absolut position, calculated with its surrounding container: bookmark2: position x=55 ( sum of the x-position of the frame and the x-position of the textField2). Same for y-position
×
×
  • Create New...