SlideShare a Scribd company logo
1 of 49
Download to read offline
A SPECIAL REPORT
Reporting solutions for ADF Applications




Luc Bors
Oracle Certified ADF Implementation Specialist

AMIS Services, The Netherlands
Oracle ADF Specialized Partner


Monday, June 25, 2012
ODTUG KScope 12
San Antonio, Texas, USA
REPORTING
I USE ADF, WHAT ABOUT REPORTS ?
ORACLE REPORTS DEVELOPER
CREATING ORACLE REPORTS

•   Example:

    – Employees per Department Report

    – Parameter P_DEPARTMENT_ID
HOW TO CALL THE REPORT ?
USING ORACLE REPORTS

•   Use Case : Invoke the report for the currently selected
    Department in an ADF table
PREPARING THE CALL

           •   Create a bean and method to invoke the report

<managed-bean id="__13">
   <managed-bean-name id="__14">oracleReportBean</managed-bean-name>
   <managed-bean-class id="__15">
              com.blogspot.lucbors.reporting.view.orarep.OracleReportBean
   </managed-bean-class>
   <managed-bean-scope id="__16">request</managed-bean-scope>
 </managed-bean>




           •   Provide report parameters

String   oraReportServerUrl = "http://192.168.2.8:8889/reports/rwservlet?";
String   reportNameParam ="report=";
String   reportDestypeParam = "destype=";
String   reportPDesformatParam = "desformat=";
String   reportUseridParam = "userid=“;
CONSTRUCTING THE CALL

               •   Construct Report Server URL; Including the parameters
public void runOracleReport(ActionEvent actionEvent) {

     String departmentParam = "p_department_id=";

      StringBuffer totalCallUrl = new StringBuffer();
      totalCallUrl.append(getOraReportServerUrl());
      totalCallUrl.append(getReportNameParam().concat("employees.rdf")+"&");
      totalCallUrl.append(getReportDestypeParam().concat("cache")+"&");
      totalCallUrl.append(getReportPDesformatParam().concat("html")+"&");
      totalCallUrl.append(getReportUseridParam().concat("hr/hr@xe")+"&");
      totalCallUrl.append(departmentParam.concat(getDepartmentId()));

        setOraReportUrl(totalCallUrl.toString());
}


    public String getDepartmentId() {
      DCIteratorBinding it = ADFUtils.findIterator("SalaryOverview1Iterator");
      oracle.jbo.domain.Number deptId =
         (oracle.jbo.domain.Number)it.getCurrentRow().getAttribute("DepartmentId");
      return deptId.toString();
        }
CALL AND SHOW THE REPORT

            •   Call ………

<af:commandToolbarButton text="Run Oracle Report" id="cb3“
                actionListener="#{oracleReportBean.runOracleReport}">
       <af:showPopupBehavior popupId=":::showOraRpt" triggerType="click"/>
</af:commandToolbarButton>




            •   ……. And Show the report

<af:popup id="showOraRpt" animate="default">
          <af:panelWindow id="pw3" modal="true"
                          title="External Internet Info in a Modal Popup"
                          contentHeight="625" contentWidth="700" resize="on">
            <af:inlineFrame id="if3" shortDesc="This is an inline frame"
                            source="#{oracleReportBean.oraReportUrl}"
                            styleClass="AFStretchWidth"
                            inlineStyle="height:600px;">
            </af:inlineFrame>
</af:panelWindow>
SHOWING THE ORACLE REPORT

•   ….. and the result…..
CAN I USE FMW REPORTING TOOLS ?
ORACLE BI PUBLISHER
ORACLE BI PUBLISHER
ORACLE BI PUBLISHER
ORACLE BI PUBLISHER
PREPARING THE CALL

           •   Create a bean and method to invoke the report

 <managed-bean id="__13">
    <managed-bean-name id="__14">biPublisherBean</managed-bean-name>
    <managed-bean-class id="__15">
               com.blogspot.lucbors.reporting.view.orarep.BiPublisherBean
    </managed-bean-class>
    <managed-bean-scope id="__16">request</managed-bean-scope>
  </managed-bean>




           •   Provide report parameters

private static final String RAPPORT_SERVER_HOST_PARAM =
                     "http://192.168.56.101:7001/xmlpserver/~weblogic/";
