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

freitas_tiago

Members
  • Posts

    4
  • Joined

  • Last visited

freitas_tiago'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. Thanks for your answer, but I made a full copy of your code but the report return only one null: "<?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.17.0-6d93193241dd8cc42629e188b94f9e0bc5722efd --> <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="Atestado" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="25dce969-32ae-4951-b8c6-6e55c8817291"> <parameter name="jsonString" class="java.lang.String"> <defaultValueExpression><![CDATA["{"a": [ {"b": { "val": "val1"}}, {"b": { "val": "val2" }}]}"]]></defaultValueExpression> </parameter> <parameter name="JSON_INPUT_STREAM" class="java.io.InputStream"> <defaultValueExpression><![CDATA[new java.io.ByteArrayInputStream($P{jsonString}.getBytes("UTF8"))]]></defaultValueExpression> </parameter> <queryString language="JSON"> <![CDATA[a.b]]> </queryString> <field name="value" class="java.lang.String"> <fieldDescription><![CDATA[val]]></fieldDescription> </field> <columnHeader> <band height="31" splitType="Stretch"> <staticText> <reportElement x="150" y="0" width="100" height="30" uuid="b33a123d-8987-4da4-b21b-1f9ccc50e92d"/> <text><![CDATA[value]]></text> </staticText> </band> </columnHeader> <detail> <band height="30" splitType="Stretch"> <textField> <reportElement x="150" y="0" width="100" height="30" uuid="14c51219-5ce2-47ce-abb9-71bc11a6f28c"/> <textFieldExpression><![CDATA[$F{value}]]></textFieldExpression> </textField> </band> </detail> </jasperReport>" The value I inserted in the prompt was: {"a": [ {"b": { "val": "val1"}}, {"b": { "val": "val2" }}]} and {"a": [ {"b": { "val": "val1"}}, {"b": { "val": "val2" }}]} The result was the same: null Any idea?
  2. Hello dear friends. I'm using jasperSoft Studio 6.17.0 and I'm struggling with the following problem: I have an input string parameter that , in fact, is a json structure. I have no data adapter, and I need to populate my report with the content of that parameter. I know how to do with a json file, but tried many things with json input as a string parameter. {person: {name: "john", age: '22'}, car: {name: 'BMW', model: 'X3'}} I haven't found any example in the net, so does anybody knows how to do that? Thanks
  3. Hello, I tried the webservice Datasource for rest request in the jaspersoft version 6.17.0. At the moment I tried to get server response to read fields nothing happened only the information "Loading Json data". I tried exactely the same thing (exactely the same procedure) in the 6.3.1 and all worked well. Do I have to do anything different in the 6.17 version? Thanks Tiago Freitas
×
×
  • Create New...