tips and techniques oracle reports

64

Upload: vijayantpanda

Post on 18-Dec-2015

11 views

Category:

Documents


2 download

DESCRIPTION

oracle

TRANSCRIPT

  • Tips and TechniquesOracle Reports Even More Hidden TreasuresPhilipp WeckerleOracle Corporation

  • Using OracleAS HAwith Oracle ReportsHandling Error Conditions in Java Server Page (JSP) ReportsUsing Special Featuresof GraphsAdding Special Effects to HTMLCSS ReportsTips & Techniques

  • Using OracleAS HA with Oracle Reports

  • OracleAS HA and Reports Server ClusteringOracleAS HAReliableResilientFault-tolerantCommon HA mechanism for all componentsReports Server ClusteringDeprecated in 10g Release 2 (10.1.2)Need to migrate to OracleAS HA

  • HA Demonstration: ArchitectureOracleAS Web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comDatabaseHTTPHTTP

  • HA Demonstration: NomenclatureLoad BalancerOrigin ServersOrigin Server 1Origin Server 2Origin Server 3DatabaseHTTP(S)HTTP(S)

  • HA Demonstration: NomenclatureLoad BalancerOrigin ServersOrigin Server 1Origin Server 2Origin Server 3DatabaseHTTP(S)HTTP(S)

  • Demonstration: StepsConfigurationConfigure OracleAS Web Cache to Act Solely as a Software Load BalancerConfigure Origin ServersCreate the Site DefinitionMap the Site Definition to the Origin ServersDirect All Requests Through the Load BalancerLoad balancingFail over

  • Configuration Step 1ConfigurationConfigure OracleAS Web Cache to Act Solely as a Software Load BalancerConfigure Origin ServersCreate the Site DefinitionMap the Site Definition to the Origin ServersDirect All Requests Through the Load BalancerLoad balancingFail over

  • Configuration Step 1OracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTPORACLE_HOME\webcache\internal.xml

  • Configuration Step 2ConfigurationConfigure OracleAS Web Cache to Act Solely as a Software Load BalancerConfigure Origin ServersCreate the Site DefinitionMap the Site Definition to the Origin ServersDirect All Requests Through the Load BalancerLoad balancingFail over

  • Configuration Step 2OracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTPOracleAS Web Cache Manager Origin Servers Origin Server details

  • Configuration Step 3ConfigurationConfigure OracleAS Web Cache to Act Solely as a Software Load BalancerConfigure Origin ServersCreate the Site DefinitionMap the Site Definition to the Origin ServersDirect All Requests Through the Load BalancerLoad balancingFail over

  • Configuration Step 3OracleAS Web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTPOracleAS Web Cache Manager Site Definitions Web Cache host details

  • Configuration Step 4ConfigurationConfigure OracleAS Web Cache to Act Solely as a Software Load BalancerConfigure Origin ServersCreate the Site DefinitionMap the Site Definition to the Origin ServersDirect All Requests Through the Load BalancerLoad balancingFail over

  • Configuration Step 4OracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTPOracleAS Web Cache Manager Site-to-Server Mapping Apps.mycompany.com host1.mycompany.com and host2.mycompany.com

  • Configuration Step 5ConfigurationConfigure OracleAS Web Cache to Act Solely as a Software Load BalancerConfigure Origin ServersCreate the Site DefinitionMap the Site Definition to the Origin ServersDirect All Requests Through the Load BalancerLoad balancingFail over

  • Configuration Step 5Multiple ways of achieving this, e.g.,Protect origin servers with a firewallCode the applications appropriatelyRedirect requests from origin servers back to the load balancer

  • Configuration Step 5Multiple ways of achieving this, e.g.,Protect origin servers with a firewallCoding the applications appropriatelyRedirect requests from origin servers back to the load balancer

  • Configuration Step 5OracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTPEnterprise Manager OracleAS Control HTTP Server > httpd.conf ServerName apps.mycompany.com

  • DemonstrationConfigurationConfigure OracleAS Web Cache to Act Solely as a Software Load BalancerConfigure Origin ServersCreate the Site DefinitionMap the Site Definition to the Origin ServersDirect All Requests Through the Load BalancerLoad balancingFail over

  • HTTP Request 1OracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTP

  • HTTP Request 1OracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTP

  • HTTP Request 2OracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTP

  • DemonstrationConfigurationConfigure OracleAS Web Cache to Act Solely as a Software Load BalancerConfigure Origin ServersCreate the Site DefinitionMap the Site Definition to the Origin ServersDirect All Requests Through the Load BalancerLoad balancingFail over

  • One Origin Server FailsOracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTPX

  • HTTP Request 1nOracleAS web Cache Site:apps.mycompany.comhost1.mycompany.comhost2.mycompany.comOrigin ServersDatabaseHTTPHTTPX

  • Demonstration SummarySet up HA for the OracleAS environmentLeverage OracleAS HA for ReportsAchieve Load Balancing and Fail Over

  • More InformationOracle Application Server Best Practices Guide 10g Release 2 (10.1.2)Oracle Application Server High Availability Guide 10g Release 2 (10.1.2) Changed Functionality Between Oracle Reports 6i and 10g

  • Using Special Features of Graphs

  • Demonstration 1: Descending Bars Use CaseOften data shows a drop in value, e.g.,Drop in trade deficitDrop in reported incidents of a diseaseDrop in pulse rate due to meditationTo make graphs for such scenarios more intuitive, the Y-axis baseline should be at the top

  • Demonstration 1: Descending Bars1. Create Bar Graph

  • Demonstration 1: Descending Bars2. Shift the Y-axis baseline to the top

  • Demonstration 1: Descending Bars3. Add special effects (color gradient)

  • A look behind the scenesOpen graph object > Property InspectorEdit SettingsAdd the following XML Add the following XML

  • A look behind the scenesOpen graph object > Property InspectorEdit SettingsAdd the following XML Add the following XML

  • Demonstration 2: StockGraph Use CaseYou need to show movement in stock prices, i.e.,Days high priceDays low priceOpening priceClosing priceYou would like to distinguish between:Stocks where closing price > opening priceStocks where closing price < opening price

  • Demonstration 2: StockGraph1. Create Stock Graph of subtype Open-Hi-Lo-Close Candle

  • Demonstration 2: Stock Graph2. Add special effects (color gradient)

  • Demonstration 2: Stock Graph3. Specify custom colors

  • A look behind the scenesOpen graph object > Property InspectorEdit SettingsAdd the following XML Add the following XML

  • A look behind the scenesOpen graph object > Property InspectorEdit SettingsAdd the following XML Add the following XML

  • Adding Special Effects to HTMLCSS Reports

  • Pseudo-classes and pseudo-elementsCascading Style Sheet 2: style is based on elements or attributes in the document tree, e.g.,Type selectorsem {color: blue}Class selectors.big {color: blue}Descendant selectorsp em {color: blue}Attribute selectorsimg[src="small.gif"] {border:1px solid #000}

  • Pseudo-classes and pseudo-elementsProblem: how to apply styles to objects that lie outside the document tree?Examples:First letter / first line of an elements contentUnvisited / visited hyperlinksSolution provided by CSS 2:Pseudo-classes and pseudo-elements

  • Demonstration:Without pseudo-classes1. Unvisited Link

  • Demonstration: With pseudo-classes1. Unvisited Link

  • A look behind the scenesPseudo-classes used/* 1. unvisited link */a:link {color: blue}

    /* 2. link on mouse hover */a:hover {color: red; font-size: 125%; font-weight: bold}

    /* 3. active link */a:active {color: green}

    /* 4. visited link */a:visited {color: gray}

  • Demonstration SummaryUse pseudo-classes and pseudo-elements to apply style to dynamic contentMore information:http://www.w3.org/TR/REC-CSS2/selector.html

  • Handling Error Conditions in Java Server Page (JSP) Reports

  • Error ConditionsError Examples500 Internal Server Error404 Not Found Errors are inevitable in all applicationsBest approach is to handle them gracefullyUsers should not feel they have been thrown outside the application look-and-feelUsers should be shown helpful hints for diagnosing the problem / reporting the problem

  • Handling Error Conditions GracefullyAnticipate error scenariosCreate error pages that:Share the look-and-feel with the applicationShow helpful hints for each error / error typeMake provision for redirecting users to these error pages:Approach 1: Declare an error page in the JSPSame page is shown irrespective of the error typeApproach 2: Define error pages in web.xmlCan define a different error page per error type

  • Handling Error Conditions GracefullyAnticipate error scenariosCreate error pages that:Share the look-and-feel with the applicationShow helpful hints for each error / error typeMake provision for redirecting users to these error pages:Approach 1: Declare an error page in the JSPSame page is shown irrespective of the error typeApproach 2: Define error pages in web.xmlCan define a different error page per error type

  • DemonstrationAdd a JSP-based Web report to an existing Web applicationCreate a WARDeploy the WAR on OracleASRun the report

  • Demonstration: Simulated Error Condition 1Specify a non-existent database connect stringResult:

  • Handling Error Condition 1 GracefullyChange web.xml javax.servlet.jsp.JspException myExceptionPage.jsp Re-package and re-deploy the WAR

  • Handling Error Condition 1 GracefullyResult:

  • Demonstration: Simulated Error Condition 2Specify a non-existent pageResult:

  • Handling Error Condition 2 GracefullyChange web.xml 404 fileNotFound.jsp Re-package and re-deploy the WAR

  • Handling Error Condition 2 GracefullyResult:

  • SummaryErrors are inevitableThink about handling errors from users point of viewUse web.xml to redirect users to meaningful error pages

  • A

  • ******User-defined style sheets example a single report definition file (RDF) produces different look-and-feel in the output, depending on the style sheet chosen.*User-defined style sheets example a single report definition file (RDF) produces different look-and-feel in the output, depending on the style sheet chosen.*User-defined style sheets example a single report definition file (RDF) produces different look-and-feel in the output, depending on the style sheet chosen.********************************************************