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

correo.luis.vg

Members
  • Posts

    5
  • 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

Posts posted by correo.luis.vg

  1. Hello,

    I have a problem with images in my jrxml report. It is stored in my cent os 6 with jasper server

    There is a Field called image,

    $F{image} contains  "/tmp/jasperfile/image.png" , image exist in server with this absolute path location /tmp/jasperfile/image.png.

    So im trying to use this :

    <imageExpression><![CDATA[(new File( "file://" + $F{image}).isFile()) ?  "file://" + $F{image} : "file:///tmp/jasperfile/default.png]]></imageExpression>

    or 

    <imageExpression><![CDATA[(new File( $F{image}).isFile()) ?  "file://" + $F{image} : "file:///tmp/jasperfile/default.png]]></imageExpression>

    but always returns false. There is another way to test if file exist with file:// ?.

    Thanks!!

  2. I made some test,
     
    There is 5 subreports which fill the main report. Now, the three first reports are working perfectly, but in the 4th and the 5th jasperserver says "Fail to parse the xml document", when i launch the main report.
     
    But if i publish the 4th and the 5th separately it works perfectly. 
     
    If i remove these reports from the main, i got no errors =(.
     
    Any ideas?
     
    ( two of the five subreports, got int fields, one of them is working )
     
    Thank you,

     

     

  3. Hello,

    Im trying to call rest_v2, using xmlString as DataSource which fill the report in PDF. The MainReport works, but using subreport throw errors. like XML parse, or just returning Blank subReports. 

    This is the correct way to fill subreports from xml string in rest?, any ideas of what im doing wrong?

    I have this Lines in the MainReport:

    <parameter name="xmlString" class="java.lang.String">
              <defaultValueExpression><![CDATA["<?xml version=1.0" encoding="UTF-8"?><Report><Test><name>a</name><percent>123</percent></Test></Report&gt]]></defaultValueExpression>
    </parameter>
    <parameter name="XML_INPUT_STREAM" class="java.io.InputStream">
               <defaultValueExpression><![CDATA[new java.io.ByteArrayInputStream($P{xmlString}.getBytes("UTF-8"))]]></defaultValueExpression>
    </parameter>
    <queryString language="xPath">
                <![CDATA[/Report]]>
    </queryString>

     

    One of the subreports, have a Pie 3D chart, this is the code

    <parameter name="xmlString" class="java.lang.String">
              <defaultValueExpression><![CDATA["<?xml version=1.0" encoding="UTF-8"?><Report><Test><name>a</name><percent>123</percent></Test></Report&gt]]></defaultValueExpression>
    </parameter>
    <parameter name="XML_INPUT_STREAM" class="java.io.InputStream">
              <defaultValueExpression><![CDATA[new java.io.ByteArrayInputStream($P{xmlString}.getBytes("UTF-8"))]]></defaultValueExpression>
    </parameter>
    <queryString language="xPath">
               <![CDATA[/Report/ResMediosGraficos/tipo]]>
    </queryString>
    <field name="Naturaleza" class="java.lang.String">
            <fieldDescription><![CDATA[name]]></fieldDescription>
    </field>
    <field name="Porcentaje" class="java.lang.Integer">  <!-- Numeric for Chart -->
             <fieldDescription><![CDATA[percent]]></fieldDescription>
    </field>
    this is declaration of subReport 1 in Main jrxml file.
     
    <subreport>
                  <reportElement x="0" y="0" width="510" height="30" uuid="21e18f03-e63f-4294-9462-b1a56a67ad81"/>
                  <subreportParameter name="xmlString">
                              <subreportParameterExpression><![CDATA[$P{xmlString}]]></subreportParameterExpression>
                   </subreportParameter>
                  <subreportExpression><![CDATA["chart.jrxml"]]></subreportExpression>
    </subreport>
     
    Thanks you very much, any help will be appreciated
     
    [sOLVED]
    I couldnt find the reason, but just changing the Detail Band for these two reports has solved the problem :D. 
     
    Greetings !!
     
×
×
  • Create New...