Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Problem calling jasper report from Apex. #68

#1

Dear All,
Thanks to knowing the correct version with which I must compile the Jasper Report Studio reports, I can now run the reports satisfactorily from the Application 772 - Jasper Reports Integration Test (v2.6.2) application.
Now I am trying to call the report from my app following the indications provided in the pdf document that was shared with us and I have the following error.
MISTAKE:
Error: SyntaxError: Unexpected token '%', "%PDF-1.5%"... is not valid JSON

I am attaching the error screen and also documents that were shared with me as an example to execute the reports.

My Code:

begin
xlib_jasperreports.set_report_url('http://URL');
xlib_jasperreports.show_report (p_rep_name => 'hhs/Cheque',
p_rep_format => 'docx',
p_data_source => 'meduca',
p_out_filename => 'Cheque.pdf',
p_rep_locale => 'de_DE',
p_rep_encoding => 'UTF-8',
p_additional_params => '');
-- stop rendering of the current APEX page
apex_application.g_unrecoverable_error := true;
end;

Stay tuned.

Greetings

  • replies 3
  • views 1.4K
  • likes 0
#2
#3

Setting "Allways" resolve the error when calling JasperReport from Apex, but it doesn't work if the page have an IG in Edit Mode.

**

"For an Editable Interactive Grid, the Page attribute 'Reload on Submit' must be set to 'Only for Success'"

**

There is any solution that resolve this issue: "Always" an Interactive Grid in Edit Mode ?

Thank you in advance !
Ionut

#4

Well, then you can branch to a new page and use the page processing there (during rendering phase) to output the document and use APEX_APPLICATION.STOP_APEX_ENGINE at the end.

You can even use this on the current page during page rendering with a condition. For example, the condition could be :REQUEST=RENDER_DOCUMENT. And when you click the button to render the document you will redirect to the current page and set the REQUEST part of the URL to RENDER_DOCUMENT.

This should work as well. You get the basic idea?