private static final String RAPPORT_GENERAL_USER_PARAM = "<UN>";
private static final String RAPPORT_GENERAL_PASSWORD_PARAM = "<PW>";
CONSTRUCTING THE CALL

            •   Construct Report Server URL; Including the parameters
 public void startBiReport(ActionEvent event)
     {
       StringBuffer reportUrl = new StringBuffer();
       reportUrl.append(getRapportServerHost());
       reportUrl.append("/"+"EmployeesPerDepartment"+".xdo");
       // add standard params
       addStandardParams(rapport,reportUrl);
       // add report-specific params
       addReportParams(rapport, reportUrl);
       sLog.fine("Rapport start URL: "+reportUrl);
       setReportUrl(reportUrl.toString());
……..
CALL AND SHOW THE REPORT

            •   Call ………

<af:commandToolbarButton text="Run BI Publisher Report" id="cb3“
                actionListener="#{oracleReportBean.startBiReport}">
       <af:showPopupBehavior popupId=":::showBiRpt" triggerType="click"/>
</af:commandToolbarButton>




            •   ……. And Show the report

<af:popup id="showBiRpt" animate="default">
          <af:panelWindow id="pw3" modal="true"
                          title="External Internet Info in a Modal Popup"
                          contentHeight="625" contentWidth="700" resize="on">
            <af:inlineFrame id="if3" shortDesc="This is an inline frame"
                            source="#{<…BI report source>}"
                            styleClass="AFStretchWidth"
                            inlineStyle="height:600px;">
            </af:inlineFrame>
</af:panelWindow>
SHOWING THE BI PUBLISHER REPORT
ARE THERE OPEN SOURCE TOOLS ?
JASPER REPORTS
JASPER REPORTS - IREPORT
JASPER REPORT QUERY
CREATING JASPER REPORTS

•   Jasper  iReport as design tool
     – Select a report template
     – Create a new report based on a query




     – Add parameters
     – Test report in iReport
PREPARING JDEVELOPER AND ADF

•   Make sure to add Jasper libraries to ADF project
PREPARING THE CALL

         •   Create a bean and method to invoke the report

<managed-bean id="__13">
   <managed-bean-name id="__14">jasperReportBean</managed-bean-name>
   <managed-bean-class id="__15">
              com.blogspot.lucbors.reporting.view.orarep.JasperReportBean
   </managed-bean-class>
   <managed-bean-scope id="__16">request</managed-bean-scope>
 </managed-bean>
CALLING THE JASPER REPORT

         •   How to invoke the Jasper report ?
              – Get a handle to your template

 InputStream is = new FileInputStream (
        new File("C:/ReportingTools/myReports/MyFirstReport.jrxml"));

              – Define the file that will hold the generated report


OutputStream os=new FileOutputStream(
                        new File(this.filepath+this.reportname));

              – Optionally fill parameters


 Map parameters = new HashMap();
         parameters.put("P_DEPARTMENT_ID", getDepartmentId());
CALL AND SHOW THE REPORT

            •   Call ………

<af:commandToolbarButton text="Run Oracle Report" id="cb3“
                actionListener="#{oracleReportBean.runOracleReport}">
       <af:showPopupBehavior popupId=":::showOraRpt" triggerType="click"/>
</af:commandToolbarButton>
JASPER REPORTING

       •   Invoke the report ………
JasperDesign jasperDesign = JRXmlLoader.load(is);
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);

JasperPrint jasperPrint =
                JasperFillManager.fillReport(jasperReport, parameters, conn);

JasperExportManager.exportReportToPdfStream(jasperPrint, os);




       •   ……. And Show the result


  JasperViewer.viewReport(jasperPrint, false);
JASPER REPORTING

•   ….. And the result….
I DONT WANT MY OWN REPORTSERVER
REPORTING FROM THE CLOUD
DOCMOSIS REPORTING
CREATING TEMPLATES
UPLOAD TO THE CLOUD
CALLING THE CLOUD FROM ADF

•   Setup a connection

•   Build the request

•   Write request to outputstream
PREPARING THE CALL

           •   Create a bean and method to invoke the report

 <managed-bean id="__13">
    <managed-bean-name id="__14">docmosisReportBean</managed-bean-name>
    <managed-bean-class id="__15">
               com.blogspot.lucbors.reporting.view.docmosis.DocmosisReportBean
    </managed-bean-class>
    <managed-bean-scope id="__16">request</managed-bean-scope>
  </managed-bean>




           •   Provide report parameters

private static final String DWS_RENDER_URL =
                   "https://dws.docmosis.com/services/rs/render";
