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

saadjasper

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by saadjasper

  1. Thank you very much it works fine. Type text or a website address or translate a document. Cancel French - detected to English translation
  2. Hello, My concern is that I can not spent a parameter to my report, I use a java class, and I have a fildes said in the report, I use the 4.1.3 version of Jasper Report,When I generate the report I have a null value in my field.: My Java code: try { // - Chargement et compilation du rapport JasperDesign jasperDesign = JRXmlLoader.load("C:\\Report\\Rap.jrxml"); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); // - Paramètres à envoyer au rapport Map<String,Object> parameters = new HashMap<String, Object>(); parameters.put("Titre", new String("Mon titre")); // - Execution du rapport JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,parameters); // - Création du rapport au format PDF JasperExportManager.exportReportToPdfFile(jasperPrint, "C:\\Report\\Rap.pdf"); try { Runtime.getRuntime().exec("explorer.exe " + "C:\\Report\\Rap.pdf"); } catch (IOException ex) { ex.printStackTrace(); } } catch (JRException e) { e.printStackTrace(); }[/code][/code]Below is my report format jrxml. <?xml version="1.0" encoding="UTF-8"?> <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="Rap" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="6"/> <field name="Titre" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"> <staticText> <reportElement x="13" y="29" width="100" height="20"/> <textElement/> <text><![CDATA[Parametre envoyer:]]></text> </staticText> <textField> <reportElement x="134" y="29" width="100" height="20"/> <textElement/> <textFieldExpression><![CDATA[$F{Titre}]]></textFieldExpression> </textField> </band> </title> <pageHeader> <band height="34" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="125" splitType="Stretch"/> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary> </jasperReport> Best regards.
×
×
  • Create New...