Integrating Jaspersoft with Java Applications


Published on

Learn how to integrate JasperReports Server with your Java Application.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • To truly deliver integrated intelligence within a software application or business process, there are 3 primary requirements: 1. must be a simple self-service reporting and analysis environment that allows any user profile, from an executive to data analyst, to get the information they need; 2. must be easy to embed and integrate within the application or process, enabling different techniques to liberate the data generated by the application and encouraging widespread use of it as information; and 3. must be affordable even on a large scale, so there is no question about the value of delivering more information to any user who could benefit.Jaspersoft has become the intelligence inside tens of thousands of software applications and business processes globally, because we’ve set the standard for highly-embeddable and affordable self-service BI. Each day, our software touches millions of people and enables them to make decisions faster using timely, actionable data. Our customers have made Jaspersoft the Intelligence Inside.
  • **include instructor notes, talking points
  • **include instructor notes, talking points
  • **include instructor notes, talking points
  • Include notes for demo-ing, scenario
  • Include notes for demo-ing, scenario
  • **EDITED**
  • Include notes for demo-ing, scenario
  • **EDITED**
  • Include notes for demo-ing, scenario
  • Include notes for demo-ing, scenario
  • Include notes for demo-ing, scenario
  • Integrating Jaspersoft with Java Applications

    1. 1. Integrating Jaspersoft with Java Applications1
    2. 2. Jaspersoft: The Intelligence Inside©2013 Jaspersoft Corporation 2Self-Service BI + Embeddable + Affordable“We empower millions of people every day to make decisionsfaster by delivering timely, actionable data to them inside their appsand business process through an embeddable, cost-effectivereporting and analytics platform.”
    3. 3. Strong Partnerships, Broad RecognitionHigh Growth SubscriptionRevenue Company©2013 Jaspersoft CorporationWorld‟s Most Widely Deployed BI• Commercial Open Source BI Suite• Nearly 200 people worldwide• 16,000,000 downloads• 325,000 community members• 130,000 embedded applications• 1,800 subscription customersJaspersoft: High Growth and Momentum2010 2011 2012 2013Magic Quadrants3
    4. 4. AgendaThis session covers the following: Introductions JasperReports Server Overview JasperReports Server Security 101 Web Services API HTTP Options Single Sign-On Overview Themes©2013 Jaspersoft Corporation.
    5. 5. Jaspersoft Products©2013 Jaspersoft Corporation5Reporting EngineVisual ReportDesign EnvironmentAd Hoc Reports, Dashboards,In-Memory Analysis ServerPowerful OLAPData AnalysisHigh PerformanceData IntegrationStudio
    6. 6. JasperReports ServerAd Hoc DesignerJasperReportsOLAP EngineSchedulingServiceRepository Service Security ServiceRepository Jaspersoft OLAP Domain DesignerBusinessUsersPDFHTML + AJAX Jaspersoft OLAPMS Excel MS WordJasperReports LibraryJasperReportsEngineJRXML FileCSVJasperReports Library Environment©2013 Jaspersoft CorporationJavaApplicationDatasourceiReportDesigner/JaspersoftStudio
    7. 7. Production EnvironmentJasperReports ServerAd Hoc DesignerJasperReportsOLAP EngineSchedulingServiceRepository Service Security ServiceRepository Jaspersoft OLAP Domain DesignerBusinessUsersPDFHTML + AJAX Jaspersoft OLAPMS Excel MS Word©2013 Jaspersoft Corporation
    8. 8. What is JasperReports Server? A web application Apache Tomcat, JBoss, IBM WebSphere, Oracle WebLogic, SunGlassFish, SpringSource tc Server Cloud Optimized for JasperReports template deployment Execution, Scheduling Dashboard and Adhoc Reporting Secure Authentication and Authorization Data Security Many extension and integration points Web Services HTTP Themes©2013 Jaspersoft Corporation.
    9. 9. Why Use JasperReports Server? Repository simplifies report deployment Easy to tune JasperReports behavior Non technical users can create and modify reports Adhoc report designer Dashboard designer Easy to integrate content into other applications Web Services HTTP©2013 Jaspersoft Corporation.
    10. 10. Common Questions Question Do I really need JasperReports Server if I just want a couple of reports? Question Can I expose reports to my Users without them having to log intoJasperReports Server? Question Can I display reports from JasperReports Server using iFrames withinmy own application? Questions Does JasperReports Server have a web services API?To begin answering these lets review using JasperReportsdirectly…©2013 Jaspersoft Corporation. 10
    11. 11. Embedded JasperReports LibraryPros & ConsPros Cons©2013 Jaspersoft Corporation.
    12. 12. JasperReports LibrarySample Embedded Application Review JasperReports Library deployment©2013 Jaspersoft Corporation.
    13. 13. Resources and Documentation JasperReports Library Download & Samples: Documentation, tutorials and further reading:©2013 Jaspersoft Corporation.
    14. 14. Embedding JasperReports Server Options Web Services HTTP Portlet But before we go further…©2013 Jaspersoft Corporation 14
    15. 15. JasperReport Server Security Overview JasperReports Server is built around the SpringFramework and Secured with Spring Security From the Project home page: “Spring Security is a powerful, flexible security solution for enterprisesoftware, with a particular emphasis on applications that use Spring.” Open Source project available on SourceForge Over 5 years old 231,000 downloads* 20,000 downloads per release* Large and activity community forum Widely used in the community Acegi Project was replaced with Spring Security withSpring Release 2.5* Statistics come from Ben Alex‟s WAJUG - Western Australia Java Users Group presentation©2013 Jaspersoft Corporation.
    16. 16. Applying Spring Security Acegi is based on Filters Filters dynamically intercept requests and responses to transform or usethe information contained in the requests or responses In web.xml securityFilter is configured to ensure allHTTP requests to the application pass through Acegi©2013 Jaspersoft Corporation.
    17. 17. filterChainProxy Located in: WEB-INF/applicationContext-security-web.xml Different URL patterns determine which filter chain therequest will follow: /services/**, /xmla/**, /** At the end of the Filter chain the user is assigned aPrincipal and Role©2013 Jaspersoft Corporation.
    18. 18. Overview of Request Processing ThroughFilterChainHTTP Request• SecurityContext HolderHTTP Request• SecurityContext Holder• AuthenticationToken• UserDetails (referred to as the Principal)SecurityContext Holder• MTWebAuthenticationDetails• AuthenticationToken• MTUserDetails (referred to as the Principal, now contains MT info)• UserDetails (original Principal)©2013 Jaspersoft Corporation.
    19. 19. Single Sign On Single Sign On (SSO) is desirable allows specific usersentry to JasperReports Server (JRS) without having to login JRS integrates with 3rd party SSO solutions CAS SiteMinder JRS‟s security can also be extended to use a custom SSOsolution©2013 Jaspersoft Corporation.
    20. 20. Steps to a custom SSO with JRS Create a Filter Insert the Filter in the Authentication chain Before the MetadataAuthenticationProcessingFilter Implement a doFilter method: Check the SecurityContextHolder for an Authentication object Check the Request for information that can be used to Authenticate Programmatically create an Authentication object User will be authenticated as an External User©2013 Jaspersoft Corporation 20
    21. 21. Security and Embedding All embedded requests must authenticate Requests unable to authenticate will be assignedROLE_ANONYMOUS©2013 Jaspersoft Corporation.
    22. 22. Resources and Documentation JasperReports Server Download: SSO and security documentation, tutorials and further reading• JasperReports Server Authentication Cookbook• JasperReports Server Administration Guide• Chapter 7 of the JasperReports Server Ultimate Guide©2013 Jaspersoft Corporation.
    23. 23. Web Services Integrations©2013 Jaspersoft Corporation23
    24. 24. JasperReports Server Web Services Repository Management Services Manage Repository Elements Permissions & security Element import/export Report Services Report execution and multi format exporters Input control management Report Scheduling Management Dashboards Domain Services Read Meta Data Execute Domain Query Administrative Services Manage Organizations, Users and Roles Manage Permissions©2013 Jaspersoft Corporation.
    25. 25. Web Services Architecture There are two different Application ProgrammingInterfaces (APIs): REST (REpresentational State Transfer) – The RESTful interfacedepends on the standard methods provided by HTTP:GET, PUT, POST,and DELETE. This interface is new and the API is still expanding. SOAP (Simple Object Access Protocol) – The SOAP interface sendsand receives XML documents to process requestsand provide results.This interface is still supported but is not enhanced with new features.©2013 Jaspersoft Corporation.
    26. 26. Are Web Services Secure? Web Services requests need to be authenticated Generally a web services request may contains a headerwith the authentication or rely on the SSO implementedin JasperServer Can be configured to use HTTPS©2013 Jaspersoft Corporation.
    27. 27. Web Services Helper Classes Jaspersoft provides some helper classes to assist inWeb Services integrations: WSClient Handles Request and Response when making calls Simplies common repository operations ReportSchedulerFacade Simplifies scheduling calls©2013 Jaspersoft Corporation.
    28. 28. Embedding JasperReports Serverwith HTTP©2013 Jaspersoft Corporation28
    29. 29. Calling reports with HTTP Reports and Dashboards can be called using HTTP Authentication has to be managed by the SSO Process. Report parameters are included to specify: Type of element to display If Decorator should be applied Theme to be used©2013 Jaspersoft Corporation.
    30. 30. HTTP Examples All HTTP requests will be handled by the Flow URLhttp://yourserver/jasperserver-pro/flow.html? _flowId=dashboardRuntimeFlow&dashboardResource=/public/FlashDashboard&viewAsDashboardFrame=true• Loads up a Dashboard with no JRS UI _flowId=adhocFlow&_eventId=initForExistingReport&resource=/public/Adhoc_Crosstab• Opens a specific Adhoc report in the Designer _flowId=viewReportFlow&reportUnit=/organizations/organization_1/reports/samples/AllAccounts&theme=embed• Opens the Accounts report in JasperServer using the Theme „embed‟©2013 Jaspersoft Corporation 30
    31. 31. Report Execution Using HTTP Base URL: /flow.html?_flowId=viewReportFlow& reportUnit URI of the report in JRS output Desired output (HTML is default) reportLocale Uses standard Java l18n format parameterList parameter=value1&parameter=value2&parameter=value3 Date/Time format must match yyyyMMddHHmmss Boolean/Checkbox can be „true‟ and „false‟©2013 Jaspersoft Corporation 31
    32. 32. Report Execution Using HTTP jasperserver-pro/flow.html?_flowId=viewReportFlow&reportUnit=/organizations/organization_1/reports/samples/AllAccounts&j_username=superuser&j_password=superuser&viewAsDashboardFrame=true&output=pdf©2013 Jaspersoft Corporation 32
    33. 33. iFrame vs. REST API integration Web Services REST API Full programmatic control Perfect for production or“canned” reports HTTP APIs IFRAME Embed functionality -like embedding Google Maps,Video etc. Leverage Jasper Interactivityand UI©2013 Jaspersoft Corporation 33
    34. 34. Resources and Documentation JasperReports Server Download: Web Services documentation, tutorials and further reading• JasperReports Server Web Service Guide• JasperReports Server Administration Guide Java REST Clients••©2013 Jaspersoft Corporation.
    35. 35. Web Services and HTTP Demo Review Web Services Integration Review HTTP Integration©2013 Jaspersoft Corporation.
    36. 36. Making Use of Themes JRS can be re-skinned to have a totally different theme Themes are CSS based Can Override existing theme Each Organization can have its own theme Themes stored in the repository©2013 Jaspersoft Corporation.
    37. 37. Extending Themes Log In as superuser or jasperadmin View > Samples Pick Sample©2013 Jaspersoft Corporation 37
    38. 38. Extending Themes Using Fire Bug inspect the sample you want Make changes to in Fire Bug until desired look isobtained Save modified class file into a overrides_custom.css©2013 Jaspersoft Corporation 38
    39. 39. Themes Demonstration High Level Themes Overview©2013 Jaspersoft Corporation.
    40. 40. Q &© 2013 Jaspersoft Corporation 40@Jaspersoft888.399.2199 or – Brian Gentile CEO