private static final String ACCESS_KEY = “<your acces key>";
private static final String OUTPUT_FORMAT = "pdf";
private static final String OUTPUT_FILE = "myWelcome." + OUTPUT_FORMAT;
CONSTRUCTING THE CALL

           •   Construct Report Server URL; Including the parameters
private static String buildRequestForEmployee() {
       // the name of the template in our cloud account we want to use
       String templateName = "/KScopeDemoTemplate.doc";

       StringBuilder sb = new StringBuilder();

       // Start building the instruction
       sb.append("<?xml version="1.0" encoding="utf-8"?>");
       sb.append("<render n");
       sb.append("accessKey="").append(ACCESS_KEY).append("" ");
       sb.append("templateName="").append(templateName).append("" ");
       sb.append("outputName="").append(OUTPUT_FILE).append("">n");
CONSTRUCTING THE CALL

           •   Adding the Data

// now add the data specifically for this template
       sb.append("<datan");
       sb.append(" date="").append(new Date()).append(""n");
       sb.append(" title="Creating documents with Docmosis from ADF ">n");
       String[] messages = {
         "Reporting from ADF Applications - What are the Options? John Flack",
         "ADF Data Visualization Tips & Techniques. Chris Muir",
         "How to Bring Common UI Patterns to ADF. Luc Bors",
         "and many many more......"};
     for (int i = 0; i < messages.length; i++) {
       sb.append("<suggestions msg="").append(messages[i]).append(""/>n");
       }

       sb.append("</data>n");
       sb.append("</render>n");
CALL AND SHOW THE REPORT

            •   Call ………

 <af:commandToolbarButton text="Run docmosis Report" id="cb5"
                      actionListener="#{docmosisReportBean.runDocmosisReport}">
       <af:showPopupBehavior popupId=":::showDocmosisReport"
                             triggerType="action"/>
</af:commandToolbarButton>



            •   ……. And Show the report

 <af:popup id="showDocmosisReport" animate="default">
     <af:panelWindow id="pw2" modal="true" title="The report"
                     contentHeight="625" contentWidth="700" resize="on">
       <af:inlineFrame id="if2" shortDesc="This is an inline frame“
         source="/showpdfservlet?name=#{docmosisReportBean.docmosisreportname}"
         styleClass="AFStretchWidth"
         inlineStyle="height:600px;"></af:inlineFrame>
     </af:panelWindow>
</af:popup>
SHOWING THE RESULT
REPORTING; YOUR OPTIONS
COMMON FEATURES
PRO’S AND CON’S ?
ARE THERE OTHER ALTERNATIVES?
MORE REPORTING IN THE FMW TRACK
RESOURCES

•   OTN – Reports :
    http://www.oracle.com/technetwork/middleware/reports/overvie
    w/index.html

•   OTN – BI Publisher :
    http://www.oracle.com/technetwork/middleware/bi-
    publisher/overview/index.html

•   Jasper : http://jasperforge.org/projects/jasperreports

•   Docmosis : https://www.docmosis.com/

•   OS Reporting overview : http://java-source.net/open-
    source/charting-and-reporting

•   AMIS tech blog : http://technology.amis.nl

•   ADF-EMG site : http://groups.google.com/group/adf-
    methodology/web/adf-reporting?pli=1
A SPECIAL REPORT
Reporting solutions for ADF Applications




Luc Bors
Oracle Certified ADF Implementation Specialist

AMIS Services, The Netherlands
Oracle ADF Specialized Partner


Monday, June 25, 2012
ODTUG KScope 12
San Antonio, Texas, USA

More Related Content

What's hot

Weaviate and Pinecone Comparison.pdf
Weaviate and Pinecone Comparison.pdfWeaviate and Pinecone Comparison.pdf
Weaviate and Pinecone Comparison.pdf
Evgenios Skitsanos
 
FIWARE Training: API Umbrella
FIWARE Training: API UmbrellaFIWARE Training: API Umbrella
FIWARE Training: API Umbrella
FIWARE
 

What's hot (20)

Mixed RealityとAzure Digital Twinsを組合わせてデジタルツインを可視化するためのTips
Mixed RealityとAzure Digital Twinsを組合わせてデジタルツインを可視化するためのTipsMixed RealityとAzure Digital Twinsを組合わせてデジタルツインを可視化するためのTips
Mixed RealityとAzure Digital Twinsを組合わせてデジタルツインを可視化するためのTips
 
Orion Context Broker 1.15.0
Orion Context Broker 1.15.0Orion Context Broker 1.15.0
Orion Context Broker 1.15.0
 
As risks continue to abound, many plan to strengthen internal controls
As risks continue to abound, many plan to strengthen internal controlsAs risks continue to abound, many plan to strengthen internal controls
As risks continue to abound, many plan to strengthen internal controls
 
FIWARE Wednesday Webinars - FIWARE Overview
FIWARE Wednesday Webinars - FIWARE OverviewFIWARE Wednesday Webinars - FIWARE Overview
FIWARE Wednesday Webinars - FIWARE Overview
 
Building Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEisBuilding Your Own IoT Platform using FIWARE GEis
Building Your Own IoT Platform using FIWARE GEis
 
FIWARE の ID 管理、アクセス制御、API 管理
FIWARE の ID 管理、アクセス制御、API 管理FIWARE の ID 管理、アクセス制御、API 管理
FIWARE の ID 管理、アクセス制御、API 管理
 
Referral Partnership Agreement
Referral Partnership AgreementReferral Partnership Agreement
Referral Partnership Agreement
 
Case of baazee
Case of baazeeCase of baazee
Case of baazee
 
Big Data: An Overview
Big Data: An OverviewBig Data: An Overview
Big Data: An Overview
 
Cyber law in bangladesh
Cyber law in bangladeshCyber law in bangladesh
Cyber law in bangladesh
 
世界経済フォーラム第四次産業革命センターによるブロックチェーンの相互運用フレームワークのご紹介
世界経済フォーラム第四次産業革命センターによるブロックチェーンの相互運用フレームワークのご紹介世界経済フォーラム第四次産業革命センターによるブロックチェーンの相互運用フレームワークのご紹介
世界経済フォーラム第四次産業革命センターによるブロックチェーンの相互運用フレームワークのご紹介
 
Cyber jurisdiction in India
Cyber jurisdiction in IndiaCyber jurisdiction in India
Cyber jurisdiction in India
 
DockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General Session
 
PropTech: The Future of Real Estate
PropTech: The Future of Real EstatePropTech: The Future of Real Estate
PropTech: The Future of Real Estate
 
FIWARE Context Information Management
FIWARE Context Information ManagementFIWARE Context Information Management
FIWARE Context Information Management
 
Embedded Finance - a new $7 trillion market opportunity
Embedded Finance - a new $7 trillion market opportunityEmbedded Finance - a new $7 trillion market opportunity
Embedded Finance - a new $7 trillion market opportunity
 
Weaviate and Pinecone Comparison.pdf
Weaviate and Pinecone Comparison.pdfWeaviate and Pinecone Comparison.pdf
Weaviate and Pinecone Comparison.pdf
 
Metaverse & Money
Metaverse & MoneyMetaverse & Money
Metaverse & Money
 
FIWARE Training: API Umbrella
FIWARE Training: API UmbrellaFIWARE Training: API Umbrella
FIWARE Training: API Umbrella
 
Session 3 - i4Trust components for Identity Management and Access Control i4T...
Session 3 - i4Trust components for Identity Management and Access Control i4T...Session 3 - i4Trust components for Identity Management and Access Control i4T...
Session 3 - i4Trust components for Identity Management and Access Control i4T...
 

Viewers also liked

Guidelines for moving from Oracle Forms to Oracle ADF and SOA
Guidelines for moving from Oracle Forms to Oracle ADF and SOAGuidelines for moving from Oracle Forms to Oracle ADF and SOA
Guidelines for moving from Oracle Forms to Oracle ADF and SOA
Steven Davelaar
 
Oracle ADF Overview
Oracle ADF OverviewOracle ADF Overview
Oracle ADF Overview
Bahaa Farouk
 
Working with Portlets in ADF and Webcenter
Working with Portlets in ADF and WebcenterWorking with Portlets in ADF and Webcenter
Working with Portlets in ADF and Webcenter
DataNext Solutions
 
Oracle ADF Task Flows for Beginners
Oracle ADF Task Flows for BeginnersOracle ADF Task Flows for Beginners
Oracle ADF Task Flows for Beginners
DataNext Solutions
 
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
Steven Davelaar
 

Viewers also liked (16)

Building a custom Oracle ADF Component
Building a custom Oracle ADF ComponentBuilding a custom Oracle ADF Component
Building a custom Oracle ADF Component
 
Guidelines for moving from Oracle Forms to Oracle ADF and SOA
Guidelines for moving from Oracle Forms to Oracle ADF and SOAGuidelines for moving from Oracle Forms to Oracle ADF and SOA
Guidelines for moving from Oracle Forms to Oracle ADF and SOA
 
AMIS OOW Review 2012- Deel 1 - Lucas Jellema & Paul Uijtewaal
AMIS OOW Review 2012- Deel 1 - Lucas Jellema & Paul UijtewaalAMIS OOW Review 2012- Deel 1 - Lucas Jellema & Paul Uijtewaal
AMIS OOW Review 2012- Deel 1 - Lucas Jellema & Paul Uijtewaal
 
so-aDF
so-aDFso-aDF
so-aDF
 
Running ADF Faces on Tablets and Mobile Phones
Running ADF Faces on Tablets and Mobile PhonesRunning ADF Faces on Tablets and Mobile Phones
Running ADF Faces on Tablets and Mobile Phones
 
ADF Worst Practices (UKOUG Tech2013)
ADF Worst Practices (UKOUG Tech2013)ADF Worst Practices (UKOUG Tech2013)
ADF Worst Practices (UKOUG Tech2013)
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM Metrics
 
Programming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionappsProgramming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionapps
 
18 Invaluable Lessons About ADF-JSF Interaction
18 Invaluable Lessons About ADF-JSF Interaction18 Invaluable Lessons About ADF-JSF Interaction
18 Invaluable Lessons About ADF-JSF Interaction
 
Oracle ADF Case Study
Oracle ADF Case StudyOracle ADF Case Study
Oracle ADF Case Study
 
Talking Services with Oracle ADF and Oracle SOA Suite
Talking Services with Oracle ADF and Oracle SOA SuiteTalking Services with Oracle ADF and Oracle SOA Suite
Talking Services with Oracle ADF and Oracle SOA Suite
 
Oracle ADF Overview
Oracle ADF OverviewOracle ADF Overview
Oracle ADF Overview
 
Working with Portlets in ADF and Webcenter
Working with Portlets in ADF and WebcenterWorking with Portlets in ADF and Webcenter
Working with Portlets in ADF and Webcenter
 
Oracle ADF Task Flows for Beginners
Oracle ADF Task Flows for BeginnersOracle ADF Task Flows for Beginners
Oracle ADF Task Flows for Beginners
 
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practi...
 
ADF in action 1.2
ADF in action 1.2ADF in action 1.2
ADF in action 1.2
 

Similar to Reporting solutions for ADF Applications

ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
Spiffy
 
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAdvance Sql Server Store procedure Presentation
Advance Sql Server Store procedure Presentation
Amin Uddin
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
NAVER D2
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on lab
NAVER D2
 
GHC Participant Training
GHC Participant TrainingGHC Participant Training
GHC Participant Training
AidIQ
 

Similar to Reporting solutions for ADF Applications (20)

Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
How to execute an oracle stored procedure with nested table as a parameter fr...
How to execute an oracle stored procedure with nested table as a parameter fr...How to execute an oracle stored procedure with nested table as a parameter fr...
How to execute an oracle stored procedure with nested table as a parameter fr...
 
Lab manual asp.net
Lab manual asp.netLab manual asp.net
Lab manual asp.net
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
 
Dive into DevOps | March, Building with Terraform, Volodymyr Tsap
Dive into DevOps | March, Building with Terraform, Volodymyr TsapDive into DevOps | March, Building with Terraform, Volodymyr Tsap
Dive into DevOps | March, Building with Terraform, Volodymyr Tsap
 
Spring batch
Spring batchSpring batch
Spring batch
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
 
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure PresentationAdvance Sql Server Store procedure Presentation
Advance Sql Server Store procedure Presentation
 
Sql storeprocedure
Sql storeprocedureSql storeprocedure
Sql storeprocedure
 
Bring the light in your Always FREE Oracle Cloud
Bring the light in your Always FREE Oracle CloudBring the light in your Always FREE Oracle Cloud
Bring the light in your Always FREE Oracle Cloud
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on lab
 
2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation2013 Collaborate - OAUG - Presentation
2013 Collaborate - OAUG - Presentation
 
Spring Batch in Code - simple DB to DB batch applicaiton
Spring Batch in Code - simple DB to DB batch applicaitonSpring Batch in Code - simple DB to DB batch applicaiton
Spring Batch in Code - simple DB to DB batch applicaiton
 
GHC Participant Training
GHC Participant TrainingGHC Participant Training
GHC Participant Training
 

More from Getting value from IoT, Integration and Data Analytics

More from Getting value from IoT, Integration and Data Analytics (20)

AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaSAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: DataAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
 
10 tips voor verbetering in je Linkedin profiel
10 tips voor verbetering in je Linkedin profiel10 tips voor verbetering in je Linkedin profiel
10 tips voor verbetering in je Linkedin profiel
 
Iot in de zorg the next step - fit for purpose
Iot in de zorg   the next step - fit for purpose Iot in de zorg   the next step - fit for purpose
Iot in de zorg the next step - fit for purpose
 
Iot overview .. Best practices and lessons learned by Conclusion Conenct
Iot overview .. Best practices and lessons learned by Conclusion Conenct Iot overview .. Best practices and lessons learned by Conclusion Conenct
Iot overview .. Best practices and lessons learned by Conclusion Conenct
 
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
IoT Fit for purpose - how to be successful in IOT Conclusion Connect IoT Fit for purpose - how to be successful in IOT Conclusion Connect
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
 
Industry and IOT Overview of protocols and best practices Conclusion Connect
Industry and IOT Overview of protocols and best practices  Conclusion ConnectIndustry and IOT Overview of protocols and best practices  Conclusion Connect
Industry and IOT Overview of protocols and best practices Conclusion Connect
 
IoT practical case using the people counter sensing traffic density build usi...
IoT practical case using the people counter sensing traffic density build usi...IoT practical case using the people counter sensing traffic density build usi...
IoT practical case using the people counter sensing traffic density build usi...
 
R introduction decision_trees
R introduction decision_treesR introduction decision_trees
R introduction decision_trees
 
Introduction overviewmachinelearning sig Door Lucas Jellema
Introduction overviewmachinelearning sig Door Lucas JellemaIntroduction overviewmachinelearning sig Door Lucas Jellema
Introduction overviewmachinelearning sig Door Lucas Jellema
 
IoT and the Future of work
IoT and the Future of work IoT and the Future of work
IoT and the Future of work
 
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
 
Ethereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter ReitsmaEthereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter Reitsma
 
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
Blockchain - Techniek en usecases door Robert van Molken - AMIS - ConclusionBlockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
 
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
 
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
 
Omc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van SoestOmc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van Soest
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Reporting solutions for ADF Applications

  • 1. A SPECIAL REPORT Reporting solutions for ADF Applications Luc Bors Oracle Certified ADF Implementation Specialist AMIS Services, The Netherlands Oracle ADF Specialized Partner Monday, June 25, 2012 ODTUG KScope 12 San Antonio, Texas, USA
  • 3. I USE ADF, WHAT ABOUT REPORTS ?
  • 5. CREATING ORACLE REPORTS • Example: – Employees per Department Report – Parameter P_DEPARTMENT_ID
  • 6. HOW TO CALL THE REPORT ?
  • 7. USING ORACLE REPORTS • Use Case : Invoke the report for the currently selected Department in an ADF table
  • 8. PREPARING THE CALL • Create a bean and method to invoke the report <managed-bean id="__13"> <managed-bean-name id="__14">oracleReportBean</managed-bean-name> <managed-bean-class id="__15"> com.blogspot.lucbors.reporting.view.orarep.OracleReportBean </managed-bean-class> <managed-bean-scope id="__16">request</managed-bean-scope> </managed-bean> • Provide report parameters String oraReportServerUrl = "http://192.168.2.8:8889/reports/rwservlet?"; String reportNameParam ="report="; String reportDestypeParam = "destype="; String reportPDesformatParam = "desformat="; String reportUseridParam = "userid=“;
  • 9. CONSTRUCTING THE CALL • Construct Report Server URL; Including the parameters public void runOracleReport(ActionEvent actionEvent) { String departmentParam = "p_department_id="; StringBuffer totalCallUrl = new StringBuffer(); totalCallUrl.append(getOraReportServerUrl()); totalCallUrl.append(getReportNameParam().concat("employees.rdf")+"&"); totalCallUrl.append(getReportDestypeParam().concat("cache")+"&"); totalCallUrl.append(getReportPDesformatParam().concat("html")+"&"); totalCallUrl.append(getReportUseridParam().concat("hr/hr@xe")+"&"); totalCallUrl.append(departmentParam.concat(getDepartmentId())); setOraReportUrl(totalCallUrl.toString()); } public String getDepartmentId() { DCIteratorBinding it = ADFUtils.findIterator("SalaryOverview1Iterator"); oracle.jbo.domain.Number deptId = (oracle.jbo.domain.Number)it.getCurrentRow().getAttribute("DepartmentId"); return deptId.toString(); }
  • 10. CALL AND SHOW THE REPORT • Call ……… <af:commandToolbarButton text="Run Oracle Report" id="cb3“ actionListener="#{oracleReportBean.runOracleReport}"> <af:showPopupBehavior popupId=":::showOraRpt" triggerType="click"/> </af:commandToolbarButton> • ……. And Show the report <af:popup id="showOraRpt" animate="default"> <af:panelWindow id="pw3" modal="true" title="External Internet Info in a Modal Popup" contentHeight="625" contentWidth="700" resize="on"> <af:inlineFrame id="if3" shortDesc="This is an inline frame" source="#{oracleReportBean.oraReportUrl}" styleClass="AFStretchWidth" inlineStyle="height:600px;"> </af:inlineFrame> </af:panelWindow>
  • 11. SHOWING THE ORACLE REPORT • ….. and the result…..
  • 12. CAN I USE FMW REPORTING TOOLS ?
  • 17. PREPARING THE CALL • Create a bean and method to invoke the report <managed-bean id="__13"> <managed-bean-name id="__14">biPublisherBean</managed-bean-name> <managed-bean-class id="__15"> com.blogspot.lucbors.reporting.view.orarep.BiPublisherBean </managed-bean-class> <managed-bean-scope id="__16">request</managed-bean-scope> </managed-bean> • Provide report parameters private static final String RAPPORT_SERVER_HOST_PARAM = "http://192.168.56.101:7001/xmlpserver/~weblogic/"; private static final String RAPPORT_GENERAL_USER_PARAM = "<UN>"; private static final String RAPPORT_GENERAL_PASSWORD_PARAM = "<PW>";
  • 18. CONSTRUCTING THE CALL • Construct Report Server URL; Including the parameters public void startBiReport(ActionEvent event) { StringBuffer reportUrl = new StringBuffer(); reportUrl.append(getRapportServerHost()); reportUrl.append("/"+"EmployeesPerDepartment"+".xdo"); // add standard params addStandardParams(rapport,reportUrl); // add report-specific params addReportParams(rapport, reportUrl); sLog.fine("Rapport start URL: "+reportUrl); setReportUrl(reportUrl.toString()); ……..
  • 19. CALL AND SHOW THE REPORT • Call ……… <af:commandToolbarButton text="Run BI Publisher Report" id="cb3“ actionListener="#{oracleReportBean.startBiReport}"> <af:showPopupBehavior popupId=":::showBiRpt" triggerType="click"/> </af:commandToolbarButton> • ……. And Show the report <af:popup id="showBiRpt" animate="default"> <af:panelWindow id="pw3" modal="true" title="External Internet Info in a Modal Popup" contentHeight="625" contentWidth="700" resize="on"> <af:inlineFrame id="if3" shortDesc="This is an inline frame" source="#{<…BI report source>}" styleClass="AFStretchWidth" inlineStyle="height:600px;"> </af:inlineFrame> </af:panelWindow>
  • 20. SHOWING THE BI PUBLISHER REPORT
  • 21. ARE THERE OPEN SOURCE TOOLS ?
  • 23. JASPER REPORTS - IREPORT
  • 25. CREATING JASPER REPORTS • Jasper  iReport as design tool – Select a report template – Create a new report based on a query – Add parameters – Test report in iReport
  • 26. PREPARING JDEVELOPER AND ADF • Make sure to add Jasper libraries to ADF project
  • 27. PREPARING THE CALL • Create a bean and method to invoke the report <managed-bean id="__13"> <managed-bean-name id="__14">jasperReportBean</managed-bean-name> <managed-bean-class id="__15"> com.blogspot.lucbors.reporting.view.orarep.JasperReportBean </managed-bean-class> <managed-bean-scope id="__16">request</managed-bean-scope> </managed-bean>
  • 28. CALLING THE JASPER REPORT • How to invoke the Jasper report ? – Get a handle to your template InputStream is = new FileInputStream ( new File("C:/ReportingTools/myReports/MyFirstReport.jrxml")); – Define the file that will hold the generated report OutputStream os=new FileOutputStream( new File(this.filepath+this.reportname)); – Optionally fill parameters Map parameters = new HashMap(); parameters.put("P_DEPARTMENT_ID", getDepartmentId());
  • 29. CALL AND SHOW THE REPORT • Call ……… <af:commandToolbarButton text="Run Oracle Report" id="cb3“ actionListener="#{oracleReportBean.runOracleReport}"> <af:showPopupBehavior popupId=":::showOraRpt" triggerType="click"/> </af:commandToolbarButton>
  • 30. JASPER REPORTING • Invoke the report ……… JasperDesign jasperDesign = JRXmlLoader.load(is); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn); JasperExportManager.exportReportToPdfStream(jasperPrint, os); • ……. And Show the result JasperViewer.viewReport(jasperPrint, false);
  • 31. JASPER REPORTING • ….. And the result….
  • 32. I DONT WANT MY OWN REPORTSERVER
  • 36. UPLOAD TO THE CLOUD
  • 37. CALLING THE CLOUD FROM ADF • Setup a connection • Build the request • Write request to outputstream
  • 38. PREPARING THE CALL • Create a bean and method to invoke the report <managed-bean id="__13"> <managed-bean-name id="__14">docmosisReportBean</managed-bean-name> <managed-bean-class id="__15"> com.blogspot.lucbors.reporting.view.docmosis.DocmosisReportBean </managed-bean-class> <managed-bean-scope id="__16">request</managed-bean-scope> </managed-bean> • Provide report parameters private static final String DWS_RENDER_URL = "https://dws.docmosis.com/services/rs/render"; private static final String ACCESS_KEY = “<your acces key>"; private static final String OUTPUT_FORMAT = "pdf"; private static final String OUTPUT_FILE = "myWelcome." + OUTPUT_FORMAT;
  • 39. CONSTRUCTING THE CALL • Construct Report Server URL; Including the parameters private static String buildRequestForEmployee() { // the name of the template in our cloud account we want to use String templateName = "/KScopeDemoTemplate.doc"; StringBuilder sb = new StringBuilder(); // Start building the instruction sb.append("<?xml version="1.0" encoding="utf-8"?>"); sb.append("<render n"); sb.append("accessKey="").append(ACCESS_KEY).append("" "); sb.append("templateName="").append(templateName).append("" "); sb.append("outputName="").append(OUTPUT_FILE).append("">n");
  • 40. CONSTRUCTING THE CALL • Adding the Data // now add the data specifically for this template sb.append("<datan"); sb.append(" date="").append(new Date()).append(""n"); sb.append(" title="Creating documents with Docmosis from ADF ">n"); String[] messages = { "Reporting from ADF Applications - What are the Options? John Flack", "ADF Data Visualization Tips & Techniques. Chris Muir", "How to Bring Common UI Patterns to ADF. Luc Bors", "and many many more......"}; for (int i = 0; i < messages.length; i++) { sb.append("<suggestions msg="").append(messages[i]).append(""/>n"); } sb.append("</data>n"); sb.append("</render>n");
  • 41. CALL AND SHOW THE REPORT • Call ……… <af:commandToolbarButton text="Run docmosis Report" id="cb5" actionListener="#{docmosisReportBean.runDocmosisReport}"> <af:showPopupBehavior popupId=":::showDocmosisReport" triggerType="action"/> </af:commandToolbarButton> • ……. And Show the report <af:popup id="showDocmosisReport" animate="default"> <af:panelWindow id="pw2" modal="true" title="The report" contentHeight="625" contentWidth="700" resize="on"> <af:inlineFrame id="if2" shortDesc="This is an inline frame“ source="/showpdfservlet?name=#{docmosisReportBean.docmosisreportname}" styleClass="AFStretchWidth" inlineStyle="height:600px;"></af:inlineFrame> </af:panelWindow> </af:popup>
  • 46. ARE THERE OTHER ALTERNATIVES?
  • 47. MORE REPORTING IN THE FMW TRACK
  • 48. RESOURCES • OTN – Reports : http://www.oracle.com/technetwork/middleware/reports/overvie w/index.html • OTN – BI Publisher : http://www.oracle.com/technetwork/middleware/bi- publisher/overview/index.html • Jasper : http://jasperforge.org/projects/jasperreports • Docmosis : https://www.docmosis.com/ • OS Reporting overview : http://java-source.net/open- source/charting-and-reporting • AMIS tech blog : http://technology.amis.nl • ADF-EMG site : http://groups.google.com/group/adf- methodology/web/adf-reporting?pli=1
  • 49. A SPECIAL REPORT Reporting solutions for ADF Applications Luc Bors Oracle Certified ADF Implementation Specialist AMIS Services, The Netherlands Oracle ADF Specialized Partner Monday, June 25, 2012 ODTUG KScope 12 San Antonio, Texas, USA