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

la_vlada

Members
  • Posts

    1
  • Joined

  • Last visited

la_vlada's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. Faced the same promblem: had to create report unit with all its resources on the Jasper Server (version 5.5.0) via REST api using PUT request. After several (actually, many) atempts I have finally found out what the descriptor should look like. In JSON: {"label" : YOUR_REPORT_LABEL,"description" : YOUR REPORT DESCRIPTION, "dataSource" : { "dataSourceReference" : { "uri" : YOUR DATA SOURCE URI} }, "jrxml" : {"jrxmlFile" : {"label" : FILE NAME WITH EXTENSION,"type" : "jrxml","content" : JRXML FILE 64BASE ENCODED CONTENT}}, "resources" : {"resource" : [{ "name" : FILE NAME WITH EXTENSION, "file" : {"fileResource" : { "label" : FILE ANME WITH EXTENSION, "type" : FILE TYPE, "content" : FILE 64BASE ENCODED CONTENT} } },...]} In this way all resources get loaded as local resources of the report unit and so I just use their filenames with extensions as resource labels. But as far as I know there is no special constraint for that. And XML descriptor looks like this: <reportUnit> <label>RESOURCE_LABEL</label> <description>RESOURCE_DESCRIPTION</description> <dataSourceReference> <uri>PATH_TO_DS_IN_REPO</uri> </dataSourceReference> <jrxmlFile> <label>JRXML _FILE_NAME_WITH_EXT</label> <type>jrxml</type> <content>64_BASE_ENCODED_FILE_CONTENT</content> </jrxmlFile> <resources> <resource> <name>FILE_NAME_WTH_EXT</name> <fileResource> <label> FILE_NAME_WTH_EXT </label> <type>FILE_TYPE</type> <content>64_BASE_ENCODED_FILE_CONTENT content> </fileResource> </resource> </resources> </reportUnit>
×
×
  • Create New...