Report Magic for Analog Documentation

Advanced Settings

Report Magic can get quite complicated and has many advanced options for users who want to learn. Below is a brief introduction to each option and some resources where you can find more information.

Setting the Work Hours for the Hourly Summary

You can change the hours used to compute and display 'Work Hours' and 'After Hours' in the Hourly Summary by setting the Summary1 and Summary2 settings for the [HOURLY] report. The default configuration uses something like this (localized for your langauge):

[HOURLY]
Summary1 = [8-16],Work Hours (8:00am-4:59pm)
Summary2 = [0-7,17-23],After Hours (5:00pm-7:59am)

In the above, the numbers in brackets are the hours to cover for each Summary (these are comma-separated lists of numbers or ranges of numbers). The text after the "]," is displayed on the reports. So, for example, to start the workday at 10:00am and end at 7:00pm you would put something like this into your settings file:

[HOURLY]
Summary1 = [10-18],Work Hours (10:00am-6:59pm)
Summary2 = [0-9,19-23],After Hours (7:00pm-9:59am)

Notice that the hours are inclusive, so the Work Hours, 10-18, includes every thing from the beginning of the hour 10 (10:00:00) to the end of the hour 18 (18:59:59 or 6:59:59pm).

Changing links in reports

To change hyperlinks in reports, you can set the IncludeLinks setting for each individual report in your settings file. IncludeLinks, takes a comma-separated list of patterns that, when matched will be linked. For example, to link only pages in the request report you would use something like

    [REQUEST]
    IncludeLinks=*/,*.htm,*.html,*.asp,*.php

Of course, this does depend on your definition of what a page is.

Insertion codes

Several settings for Report Magic can accept insertion codes: codes that tell Report Magic to insert specific text in the ouput. All filenames can accept insertion codes (such as [statistics]File_In or [reports]File_Out) as well as the [website]Title setting and the content that Analog puts into reports from its HEADER and FOOTER commands.

Insertion codes take two forms %date format% and ${something}. The date format is applied to the current date for [statistics]File_In and [statistics]Log_File and to end date of the report for the all other settings. (This allows you to run reports for the end of the previous month on the first of each month and have filenames and titles reflect the proper period.) Date formats follow the formatting syntax as described in the Date Format References.

The rest of the insertion codes insert values from the current run of Report Magic. The complete list of these codes is as follows:

     ${infile}          This is the name of the input file (from [statistics]File_In)
     ${XX}              Where XX is any row in the General Summary (listed here)
     ${GenerationTime}  This is the General Summary PS row, formatted for your locale
     ${DataStart}       This is the General Summary FR row, formatted for your locale
     ${DataEnd}         This is the General Summary LR row, formatted for your locale
     ${AnalogVersion}	This a synonym for the General Summary VE row

Stylesheet format

Using the Stylesheet setting in the [navigation] and [reports] sections, you can start setting styles instead of using settings like BG_Color and Font. Using stylesheets makes it easier to manage your styles and keep them consistent with the rest of your site. The stylesheet is used in the following manner:

	h1	The title at the top of each report file
	h2	The title of each individual report
	h4	Navigation page title
	th	Header columns on the data tables
	td.alt1	First color option for tabled data
	td.alt2	Second color option for tabled data
	th.total	Style options for summary rows at bottom of tables
	.fineprint	Style for time and range of report
	.smallfont	Style for 'SmallFonts' option in Simple reports

When using stylesheets, any style settings you add to your settings file (such as [reports] Font will override the styles defined in the stylesheets. If you only want to use the styles in your stylsheets, then remove all the other style settings from your settings file.

Notes on the HTML in report files

When Report Magic creates your report files, it writes all the HTML codes to a single line. This saves as much as 15% of the filesize, making the reports load faster and reducing the bandwidth they consume. Sometimes, though, you want to change the files or perhaps compare two files with diff. If you want to make the HTML more readable try the excellent tidy utility from W3C. You can download it from here, precompiled for many platforms. This will produce a more readable HTML format than any other option could do.

Customizing report text

As described in the Report Settings page, you can create report-specific sections in your settings file and override report definitions to change display and text. The settings that you can change are those defined in the rdata.ini of the current language (plus any inherited from the English -- or default, see below -- language settings). Each rdata.ini file in the language subdirectories (e.g. lang/en) contains comments in the local language to help you understand what the settings mean and what can be done with them.

Creating new language files

The files in these language directories, rdata.ini, cdata.ini and lang.ini provide localizations for Report Magic. Specifically, they include interface, descriptions, reporting and graphing options for the reports created by Analog. These also contain all the text used in the report files created by Report Magic for Analog. If you are interested in creating a new language version or changing some of the text of the output, your can modify these files. But keep a backup, because you could easily make changes the Report Magic won't understand. Report Magic looks in a subdirectory of lang as specified in the [statistics] Language setting for language files. So if you are creating custom versions of an existing language you could create your own directory (such as 'my_es') under lang and then specify that directory as your language setting. e.g. "Language=my_es"

The files in the language directories contain some (albeit minimal) documentation for what all the setting are. Additional help for translators is available in the 'Developers and Translators' page on the Report Magic website.

Creating custom reports

Report Magic can use custom reports instead of the predefined reports that ship with it. To create a custom report, you need to be familiar with Perl. You create a Perl module that inherits from wadg::rm::Report, and then specify your new class as the ReportType for any report you want to have use it. The Report.pm contains documentation with each method describing what the method is used for. However, the API may change in a future release of Report Magic. This doesn't mean you shouldn't make custom reports, if you're so inclined. Rather, if you do, please join the Report Magic Announce list to hear of any pending changes and/or communicate with Wadsack-Allen Digital Group if you have any changes you'd like to request in the API.

[Introduction] [Documentation map] [Index] [Frequently Asked Questions] [License]
Send questions or comments to Wadsack-Allen Digital Group Support.
Report Magic 2.21 Documentation. Copyright © 1999-2003 Wadsack-Allen. All Rights Reserved.