jasper server REST_V2/reportExecutions attachmentsPrefix

1

Hi,

I've a problem with html output export using rest_v2 service. 

In reportExecutionRequest structure i try to set attachmentsPrefix but with no result. 

Generated output html file still uses default attachment location :

<img src="/jasperserver/rest_v2/reportExecutions/105352832_1406503405410_76/exports/html/attachments/img_0_9_0" style="height: 300px" alt="" title="Meter Chart"/>

It makes viewing report output in offline mode impossible... 

Is there any way to change it? 

 

Regards 

Rafał

rafkacz1's picture
Joined: Jul 24 2014 - 4:22pm
Last seen: 5 years 3 weeks ago

How does the REST call to the report looks like, specifically how are you setting the "attachmentsPrefix" property?
It will also be good to know what version of Jasperserver are you using?

marianol - 5 years 4 months ago
I use Jasper Server v 5.5.0. 
This is the JSON structure send with POST data to reportExecutions serive
{
  "$id": "1",
  "reportUnitUri": "/reports/test/testReport",
  "async": true,
  "freshData": true,
  "saveDataSnapshot": false,
  "outputFormat": "html",
  "interactive": false,
  "ignorePagination": false,
  "pages": null,
  "parameters": null,
  "attachmentsPrefix": "attachments2"
}
 
The additional "id" field is generated automatically by json serializer - but i think it is not a problem. 
 
rafkacz1 - 5 years 4 months ago

Hi,

I have the same problem. When I set any value for the parameter attachmentsPrefix so server still returns the HTML attachments with the default path. The server response is below.

<reportExecution>
   <exports>
      <export>
         <id>html;attachmentsPrefix=download?attachment=</id>
         <status>ready</status>
         <outputResource>
            <contentType>text/html</contentType>
         </outputResource>
         <attachments>
            <attachment>
               <fileName>Times New Roman-cs_CZ</fileName>
            </attachment>
            <attachment>
               <fileName>Times New Roman-cs_CZ.ttf</fileName>
            </attachment>
            <attachment>
               <fileName>Times New Roman tučné-Bold-cs_CZ</fileName>
            </attachment>
            <attachment>
               <fileName>Times New Roman tučné kurzíva-Bold-Italic-cs_CZ</fileName>
            </attachment>
            <attachment>
               <contentType>image/jpeg</contentType>
               <fileName>img_0_0_42</fileName>
            </attachment>
            <attachment>
               <fileName>Times New Roman tučné-Bold-cs_CZ.ttf</fileName>
            </attachment>
            <attachment>
               <fileName>Times New Roman tučné kurzíva-Bold-Italic-cs_CZ.ttf</fileName>
            </attachment>
            <attachment>
               <fileName>Times New Roman kurzíva-Italic-cs_CZ.ttf</fileName>
            </attachment>
            <attachment>
               <fileName>Times New Roman kurzíva-Italic-cs_CZ</fileName>
            </attachment>
         </attachments>
      </export>
   </exports>
   <reportURI>/BBM/11_13/Default/Reports/RJ_EKODFA</reportURI>
   <requestId>990192798_1415090568558_9</requestId>
   <status>ready</status>
   <totalPages>2</totalPages>
</reportExecution>

Do you have any idea? It looks like a bug.

jan.pomahac - 5 years 1 month ago

0 Answers:

No answers yet
Feedback