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

fabianobonin

Members
  • Posts

    10
  • 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 fabianobonin

  1. Hi, Lucian! Thanks for your answer. I have been exporting reports to both PDF and SVG, and it seems PDF exporter is much more mature than SVG exporter, am i right? I would like to contribute to improve SVG exporter, maybe not as a coder, but as a sponsor. Is it possible to be the sponsor of a feature in this community? I am searching for a 100% java way to generate a report with jasperreports, serialize it to some standard format, store or transfer it to another machine, and print it later (or in the destination machine) without needing jasperreports in this last step. Off course, the first format that comes to mind is PDF, but i still didn't find a 100% java way to print a PDF file to a non PDF printer. The options i found was Ghost4J (that needs an external C library), PDFBox, PDF Renderer (both PDFBox and PDF Renderer messed with the original report during convertion), or to use a external PDF program to print (which needs a platform dependent application). All alternatives or are not 100% java compatible or generates poor conversions when printing (tried other pdf renderers also). So i came to SVG. It is a well known format, compact, can be stored, transfered, and we have the batik library that can be used later to print, to generate a image, or whatever, without the need of the jasperreports library and with a 100% java solution. It is just my opinion, but i think SVG should be promoted to one of the main formats, together with PDF, and have a rock solid converter! What do you think about? Best regards, Fabiano
  2. Hi, i am exporting a report to SVG using batik SVGGraphics2D and JRGraphics2DExporter. JasperPrint jasperPrint = ... Document document = GenericDOMImplementation.getDOMImplementation() .createDocument(SVGConstants.SVG_NAMESPACE_URI, "svg", null); SVGGraphics2D graphics2d = new SVGGraphics2D(document); graphics2d.setUnsupportedAttributes(null); JRGraphics2DExporter exporter = new JRGraphics2DExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.PAGE_INDEX, new Integer(0)); exporter.setParameter(JRGraphics2DExporterParameter.GRAPHICS_2D, graphics2d); exporter.exportReport();[/code]But the text of the report is being exported as a SVG path, not as a SVG text. It should export somethig like this: <text x="10" xml:space="preserve" y="10" style="stroke:none;">Teste</text>[/code]But it is exporting somethig like this: <path d="M29.4531 236.5496 Q29.1406 236.7058 28.8516 236.7839 Q28.5625 236.8621 28.2344 236.8621 Q27.8125 236.8621 27.4688 236.7449 Q27.125 236.6277[/code]What makes the generated file, which should have few kB, to have many mB. I did some tests with batik SVGGraphics2D to make sure it is rendering text as text, and i can confirm it is working as expected. graphics2d.setFont(new Font("Arial", Font.PLAIN, 12)); graphics2d.drawString("Teste", 10, 10); graphics2d.drawRect(0, 0, 100, 100);[/code]So, my question is: Is it possible to configure JRGraphics2DExporter to export text as text? (it is just a matter of using Graphics2D's method drawString to draw text) I presume there must be a way, since when we export a report to PDF text are exported as text, not paths or images. Regards, Fabiano
  3. Hi, I have some applications that generates reports, and then send these reports to a server which prints it. Today, i generate a jasperprint in the applications, serialize it, send to the server, deserialize it as a jasperprint and print it using java PrintServices. But recently i had some problems because i upgraded some applications and had some problem printing them, probably because the binary format of the generated jasperprint became incompatible with the jasperreports used by the server. I am wondering if there is some format i should use instead of jasperprint to serialize the report. The printer on the server are windows printers. I tried export to pdf, serialize and send, but the printer on the server are not able to print pdf files. I tried some pdf converters, but the resulting reports got messed (apache pdfbox). Is there some recommended format i should use to serialize the report that would be interpreted by any windows printer on the server? Regards, Fabiano
  4. I was able to reporduce this error consistently, but have no clue what is causing it. I use maven to package my project. This project is a single jar including all dependencies. If i package it with "mvn clean compile assembly:single" and run the jar, it throws the error. If i execute it using the "exec-maven-plugin" (mvn exec:java), it runs smoothly. I will try to create a simpler test case next weekend, but if someone have a clue about what could be causing this problem, please advice. Regards, Fabiano
  5. Hi, I am getting an Error when exporting a report. The error doesn't happen in my machine (windows 10) but happens on two other machines (windows 7 pro and windows 8.1 pro). The error is being raised on JRAbstractExporter.java:731. I don't anything there that could cause an error in this line. I increased the memory of the error machines without success. This application is built with maven, so i am using the same executable JAR on all machines. Here is the stack trace of the error. java.lang.ExceptionInInitializerError at net.sf.jasperreports.engine.JRAbstractExporter.initReport(JRAbstractExporter.java:731) at net.sf.jasperreports.engine.export.JRPrintServiceExporter.initReport(JRPrintServiceExporter.java:497) at net.sf.jasperreports.engine.JRAbstractExporter.setCurrentExporterInputItem(JRAbstractExporter.java:579) at net.sf.jasperreports.engine.export.JRPrintServiceExporter.exportReport(JRPrintServiceExporter.java:376) at br.com.personalsoft.impressao.desktop.ImpressaoDesktopServico.imprimir(ImpressaoDesktopServico.java:134) at br.com.personalsoft.impressao.desktop.ImpressaoDesktopForm$1.run(ImpressaoDesktopForm.java:215) at java.lang.Thread.run(Unknown Source) And here is the code in my application: JasperPrint jasperPrint = ... jasperPrint.setName(impresso.getDescricao().replaceAll("\W+", "")); PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet(); printRequestAttributeSet.add(new Copies(1)); printRequestAttributeSet.add(OrientationRequested.PORTRAIT); PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet(); printServiceAttributeSet.add(new PrinterName(printService.getName(), null)); SimplePrintServiceExporterConfiguration configuration = new SimplePrintServiceExporterConfiguration(); configuration.setPrintRequestAttributeSet(printRequestAttributeSet); configuration.setPrintServiceAttributeSet(printServiceAttributeSet); configuration.setDisplayPageDialog(false); configuration.setDisplayPrintDialog(false); JRPrintServiceExporter exporter = new JRPrintServiceExporter(); exporter.setExporterInput(new SimpleExporterInput(jasperPrint)); exporter.setConfiguration(configuration); exporter.exportReport(); << - error happens here Can i have some advice? Regards, Fabiano
  6. Hi, guys! It makes 2 and a half years, i'm trying again to use iReports (now in version 4.6.0), and i still can´t find a way to change grid size... Took a look at version 4.7.0, and it seems there are nothing new about this subject. I have to say i spent some hours searching a way to change the grid size (aparently a feature presente in older versions of iReport) but couldn't find a way to achieve this. So, i'm thinking that: 1) Maybe i am blind, and this option is in a place so obviuos that i can´t see 2) I am the only person in the word who wants to have my report elements properly aligned to a grid 3) For some unknown reason the developer team is neglecting this important (and trivial) feature for almos 3 years Do someone have a word about this? No problems if i have to change a file manually, or edit windows registry, or something else, but there must be a way to set the grid size... Regards, Fabiano Post Edited by fabianobonin at 08/28/2012 17:37
  7. Hi, I´m using iReport 3.7.1. I turned the option 'Snap to grid' on, and it seems iReport uses a standard grid size of 13 pixels, but i searched at 'Options', 'Page format' and others places and didn´t find a way to set grid size. Regards, Fabiano
  8. Hi all, I store both my .jrxml and .jasper files in a database (reports and subreports) When i load a report, i get it from the database as a stream and generate the report. The problem is when this report uses some subreport it tries to find the subreport in the filesystem, but it isn´t there. Is there a way to override the subreport loading method to be able to load it from the database? I am considering 2 options in this case: 1 - If there is a way to override the subreport loader, i write it and i´m done 2 - If there is no way to do that, it seems i can load the subreports together with the report, and pass its layouts as parameters of the main report (can i do that?). In this case, is it possible to know in advance which subreports a report use? Regards, Fabiano
×
×
  • Create New...