Jump to content
Changes to the Jaspersoft community edition download ×

correo.luis.vg

Members
  • Posts

    5
  • Joined

  • Last visited

correo.luis.vg's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  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 !!
  4. Oooops. Just found this http://community.jaspersoft.com/wiki/how-use-json-remote-data-source-version-561. Lets test it =).
  5. Hello, Im looking for obtain PDF report from my JasperServer, with a embbemed json in the request as a DataSource which fill the report. Im using Angular-JS. I found this solution wich use XML instead. http://community.jaspersoft.com/wiki/remote-xml-datasource. This is the correct way to do it?. Thanks, im newbie in JasperSoft.
×
×
  • Create New...