User Tools

Site Tools


Practical Session 6 | Practical Session 8

Practical Session 7: Generating an HTML Report

Estimated completion time = 15 minutes.

One benefit of EASA is that it allows authors to design the output from an EASAP to produce reports in any preferred format. We have already seen how to create a report in Excel format, but we can also create an HTML-based report for the output. The design of an EASAP’s output is performed on the OUTPUT branch of the Tree in EASAP Builder. For the Stock Screener EASAP, we create a report that contains the following elements:

  • Section displaying the search parameters
  • Link to the Excel spreadsheet containing the desired stock data
  • Table of stock data

Please follow the instructions below to complete this practical session.

  • Select EASA→Set Mode→Author on the browser pages
  • Select our 'Stock Screener' EASAP at EASA→Applications→My EASAPs and open EASAP Builder.

To add a report,

  • Right-click OUTPUT
  • Select Child→Add REPORT

Add the html file we uploaded in the beginning of the tutorial:

  • Right-click report1
  • Select Child→Add HTML OUTPUT
  • Rename it html_output_Report_Body

Set:

Parameter Name Parameter Value
File:report_body.html

We edit the file, report_body.html using the Template Editor.

  • Select File→Save.
  • Select html_output_Report_Body
  • Click on the Open Template Editor button () in the toolbar
    (or from the menu bar: Applications→Edit Template…).

The Template Editor will start in a new window that looks like the following:

  • Highlight the string “put inputbox Exchange here” and replace it with inputbox_Exchange by double clicking the inputbox_Exchange DOR in the DOR List.
  • Highlight the string “put inputbox Sector here” and replace it with inputbox_Sector in the same way.
  • Highlight the string “put map Query Report here” and replace it with map_Query_Report in the same way.

At this point, we have added three (3) DORs to the template HTML file and the Template Editor window should look like the following:

Save the document:

  • Select File→Save
  • Close out of the Template Editor.
  • Return to EASAP Builder
  • Right-click OUTPUT→report1→html_output_Report_Body
  • Select Sibling→Add RESULTS TABLE

Set:

Parameter Name Parameter Value
Table Style:Table

We want to display our count of all the stock symbols.

  • Right-click results_table1
  • Select Child→Add DATA
  • Rename it data_Total_Stocks_Found

Set:

Parameter Name Parameter Value
Title:Total Stocks Found
Value:%count_Symbol%

Now add a link to the Excel Spreadsheet.

  • Right-click data_Total_Stocks_Found
  • Select Sibling→Add DATA
  • Rename it data_Link_To_Spreadsheet_Report

Set:

Parameter Name Parameter Value
Title:Results Output
Value:Open
Link to File:Results.xls

Now we add a TABULATED DATA similar to the one within the USER INTERFACE branch.

First, add a TEXT OUTPUT to display the heading for the TABULATED DATA.

  • Right-click results_table1
  • Select Sibling→Add TEXT OUTPUT
  • Rename it text_output_Table_Heading

Set:

Parameter Name Parameter Value
Text:Table of Stock Data
Style:Heading 3
  • Copy (select, then type Ctrl-C) tabbed_pane_Stock_Screener→sub_pane_Search_Results→tabulated_data_Data_Output .
  • Select OUTPUT→report1→text_output_Table_Heading
  • Type Ctrl-B (Paste (Sibling)) to add the TABULATED DATA to the report.

The new TABULATED DATA object will be called tabulated_data_Data_Output1.

  • Now save the EASAP, and then check the EASAP tree to ensure that the OUTPUT branch looks like the following:

We have now completed Practical Session 7, exit out of EASAP Builder and take a break or continue to the next session.

Practical Session 6 | Practical Session 8