Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Lino Schildenfeld 2nd December 2015
APEX 5 – Printing
What are my report printing options?
www.apexRnD.co.nz
lschilde.blog...
Lino Schildenfeld
APEX R&D manager for NZ and AU
10 years+ Oracle experience
APEX Blogger and enthusiast
NZ APEX meetup or...
Oracle Application Express 5
What are my printing options?
apex.oracle.comapex.world
APEX Print capability and printing options
Printing Alternatives
Summary
Reporting
Most common requirement for modern applications
Can be classified by:
Complexity and formats
Templates and data ...
APEX reporting
Good reporting support
Classic or Interactive reports
Images, links, pivoting, computation, highlighting….....
Enable data download
Enable data print
Generic columns on default templates
Need Printing server to work (APEX 5 set to OR...
Custom report queries
User defined layouts
Need printing server (ORDS, BI Pub, FOP)
Ability to run reports using APEX APIs...
...
BEGIN
l_document := APEX_UTIL.GET_PRINT_DOCUMENT (
p_report_data => :P1_XML,
p_report_layout => :P1_XSL,
p_report_layo...
Limited choice
XSL-FO editor requires a licence (Altova and Stylus Studio)
RTF templates with BI Publisher printing server...
Option 1. APEX Plugins
Example “Reports 2 PDF” by Anton Scheffer
Completely PL/SQL based
Uses report region source to generate PDFs
Great replace...
Supports pagination
Easy to setup and run
Needed an update to work in APEX 5
Not ideal for more complex data types
Can be ...
APEX Print capability and printing options
Printing Alternatives
Summary
Option 2. PL/PDF
Installation and getting it run is easy
Completely PL/SQL based, one of oldest tools around
Offers different packages for ...
….
plpdf.Init;
/* Begin a new page: page orientation: default (portrait) */
plpdf.NewPage;
/* Sets the font and its proper...
Most favorite DBA option
Can work in all APEX versions
Document modification supported
Creating a document challenging wit...
Option 3. JRXML2PDF
Based on JRXML report definition
Pure PL/SQL solution
No JasperServer installation
Installation was easy → APEX import (or...
DECLARE
vcName VARCHAR2(200);
lParams PK_JRXML2PDF_REPGEN.TPARAMLIST;
bl BLOB;
BEGIN
vcName:='THE_NAME_OF_YOUR_REPORT_IN_J...
Younger brother of JasperReports
With no authentication problems
Worked with APEX 5 with no problems
Love the idea and wou...
Option 4. JASPER REPORTS
Java based solution
Reports created in iReport and deployed to server
Many internet resources on How To's (Dietmar Aust,
E...
begin
xlib_jasperreports.show_report (p_rep_name => :p5_rep_name,
p_rep_format => :p5_rep_format,
p_data_source => :p5_dat...
Good documentation
Pixel perfect results
All needed formats
Matrix report support
Improved RTF editing
Best free option on...
Option 5. DOXXY
Report design using Word templates
Supports PDF and Docx file formats within different packages
Support for conditional fo...
…
l_bind_variables('P_ORDER_ID').number_value := 1;
l_doc := BL$DG4O_INTERFACE.generate_document
(p_document => '/My Folde...
Good documentation
Data and templates are kept separate
Limited output formats – PDF and Docx
Installation only using APEX...
Option 6. BI Publisher
Professional reporting tool
Supports all output formats
Ability to schedule, save and email reports
Templates are built us...
Click to add Text
Good documentation including many white-papers how to
integrate it with APEX
Easy to design templates
Best reporting packa...
Option 7. ApexOfficePrint
PL/SQL solution
Comes as APEX Plugin and PL/SQL API
Supports PDF, HTML and Office formats (.docx, rtf, .xlsx, .ppt)
Only s...
AOP as Plugin
Good documentation
Easy to use and pick up
Package options to choose from (as service or local server)
With automatic temp...
www.apexofficeprint.com
❖ APEX Print capability and printing options
❖ Printing Alternatives
❖ Summary
Click to add Text
Q&A
www.apexRnD.co.nz
lschilde.blogspot.com
@LinoSchilde
lschilde@apexRnD.co.nz
Click to add Text
Upcoming SlideShare
Loading in …5
×

Apex RnD APEX 5 - Printing

3,268 views

Published on

A reference point for APEX 5 and its printing options

Published in: Technology
  • Be the first to comment

Apex RnD APEX 5 - Printing

  1. 1. Lino Schildenfeld 2nd December 2015 APEX 5 – Printing What are my report printing options? www.apexRnD.co.nz lschilde.blogspot.com @LinoSchilde lschilde@apexRnD.co.nz
  2. 2. Lino Schildenfeld APEX R&D manager for NZ and AU 10 years+ Oracle experience APEX Blogger and enthusiast NZ APEX meetup organizer About me
  3. 3. Oracle Application Express 5 What are my printing options? apex.oracle.comapex.world
  4. 4. APEX Print capability and printing options Printing Alternatives Summary
  5. 5. Reporting Most common requirement for modern applications Can be classified by: Complexity and formats Templates and data handling Data types Modification requirements Delivery methods and scheduling Run in database or externally Will drive your choices…….
  6. 6. APEX reporting Good reporting support Classic or Interactive reports Images, links, pivoting, computation, highlighting…... Export as PDF, CSV, HTML, Email, XLS, RTF What about complex reports?
  7. 7. Enable data download Enable data print Generic columns on default templates Need Printing server to work (APEX 5 set to ORDS by default) Use of printing server Let's have a look Classic report
  8. 8. Custom report queries User defined layouts Need printing server (ORDS, BI Pub, FOP) Ability to run reports using APEX APIs XSL-FO (and RTF templates only with BI Publisher) Shared components - Reports
  9. 9. ... BEGIN l_document := APEX_UTIL.GET_PRINT_DOCUMENT ( p_report_data => :P1_XML, p_report_layout => :P1_XSL, p_report_layout_type => 'xsl-fo', p_document_format => 'pdf'); l_id := APEX_MAIL.SEND( p_to => :P35_MAIL_TO, p_from => 'noreplies@oracle.com', p_subj => 'sending PDF by using print API', p_body => 'Please review the attachment.', p_body_html => 'Please review the attachment'); APEX_MAIL.ADD_ATTACHMENT ( p_mail_id => l_id, p_attachment => l_document, p_filename => 'mydocument.pdf', p_mime_type => 'application/pdf'); END; APEX API
  10. 10. Limited choice XSL-FO editor requires a licence (Altova and Stylus Studio) RTF templates with BI Publisher printing server = high costs Layouts are kept in APEX and are application related Editing XSL-FO templates not so intuitive Where next? Challenges
  11. 11. Option 1. APEX Plugins
  12. 12. Example “Reports 2 PDF” by Anton Scheffer Completely PL/SQL based Uses report region source to generate PDFs Great replacement if no access to FOP server or ORDS DEMO APEX Plugins
  13. 13. Supports pagination Easy to setup and run Needed an update to work in APEX 5 Not ideal for more complex data types Can be used for simplest requirements Can be used as development tool on APEX 4.2 APEX Plugins – overview
  14. 14. APEX Print capability and printing options Printing Alternatives Summary
  15. 15. Option 2. PL/PDF
  16. 16. Installation and getting it run is easy Completely PL/SQL based, one of oldest tools around Offers different packages for PDF and Office files Create reports line by line, update existing files or adding new pages Word templates support (NEW) Supports complex data types, PDF encryption and digital signature DEMO PL/PDF
  17. 17. …. plpdf.Init; /* Begin a new page: page orientation: default (portrait) */ plpdf.NewPage; /* Sets the font and its properties */ plpdf.SetPrintFont(p_family => 'Arial', -- Font family: Arial p_style => null, -- Font style: regular (default) p_size => 12 ); /* Prints a text starting from the specified position. */ plpdf.PrintoutText(p_x => 50, -- X coordinate for the start of the text p_y => 50, -- Y coordinate for the start of the text p_txt => 'Print Text Example' ); /* Returns the generated PDF document. The document is closed and then returned in the OUT parameter. */ plpdf.SendDoc(p_blob => l_blob ); insert into STORE_BLOB (blob_file, created_date, filename) VALUES (l_blob, sysdate, 'PrintText'); commit; end; PL/PDF example
  18. 18. Most favorite DBA option Can work in all APEX versions Document modification supported Creating a document challenging with large number of lines User guide documentation confusing – lots to learn No external components Maintenance would require a lot of efforts Overall not my favorite PL/PDF – overview
  19. 19. Option 3. JRXML2PDF
  20. 20. Based on JRXML report definition Pure PL/SQL solution No JasperServer installation Installation was easy → APEX import (or PL/SQL script) MIT and LGPL Licence Supports only PDF Images, some charts, google maps and document merge DEMO JRXML2PDF by Andreas Weidner
  21. 21. DECLARE vcName VARCHAR2(200); lParams PK_JRXML2PDF_REPGEN.TPARAMLIST; bl BLOB; BEGIN vcName:='THE_NAME_OF_YOUR_REPORT_IN_JRXML_REPORT_DEFINITIONS'; bl :=PK_JRXML2PDF_REPGEN.FK_RUN(i_vcName=>vcName); PK_JRXML2PDF_REPGEN.PR_SHOW_REPORT(bl); APEX_APPLICATION.STOP_APEX_ENGINE; END; JRXML2PDF example
  22. 22. Younger brother of JasperReports With no authentication problems Worked with APEX 5 with no problems Love the idea and would not mind using it within its limitations Supports only PDFs Documentation limiting Learning based on demo examples JRXML2PDF – overview
  23. 23. Option 4. JASPER REPORTS
  24. 24. Java based solution Reports created in iReport and deployed to server Many internet resources on How To's (Dietmar Aust, Enciva.com, Damien Antipa) Reports are requested using URLs http://localhost:11139/MyReports/servlets/viewer?jr_report_uri=Simple_Blue.jrxml&jss_c ontext=cfb89f9d-8a11-4e12-a18a-6ea70f5c2b9c&jr_async=true All formats and complex data types Public and commercial version DEMO Jasper Reports
  25. 25. begin xlib_jasperreports.show_report (p_rep_name => :p5_rep_name, p_rep_format => :p5_rep_format, p_data_source => :p5_data_source, p_out_filename => :p5_out_filename, p_rep_locale => :p5_rep_locale, p_rep_encoding => :p5_rep_encoding, p_additional_params => :p5_additional_params); -- stop rendering of the current APEX page apex_application.g_unrecoverable_error := true; end; JasperReport example
  26. 26. Good documentation Pixel perfect results All needed formats Matrix report support Improved RTF editing Best free option on the market Biggest issue is authentication problems Requires server configuration JasperReports – overview
  27. 27. Option 5. DOXXY
  28. 28. Report design using Word templates Supports PDF and Docx file formats within different packages Support for conditional formatting and images (but requires ORDSYS schema (multimedia) of Oracle) Comes with APEX UI for managing reports http://www.iadvise-hosting.be/pls/apexsaas6/f?p=125 Can be used as PL/SQL API only DEMO Doxxy by iAdvise
  29. 29. … l_bind_variables('P_ORDER_ID').number_value := 1; l_doc := BL$DG4O_INTERFACE.generate_document (p_document => '/My Folder/Orders Document' ,p_document_template_name => 'Orders Template' ,p_bind_variables => l_bind_variables ,p_application_key => '' ,p_user_id => '' ,p_format => 'DOCX'); …. owa_util.http_header_close; wpg_docload.download_file(l_doc); apex_application.stop_apex_engine; END; Doxxy API example
  30. 30. Good documentation Data and templates are kept separate Limited output formats – PDF and Docx Installation only using APEX application import Complex data types could be a challenge DEMO did not work in Firefox?! - team working on fix Installation in my own schema did not work for me Doxxy – overview
  31. 31. Option 6. BI Publisher
  32. 32. Professional reporting tool Supports all output formats Ability to schedule, save and email reports Templates are built using MS Word and BI Publisher extension Used as print server Rendering reports using links, direct PL/SQL and SOAP webservice DEMO All mighty BI Publisher
  33. 33. Click to add Text
  34. 34. Good documentation including many white-papers how to integrate it with APEX Easy to design templates Best reporting package Templates are highly sensitive to Word extension versions that can be a huge problem Most expensive option of all BI Publisher – overview
  35. 35. Option 7. ApexOfficePrint
  36. 36. PL/SQL solution Comes as APEX Plugin and PL/SQL API Supports PDF, HTML and Office formats (.docx, rtf, .xlsx, .ppt) Only solution that offers printing 'as service' Multiple report data sources Templates created using Word, Excel and PowerPoint Multiple template source supported (on server, workspace images or table) ApexOfficePrint by APEX R&D
  37. 37. AOP as Plugin
  38. 38. Good documentation Easy to use and pick up Package options to choose from (as service or local server) With automatic template check ability Rendering of reports using APEX plugin or PL/SQL API Support for most data types images, barcodes, charts and formulas Optimized for performance AOP – overview
  39. 39. www.apexofficeprint.com
  40. 40. ❖ APEX Print capability and printing options ❖ Printing Alternatives ❖ Summary
  41. 41. Click to add Text
  42. 42. Q&A www.apexRnD.co.nz lschilde.blogspot.com @LinoSchilde lschilde@apexRnD.co.nz
  43. 43. Click to add Text

×