]po[ Reporting & Indicators Options The ]project-open[ Data-Model , Frank Bergmann,  2010-10-06 This tutorial explains a n...
Overview: Different Types of Reports <ul><li>Reporting is one of the most basic requirements for a business application. <...
Simple SQL Query in pgAdminIII or PSQL <ul><li>pgAdminIII allows you to execute SQL queries manually. </li></ul><ul><li>pg...
MS-Access Report <ul><li>You can use Microsoft Access as a reporting engine: </li></ul><ul><li>MS-Access can access the ]p...
MS-Excel Report <ul><li>You can use Microsoft Excel as a reporting engine: </li></ul><ul><li>MS-Excel can access the ]proj...
im_ad_hoc_query $sql in /ds/shell <ul><li>The ]project-open[/OpenACS /ds/shell page allows developers to execute TCL comma...
im_ad_hoc_query $sql in a TCL page <ul><li>Once your query is running in the /ds/shell environment, you can easily deploy ...
Dynamic Report (Reporting -> New Report) <ul><li>Administrators can create new reports in Reporting -> New Report </li></u...
]po[ Reporting Engine <ul><li>The ]po[ reporting engine allows to create arbitrarily complex reports in a style similar to...
Nightly Evaluation of Long Running Reports <ul><li>Reports frequently can take several seconds or even minutes to execute....
Indicators <ul><li>Indicators are a special type of “report” that only returns a single numeric value. </li></ul><ul><li>]...
Histogram Chart <ul><li>A histogram chart is a simple “Portlet Component” that takes a SQL query as a parameter. </li></ul...
Data-Warehouse Cube <ul><li>]po[ includes an integrated Data-Warehouse as a commercial add-on package. </li></ul><ul><li>“...
Pie Chart Based on DW-Cube <ul><li>Pie charts can take a “sum” column of a data-warehouse cube as a data-source. </li></ul...
Frank Bergmann [email_address] www.project-open.com
Upcoming SlideShare
Loading in...5
×

]project-open[ Reporting & Indicators Options

1,396

Published on

This tutorial explains a number of different ways to extract information from ]project-open[ as a kind of “report” or "indicator"

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,396
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
67
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

]project-open[ Reporting & Indicators Options

  1. 1. ]po[ Reporting & Indicators Options The ]project-open[ Data-Model , Frank Bergmann, 2010-10-06 This tutorial explains a number of different ways to extract information from ]project-open[ as a kind of “report”
  2. 2. Overview: Different Types of Reports <ul><li>Reporting is one of the most basic requirements for a business application. </li></ul><ul><li>]project-open[ provides a large variety of different ways to display data with </li></ul><ul><li>differing degrees of sophistication and complexity: </li></ul><ul><li>Simple SQL Query in pgAdminIII or PSQL : Simply execute a SQL query using a PostgreSQL client outside of ]po[ </li></ul><ul><li>MS-Access Report : You can store MS-Access reports in a ]po[ filestorage or even link to it using a “menu” </li></ul><ul><li>MS-Excel Report : You can define the ]po[ database as a data-source for MS-Excel. </li></ul><ul><li>im_ad_hoc_query $sql in /ds/shell : Useful for ad-hoc queries and for development. </li></ul><ul><li>im_ad_hoc_query $sql in a TCL page : Easy way to deploy an ad-hoc query in a production system. You can also add a menu to the reporting section. </li></ul><ul><li>Dynamic Report (Reporting -> New Report) : Similar to ad-hoc query, but with built-in deployment. </li></ul><ul><li>]po[ Reporting Engine : The ]po[ reporting engine allows for grouping, aggregation, sub-totals and grand totals. </li></ul><ul><li>Nightly Evaluation of Long Running Reports : You can setup a “cron” script to save report results as a static HTML page at night. </li></ul><ul><li>Indicator : A special type of report that returns only a single numeric value. ]po[ takes care to regularly evaluate the SQL query and to store the values to create a timeline. </li></ul><ul><li>Histogram Chart : A histogram is a Portlet that takes a SQL query as an argument. The query needs to return rows with Name – Value pairs. </li></ul><ul><li>Data-Warehouse Cube : DW-Cubes may already cover your reporting needs. You can aggregate by drop-down type of DynFields. </li></ul><ul><li>Pie Chart based on DW-Cube : You can show a pie chart of the summary of a DW cube. </li></ul>
  3. 3. Simple SQL Query in pgAdminIII or PSQL <ul><li>pgAdminIII allows you to execute SQL queries manually. </li></ul><ul><li>pgAdminIII allows to save SQL queries in .sql files </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>Quick development </li></ul></ul><ul><ul><li>Integrated with tree-view to the database, tables, views etc. </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Requires manual execution </li></ul></ul>
  4. 4. MS-Access Report <ul><li>You can use Microsoft Access as a reporting engine: </li></ul><ul><li>MS-Access can access the ]project-open[ PostgreSQL database without problems </li></ul><ul><li>You can use all available MS-Access tools to develop your reports </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>Comfortable development tools </li></ul></ul><ul><ul><li>Easy entry for beginners </li></ul></ul><ul><li>Disadvantages </li></ul><ul><ul><li>Security issues if every computer has full access to the database. As an alternative, you could report on certain views only with restricted permissions. </li></ul></ul><ul><ul><li>Every computer needs a PostgreSQL ODBC installed locally </li></ul></ul>
  5. 5. MS-Excel Report <ul><li>You can use Microsoft Excel as a reporting engine: </li></ul><ul><li>MS-Excel can access the ]project-open[ PostgreSQL database without problems </li></ul><ul><li>You can use all available MS-Excel tools to develop your reports, including pivot tables and Excel macros. </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>Comfortable development tools </li></ul></ul><ul><ul><li>Easy entry for beginners </li></ul></ul><ul><ul><li>Excel allows for complex post-processing of data in separate sheets </li></ul></ul><ul><ul><li>Pivot tables allow for data-warehouse like reports </li></ul></ul><ul><li>Disadvantages </li></ul><ul><ul><li>Limitation of the number of rows </li></ul></ul><ul><ul><li>Security issues if every computer has full access to the database. As an alternative, you could report on certain views only with restricted permissions. </li></ul></ul><ul><ul><li>Every computer needs a PostgreSQL ODBC installed locally </li></ul></ul>
  6. 6. im_ad_hoc_query $sql in /ds/shell <ul><li>The ]project-open[/OpenACS /ds/shell page allows developers to execute TCL commands interactively </li></ul><ul><li>The “im_ad_hoc_query $sql” TCL command takes a SQL query and returns the results in “html”, “csv” or “plain” format </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>Well suitable for ad-hoc queries </li></ul></ul><ul><ul><li>Integrated into ]project-open[ </li></ul></ul><ul><ul><li>Working queries can be easily deployed (see later reporting options) </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>/ds/shell requires manual execution </li></ul></ul><ul><ul><li>im_ad_hoc_query does not support aggregation and parameters. </li></ul></ul>
  7. 7. im_ad_hoc_query $sql in a TCL page <ul><li>Once your query is running in the /ds/shell environment, you can easily deploy the report as a ]project-open[ page. </li></ul><ul><li>The example below shows how to include the “im_ad_hoc_query” statement into a “.ADP” page. </li></ul><ul><li>You may then create a new menu item in the ]po[ reporting section (Admin -> Menus -> Create New Menu) in order to integrate the new report into the rest of the system. </li></ul><ul><li>Advantage: </li></ul><ul><ul><li>Easy deployment of reports developed in /ds/shell </li></ul></ul><ul><ul><li>Integrated with the rest of the ]po[ environment </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>im_ad_hoc_query doesn’t support grouping and sub-totals </li></ul></ul><ul><ul><li>No security. You will have to add security checks manually. </li></ul></ul>
  8. 8. Dynamic Report (Reporting -> New Report) <ul><li>Administrators can create new reports in Reporting -> New Report </li></ul><ul><li>These “dynamic reports” behave just like im_ad_hoc_query. </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>Dynamic Reports automatically create a menu item for you that links to the report and allow to manage permissions </li></ul></ul><ul><ul><li>Dynamic Reports allow you to export the data in CSV format. </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Like all im_ad_hoc_query based reports: No grouping and sub-totals. </li></ul></ul>
  9. 9. ]po[ Reporting Engine <ul><li>The ]po[ reporting engine allows to create arbitrarily complex reports in a style similar to MS-Access and Crystal Reports. </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>Allows for group, sub-totals and totals </li></ul></ul><ul><ul><li>Allows for parameters </li></ul></ul><ul><ul><li>Allows for different “Levels of Detail” </li></ul></ul><ul><ul><li>Allows for “drill-down”. Clicking on one of the [+] icons will show a more details view </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Requires considerable TCL programming skills </li></ul></ul>
  10. 10. Nightly Evaluation of Long Running Reports <ul><li>Reports frequently can take several seconds or even minutes to execute. </li></ul><ul><li>One way to provide users with a more agile reply is to pre-evaluate reports (at night) and to provide the results as a static HTML page to the user. </li></ul><ul><li>The following command will execute the “report.adp” and store the results as a static HTML page: </li></ul><ul><ul><li>wget http://localhost/report -o ~/www/report.html </li></ul></ul><ul><li>Advantages: </li></ul><ul><ul><li>Fast response time </li></ul></ul><ul><ul><li>The static HTML page still provides drill-in capabilities. </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Extra effort to schedule the evaluation </li></ul></ul><ul><ul><li>Scheduling many reports may lead to overlaps at night </li></ul></ul>
  11. 11. Indicators <ul><li>Indicators are a special type of “report” that only returns a single numeric value. </li></ul><ul><li>]po[ takes care to regularly evaluate the SQL query and to store the values to create a timeline. </li></ul><ul><li>Indicators allow for permissions per indicator, so you can limit the visibility to certain user groups. </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>Allows to build management dashboards, balanced scorecards etc. </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Only suitable for certain reporting purposes </li></ul></ul><ul><ul><li>It is very difficult to develop indicators that are really relevant to a business. </li></ul></ul>
  12. 12. Histogram Chart <ul><li>A histogram chart is a simple “Portlet Component” that takes a SQL query as a parameter. </li></ul><ul><li>The query needs to return two columns only: </li></ul><ul><ul><li>A name (here: ticket_type) </li></ul></ul><ul><ul><li>A number (here: count) </li></ul></ul><ul><li>Advantages: </li></ul><ul><ul><li>Easy to develop </li></ul></ul><ul><ul><li>Easy to integrate into existing pages in ]po[ </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Limited reporting capabilities </li></ul></ul>
  13. 13. Data-Warehouse Cube <ul><li>]po[ includes an integrated Data-Warehouse as a commercial add-on package. </li></ul><ul><li>“ Cubes” are capable of aggregating data along many “dimensions”. </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>One DW-cube can replace tens of separate reports. </li></ul></ul><ul><ul><li>DW-cubes allow the user to “slice and dice” data </li></ul></ul><ul><ul><li>DynFields (drop-down) can be used as “dimensions” in a DW. For example, a “Business Sector” DynField per customer will automatically appear in the Finance cube. </li></ul></ul><ul><ul><li>Seamlessly integrated into ]po[ </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Commercial package, license costs. </li></ul></ul><ul><ul><li>Only numeric values can be shown in a DW </li></ul></ul>
  14. 14. Pie Chart Based on DW-Cube <ul><li>Pie charts can take a “sum” column of a data-warehouse cube as a data-source. </li></ul><ul><li>Advantages: </li></ul><ul><ul><li>Easy creation of pie charts </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Data can only be extracted from existing DW-cubes. </li></ul></ul>
  15. 15. Frank Bergmann [email_address] www.project-open.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×