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

emanuele.a89

Members
  • Posts

    15
  • 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 emanuele.a89

  1. Hi, I have a nested table structure into my detail band of my subreport (I also tried groups, but with no success). Once the nested table reaches the bottom of the page and tries to overflow to a new page I got the following error: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: The subreport is placed on a non-splitting band, but it does not have a rewindable data source. It seems thath the nested table can't overflow to a new page. It sounds weird...normal table does. I tried all the split options, but I have been not able to solve this problem. I am usign a JRCsvDataSource. Does anyone could help me please? Thank you in advance!
  2. Hi, I am sorry for the repeated question, but I did not find the right solution. I simply added an external font to Jaspersoft Studio following the official instructions. After that I created the .jar to import as external jar from project's properties. If I do that I get the following error: net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font: pdfFontName: fonts/HelveticaNeue/HelveticaNeueFont.ttf pdfEncoding: Cp1252 isPdfEmbedded : true at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:2585) at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:2368) at net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:2337) at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.getPhrase(SimplePdfTextRenderer.java:64) at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.render(SimplePdfTextRenderer.java:73) at net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:2698) at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:1104) at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:1063) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:927) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:547) at com.jaspersoft.studio.editor.preview.actions.export.AExportAction.exportWithProgress(AExportAction.java:223) at com.jaspersoft.studio.editor.preview.actions.export.AExportAction.doPreview(AExportAction.java:347) at com.jaspersoft.studio.editor.preview.actions.export.AExportAction$3.run(AExportAction.java:191) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) If I do not do that the pdf run fine, with Maven as well, but the font is not embedded!!!!!! How can I solve this problem? Thank you in advance
  3. 0 I have been able to solve the problem: I created a datasource for each table using a cycle from my java program and creating a JRCsvDataSource parameter for each one them. This way all my Tables are getting printed with data. In JRDataSource expression I had to cast the object $P{DS} this way: ((net.sf.jasperreports.engine.data.JRCsvDataSource)$P{DS})[/code]otherwise tables were not printed. The object alone does not work!
  4. I have a report made of one page which is generated usign a CSV Data Adapter. In the report I have some data and 2 table where both are taking data from CSV file. In a first moment, I had problem with table showing up: I put some data in myTables but nothing were shown. I have been able to solve the problem by using and mapping REPORT_PARAMETER_MAP in ParameterMap table’s section. Now I have the same problem, but calling myReport from a java program. In this last I have created a datasource which I am sending as paramater to the report. As a result, all data are showned, unless the 2 tables. In Jaspersof Studio I have defined a parameter called DS where its class is: “new net.sf.jasperreports.engine.data.JRCsvDataSource” and I am passing it to myTables as follow: In java I have: JasperPrint jasperPrint = null; try { String[] columnNames = new String[]{"xxx3", "xxx4", "xxx2", "xxx1"] JRCsvDataSource ds = new JRCsvDataSource(inp); ds.setFieldDelimiter(';'); ds.setUseFirstRowAsHeader(true); ds.setColumnNames(columnNames); _parameters.put("DS", ds); jasperPrint = JasperFillManager.fillReport(_jasperReport, _parameters, ds); } catch (Exception e) { putKOReport(outputStreamEnvelopeFactory,e.toString().getBytes());; e.printStackTrace(); writeErrorLog("OPS: readReportConfiguration " + e.getMessage() + " " + e); throw new RuntimeException(e); } return jasperPrint;}public void prepareReport() throws SQLException, OutputNotFoundException, OutputEnvelopeCreationException{ _parameters.put("PARAM1", "/main/prj/xxx1.png"); _parameters.put("PARAM2", "/main/prj/xxx2.jpg"); _parameters.put("PARAM3", "/main/prj/xxx3.jpg"); _parameters.put("PARAM4", "/main/prj/xxx4.jpg"); try { _jasperReport = JasperCompileManager.compileReport(pathReportJasper); writeInfoLog("OPS: Report Configuration "+pathReportJasper+" has been prepared"); } catch (Exception e) { putKOReport(outputStreamEnvelopeFactory,e.toString().getBytes());; e.printStackTrace(); writeErrorLog("OPS: prepareReport " + e.getMessage() + " " + e); throw new RuntimeException(e); }}public byte[] writeOutputFile(JasperPrint jasperPrint){ byte[] reportPdf = null; try { reportPdf = JasperExportManager.exportReportToPdf(jasperPrint); } catch(Exception e) { putKOReport(outputStreamEnvelopeFactory,e.toString().getBytes()); e.printStackTrace(); writeErrorLog("OPS: writeOutputFile " + e.getMessage() + " " +e); throw new RuntimeException(e); } return reportPdf;} I am doing something wrong? Does anyone could help me, please? Thank you in adavance!
  5. In Jaspersoft Studio, I have only a main report...it is just one page! And I use $P{REPORT_PARAMETER_MAP} for the table's dataset1, in order to show the data! The Jasper it is ok!! My problem now it is the java code....I don't know how to pass $P{REPORT_PARAMETER_MAP}....or if I have to do something different. If I launch myJavaCode with the report's paramaters I have defined I get a page with all the data, but withouth tables...How can I solve this?? I posted above my java code.
  6. ..insert your code herepublic void prepareReport() throws SQLException, OutputNotFoundException, OutputEnvelopeCreationException { _parameters.put("PARAM1", "/main/prj/xxx1.png"); _parameters.put("PARAM2", "/main/prj/xxx2.jpg"); _parameters.put("PARAM3", "/main/prj/xxx3.jpg"); _parameters.put("PARAM4", "/main/prj/xxx4.jpg"); try { _jasperReport = JasperCompileManager.compileReport(pathReportJasper); writeInfoLog("OPS: Report Configuration "+pathReportJasper+" has been prepared"); } catch (Exception e) { putKOReport(outputStreamEnvelopeFactory,e.toString().getBytes());; e.printStackTrace(); writeErrorLog("OPS: prepareReport " + e.getMessage() + " " + e); throw new RuntimeException(e); } }..[/code]Hi, I did the same thing! In Jaspersoft Studio I can see the table with data!! But, when I launch myReport from my java application all tables are empy. Why is this happaning? Any Idea? For istance, I put here my prepareReport()...have I to set REPORT_PARAMETER_MAP? How?
  7. Hi, I have a build up a report with a .CSV input file as DataAdapter. After that I needeed a table to put some data into a it and a linked dataset. The problem is: if I leave blank the section "Default Data Adapter" in my Dataset1, no data will be displayed. In fact, to fix this report I had to export my DataAdapter as .xml and then put this file in the section "Default Data Adapter" of my Dataset1 (as in the attached picture). Working with database I have never set up this property. Is there a way to pass this property as Param? maybe from java program? Or is there a way the report works without setting this property? Thank you in advance!
  8. Thanks for answering the question, but it does not work. It seems no possible to manage the list' elements. I noticed that if if increase the width of field name="_THIS" to 430 px the blank space between the first and the second element of the list disappear. I do not know why. But, it is not a solution.
  9. I, I have a list element made up of bullets point. My goal is to reduce space between bullets point. I tried everything, but with no success. Here below my jrxml: <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.3.1.final using JasperReports Library version 6.3.1 --> <!-- 2018-01-08T14:17:08 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Indentation" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f0ac92f3-35e5-417e-aecd-5c47be379bf8"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/> <subDataset name="ListDataset" uuid="a6053d26-ad58-4808-ac51-76e62529d7de"> <queryString> <![CDATA[]]> </queryString> <field name="_THIS" class="java.lang.String"/> </subDataset> <parameter name="testText" class="java.lang.String"> <defaultValueExpression><![CDATA["assicurare il raggiungimento degli obiettivi di struttura di competenza attraverso un’efficace gestione dei Promotori Assicurativi e Team Manager da Lei coordinati;nThis is text on line 2"]]></defaultValueExpression> </parameter> <queryString> <![CDATA[]]> </queryString> <title> <band height="34" splitType="Stretch"> <componentElement> <reportElement x="0" y="0" width="430" height="20" isRemoveLineWhenBlank="true" uuid="a9d62b3a-cdad-4c44-a3e6-8e7688986380"/> <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical"> <datasetRun subDataset="ListDataset" uuid="a21cd89b-dd5a-4135-90e0-a84ef83bd9dc"> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource(java.util.Arrays.asList($P{testText}.split("n")))]]></dataSourceExpression> </datasetRun> <jr:listContents height="20" width="430"> <ellipse> <reportElement x="13" y="4" width="4" height="4" backcolor="#000000" uuid="c2a202b7-ca0f-4ce4-a2d8-35b314f8e1ee"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> </ellipse> <textField isStretchWithOverflow="true"> <reportElement x="30" y="0" width="400" height="20" isRemoveLineWhenBlank="true" uuid="31b05be1-9d89-4928-aec8-095e15e66711"/> <textElement textAlignment="Left"/> <textFieldExpression><![CDATA[$F{_THIS}]]></textFieldExpression> </textField> </jr:listContents> </jr:list> </componentElement> </band> </title> </jasperReport> Does anyone have any idea? Thank you for your hepl!!
  10. I solved by creating tables under group footer1 and group footer2 and I selected the following option: Keep Toogether, spilt type = Prevent and Min Height to Start new page = the sum of the two group footer height px.
  11. Hi, I have a little issue with my report. I have four tables whose data are variables (not fixed. They depends on the dataset). As output I want that the 3th and the 4th table get printed in the second page if they are not fit in the fist one. On the contrary, the actual behavior of my reports is different. The tables are printed in the 1st page and just a few rows of the 3th and the 4th table are printed in te 2nd page. I can I solve that? Thank you in advance for your help!
×
×
  • Create New...