kevinmann6285 Posted September 11, 2012 Share Posted September 11, 2012 Hi,I have constructed a simple report within iReport to test the Rest API. The report generates fine within iReport (All Formats) and from the Jasper Server (All Formats). However, when i call the report using the Web Services i receive a blank PDF. If i choose any other formats then i obtain the file correctly.I have now tried to generate a number of reports with the REST Web Service API but I always obtain a blank PDF. I have noticed that the page size is correct but any text, lines, rectangle boxes are missing. As I'm currently evaluating this product for a customer, i would very much appreciate some direction on how generate the PDF correctly. I have attached the file as well as the code that i call from an Oracle database. Regards KevinCode: -- 2: Get Resource Descriptor for the Run Report Function lcl_resource_descriptor := apex_web_service.make_rest_request(p_url => 'http://server/jasperserver/rest/resource/Reports/Label_Report', p_http_method => 'GET', p_username => 'jasperadmin', p_password => 'jasperadmin'); -- 3: Create the report (with the resource descriptor lcl_report_response := apex_web_service.make_rest_request(p_url => 'http://server/jasperserver/rest/report/Reports/Label_Report?RUN_OUTPUT_FORMAT=PDF', p_http_method => 'PUT', p_body => lcl_resource_descriptor, p_username => 'jasperadmin', p_password => 'jasperadmin'); -- 4: Obtain the UUID with the use of XPATH lv_uuid := xmltype.createxml(lcl_report_response).extract('//report/uuid/text()') .getclobval(); -- 5: Use the UUID to receive the file lcl_file := apex_web_service.make_rest_request(p_url => 'http://server/jasperserver/rest/report/' || lv_uuid, p_http_method => 'GET', p_parm_name => apex_util.string_to_table('file'), p_parm_value => apex_util.string_to_table('report'), p_username => 'jasperadmin', p_password => 'jasperadmin'); Link to comment Share on other sites More sharing options...
kevinmann6285 Posted September 12, 2012 Author Share Posted September 12, 2012 Does anyone have any ideas on what i could have done wrong.We need to determine whether this product is stable enough for an enterprise business, so any help would be certainly appreciated.RegardsKevin Link to comment Share on other sites More sharing options...
jonny64 Posted September 28, 2012 Share Posted September 28, 2012 try to examine logs (/var/lib/tomcat6/webapps/jasperserver/WEB-INF/logs/jasperserver.log) when exporting pdf and not-pdf Link to comment Share on other sites More sharing options...
ntatlock Posted August 6, 2014 Share Posted August 6, 2014 If you are using a custom font, make sure it is installed to the jasper server. I had a similar problem where all except pdf reports were generating, and this was the cause. Link to comment Share on other sites More sharing options...
tactic1960 Posted September 24, 2018 Share Posted September 24, 2018 Hi all, i have the same problem.When run the report with Jaspersoft Studio pdf was generated with 17 page with dataWhen run the same report with the console pdf was generated with 17 page with dataWhen with REST API run the same report pdf was generate with 17 page blank.RegardsMassimo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now