|
5 registered users in last 24 hours Notes 25You can create (very!) simple reports in ]project-open[ V3.3 using the “im_ad_hoc_query” command. The following tutorial leads you through the necessary steps, base on an example report to show the list of users in the system.1.Choose a suitable location for your new report. The “/web/projop/www/” might be a good place for first tests. However, the “www” folder for any user, even unauthorized ones. For proper “production” use please go to Admin -> Package Manager, create your own package (“intranet-cust-<your_abbreviation>”), and place the reports in “/web/projop/package/intranet-cust-<your_abreviation>/www/”. 2.Login as user “projop” (don’t work as “root”!) and create a new subdirectory “reports” if it doesn’t exist already. 3.Create a new file “/web/projop/www/reports/users.tcl” with the following single line: doc_return 200 text/plain [im_ad_hoc_query -format plain "select * from cc_users"] 4.Now point your browser to the URL “/reports/users”. You should see a long list of information about users. 5.Let’s now format this report into a more user-friendly style giving it a header, footer and some HTML formatting. doc_return 200 text/html " [im_header] [im_navbar reporting] [im_ad_hoc_query -format html "select * from cc_users"] [im_footer] " 6.Now you want to add a link from the “Reporting” tab to the new report. You can do this by creating a new “menu” (“menus” are a generalization of links and tabs in ]po[). Go to Admin -> Menus and click on “New Menu” (at the very bottom of the Menu page) and enter the following fields: Name: Users Report Package: intranet-reporting Label: reporting-users URL: /reports/users Sort Order: 50 Parent Menu: Other - reporting-other Visible TCL: "" (empty) |
