View
232
Download
4
Category
Preview:
Citation preview
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Ways to get a BI Publisher Report from APEX
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Oracle BI Publisher
Layout & Data Definition are separated in BI Publisher
very flexible usage
different ways to integrate in APEX
Report
Layout
Language
BI Publisher
Report Data Modell
1
0..*
Sub Templates
Style Templates
0..* 1
1
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
4 Main Questions
• Where is the data defined?
• Where is the layout located?
• How is the BI Publisher Report called from APEX?
• And what are advantages & disadvantages of the options?
Oracle Template How-to Guide 3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Template How-to Guide 4
What are the Options?
Call
Layout
Report
Shared Component
„Coding“
Database BIP
BIP APEX
(„print“) Link
Servlet
HTTP
APEX_UTIL
Button
WebService
PL/SQL
Database
Data
APEX
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Ways we look for
1 Convert Servlet – Data (Report) & Layout in APEX
Oracle Confidential – Internal/Restricted/Highly Restricted 5
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Configuration for Servlet Integration
Internal
Workspace
Oracle Template How-to Guide 6
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Ways we look for
1
2
Convert Servlet – Data (Report) & Layout in APEX
Convert Servlet – now Data as Shared Component
Oracle Confidential – Internal/Restricted/Highly Restricted 7
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Template How-to Guide 8
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
APEX_UTIL.GET_PRINT_DOCUMENT
APEX_UTIL.GET_PRINT_DOCUMENT ( p_application_id => 111,
p_report_query_name => 'MyQuery',
p_report_layout_name => 'Layout_APEX_SC',
p_report_layout_type => 'rtf',
p_document_format => 'pdf',
p_print_server => null)
);
Oracle Template How-to Guide 9
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Ways we look for
1
2
3
Convert Servlet – Data (Report) & Layout in APEX
Convert Servlet – now Data as Shared Component
Convert Servlet – now without APEX
Oracle Confidential – Internal/Restricted/Highly Restricted 10
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
3 Steps
• CREATE an APEX Session in PL/SQL
• Set your wished session state
– -> set your parameters
• Use APEX_UTIL.GET_PRINT_DOCUMENT
Oracle Template How-to Guide 11
…. apex_custom_auth.post_login( p_uname => p_app_user, p_session_id => APEX_CUSTOM_AUTH.GET_NEXT_SESSION_ID, p_app_page => apex_application.g_flow_id||':'||p_app_page_id);
APEX_UTIL.SET_SESSION_STATE ( p_name => 'P20_ABTEILUNG', p_value => p_deptno);
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Ways we look for
1
2
3
Convert Servlet – Data (Report) & Layout in APEX
Convert Servlet – now Data as Shared Component
Convert Servlet – now without APEX
HTTP – Data & Layout in BIP
Oracle Confidential – Internal/Restricted/Highly Restricted 12
4
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Ways we look for
1
2
3
Convert Servlet – Data (Report) & Layout in APEX
Convert Servlet – now Data as Shared Component
Convert Servlet – now without APEX
HTTP – Data & Layout in BIP
WebService – Data & Layout in BIP
Oracle Confidential – Internal/Restricted/Highly Restricted 13
4
5
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Extract and convert document from Envelope
Select clob001,
APEX_WEB_SERVICE.CLOBBASE642BLOB(report_blob)
from apex_collections, xmltable(
xmlnamespaces(default 'http://xmlns.oracle.com/oxp/service/v2'),
'//runReportReturn'
passing xmltype(clob001)
columns
report_blob clob path 'reportBytes')
where collection_name = 'BIP_COLLECTION';
Oracle Template How-to Guide 14
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Ways we look for
1
2
3
Convert Servlet – Data (Report) & Layout in APEX
Convert Servlet – now Data as Shared Component
Convert Servlet – now without APEX
HTTP – Data & Layout in BIP
WebService – Data & Layout in BIP
WebService – now via Package
Oracle Confidential – Internal/Restricted/Highly Restricted 15
4
5
6
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
WebService in Package
• Built Envelope
• Make Request with Envelope (APEX_WEB_SERVICE.MAKE_REQUEST) to WebService-URL
• Extract „reportBytes“ from response und convert to BLOB
g_envelope_bip varchar2(4000) := '<soapenv:Envelope…..
v_soap_response := apex_web_service.make_request( p_url => g_webservice_url, p_action => '', p_envelope => v_soap_envelope );
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Native Integration (Convert Servlet)
• Simple
• No BIP-Admin, only running
• Single point of development
• Reporting in Apps-Export included
• No additional Security-Work
WebService via Database
• Flexible and powerful
• Reusability higher
• Security via technical User
• Some Coding needed
Oracle Template How-to Guide 18
Two preferred ways
Recommended