# Report Settings

## `reports` section

The `reports` section of your setting files contains settings that customize the look of the reports. The settings can be considered 'defaults' that are applied to all reports. Specific reports can have their own sections as described below

### `reports` Section

    [reports]
    File_Out = reports/
    Active_Column=R
    Meta_Refresh = 86400
    Image_Dir = ../images/
    Stylesheet = styles.css
    Reverse_Time = 1
    Graph_Level = 1

    BG_Color = #FFFFFF
    Background = images/background.gif

    Font = Verdana, Arial, Helvetica, sans-serif
    Font_Color = #000000

    Title_Font = Comic Sans MS, Brush Script, Helvetica, sans-serif
    Title_BG_Color = #000000
    Title_Font_Color = #FFFFFF

    Data_Font = Verdana, Arial, Helvetica, sans-serif
    Data_Font_Color_1 = #000000
    Data_BG_Color_1 = #F0F0F0
    Data_Font_Color_2 = #000000
    Data_BG_Color_2 = #FFFFFF

    Data_Total_Font = Verdana, Arial, Helvetica, sans-serif
    Data_Total_Font_Color = #000000
    Data_Total_BG_Color = #FFCCCC

    Data_Header_Font = Verdana, Arial, Helvetica, sans-serif
    Data_Header_Font_Color = #000000
    Data_Header_BG_Color = #CCCCFF

`File_Out`
  This is the file and/or directory where the report page(s) will be made. If this is a filename (e.g. /stats/report.html) and then Report Magic will build all the reports in this one file (like Analog does). If this is an output directory (e.g. /stats/) then Report Magic will buils each report in it's own file in that directory. The directory specified here (by itself or as a part of the filename) is used for all files generated by Report Magic (including the frameset and navigation pages, if generated).
  In this option (as well as `statistics_Frame_File_Out` and `navigation_File_Out`) you can add two types of codes to tell Report Magic to create a custom name for the file. The first code is `%infile%` which, if inserted anywhere in the filename, will be replaced with the name of the input data file without its extension. For example, if under the `[statistics]` section, `File_In=/usr/bin/analog/virtualhost1.dat` then if you set this option to '/htdocs/%infile%/', all report files for this data file would be created in the directory '/htdocs/virtualhost1/'. The second code type allows you to insert the date (and/or time) of the last request from your reports in the output filename. For example, if you set this option to '/htdocs/%yyyymmdd%/' and ran the report on January 1st, 2002, using log files that ended December 31, 2001, you would have all your reports stored in the directory '/htdocs/20011201/'. For more details on how to specify a date format see the Date Format Reference.
  The special filename '-' can be used to tell Report Magic to write the report to the standard output (STDOUT) (i.e. your display or terminal window or a pipe, '|', on a command line to another program). Using this filename will force Report Magic to create a single-file, non-frames report with no Quick Summary.
`Active_Column` (Optional)
  This tells Report Magic for Analog which column to use for charts and determining the "Most Active" period in the Quick Summary. By default same measure is used for all reports. You can change this on a report-specific level by defining this value in a report-specific section of you settings file. See Reports specific sections, below for more details.
  For a list of valid codes see the Active Column section of the columns reference. This setting takes a single-characer code that must correspond to one of the columns in your Analog data file. If there are no matching columns, then Report Magic will not create a chart for that report. In other words, if you set 'Active_Column=P', to use Requests for Pages to determine activity, then make sure that your reports have that data by settings their `*COLS` in your Analog configuration file. If you want pie charts, make sure to include include 'p' (Percent of Page Requests) in those `*COLS` settings.
  If this value is not set, Report Magic defaults to the first column in the first report (usually the Monthly Report).
`Meta_Refresh` (Optional)
  This option will include a META REFRESH tag in each report file telling the browser to expire the data after the number of seconds you set this to. For example, if you set `Meta_Refresh=86400` the browser will automatically reload the contents every 24 hours. If this is 0 or not included, no META tag will be written in the report file(s).
`Image_Dir` (Optional)
  This option can be used to tell Report Magic where to find the logo graphics files (for Analog, WADigital and DNS) for the bottom of the reports. Normally, Report Magic copies the logos to the report directory. If you are running lots of client sites you may want to put the logos in one central place and have all reports referr to that place. The value of this should be a URL reference, relative to the report output directory on your web site. You should include the final '/' in the directory reference. For example, if you have all your reports in the /stats/reports/ directory on your website and put the images in /stats/images/, then you would set this option to '../images'. Note: you can use a host name (absolute URL) as well as a relative URL for this option.
`Stylesheet` (Optional)
  This points to a file contianing a stylesheet for Report Magic to use for styles. If your output format is 'XHTML 1.0' then the reports will contain a link to this sheet. In this case, this should be a URL and you need to make the stylesheet available to the web page when you publish the reports. If your output format is 'HTML 3.2' then this should be a local filename and the reports will be built with `<FONT>` and other tags based on the styles defined in the stylesheet. For details on the format for a stylesheet, see the entry on the advanced settings page.
`Reverse_Time` (Optional)
  This option will reverse the direction of data in time report graphs. Use this if you've configured Analog to output time reports with data from newest to oldest (i.e. used the `*BACK` option). This makes sure the graphs come out looking right, because people expect a time-axis to run from oldest to newest (left to right).
`Graph_Level` (Optional)
  This option affects hierarchical report only. It tells the report to graph a different level of the hierarchy than the primary one. This is useful, for example, in the Directory Report, when using it as a Virtual Host report. Without setting this (or setting it to the default value of '1'), only the first level item 'http://' will be graphed. What you really want is the second level. By setting this to '2', you would graph each virtual domain in your "directory" report.
`Show_Bytes_As` (Optional)
  This takes a value like "K", "M", "G", "T", etc. If given, then Report Magic will reduce byte counts in reports to only this value. For example, if the value is "M", then all reports will show all byte counts in megabytes (MB) with the fully reduced value following in parentheses. (e.g. 2940941107 bytes would be reduced to "2804 MB (2.739GB)". If no value is given for this, then byte counts are reduced completely as usual.
`BG_Color` (Optional)
  This is an optional background color* for the report page(s).
`Background` (Optional)
  This is an optional image for the background of the report page(s).
`Font` (Optional)
  This is the name of the desired typeface for the description and other text on the report page(s). This can be a comma-separated list of typeface options, such as "Arial, Helvetica, sans-serif".
`Font_Color` (Optional)
  This is the color* of the output text on the report page(s). This color is also used for the labels, titles and axis in the graphs. Only about 30 colors are recognized in the graphs. If the color you choose is not known, it will revert to black for the graph titles, labels and axis.
`Title_Font` (Optional)
  This is the name of the desired typeface for the report titles. This can be a comma-separated list of typeface options, such as "Arial, Helvetica, sans-serif".
`Title_BG_Color` (Optional)
  This is the background color* of the report title boxes. Report titles are bounded by a box so can have a background color or even be "reversed" (e.g. white on black).
`Title_Font_Color` (Optional)
  This is the color* of the report title text. See `Title_BG_Color` about creating "reversed" type titles.
`Data_Font` (Optional)
  This is the name of the desired typeface for the data columns on the report page(s). This can be a comma-separated list of typeface options, such as "Arial, Helvetica, sans-serif".
`Data_Font_Color_1` (Optional)
  This is the color of the text for the data in one set of rows (defaults to `Font_Color`).
`Data_BG_Color_1` (Optional)
  This is the background color* of one set of data rows. Data sets can use two colors that alternate with rows for better legibility.
`Data_Font_Color_2` (Optional)
  This is the color of the text for the data in the other set of rows (defaults to `Font_Color`).
`Data_BG_Color_2` (Optional)
  This is the background color* of the other set of data rows. See `Data_Color_1` above for the alternate color.
`Data_Total_Font` (Optional)
  This is the name of the desired typeface for the summary data rows (defaults to `Data_Font`).
`Data_Total_Font_Color` (Optional)
  This is the name of the color for the text in the summary data rows (defaults to `Data_Font_Color`).
`Data_Total_BG_Color` (Optional)
  This is the background color* of the totals rows on summary reports. These rows provide additional summary information, but are not graphed.
`Data_Header_Font` (Optional)
  This is the name of the desired typeface for the table header rows (defaults to `Data_Font`).
`Data_Header_Font_Color` (Optional)
  This is the name of the color for the text in the table header rows (defaults to `Data_Font_Color`).
`Data_Header_BG_Color` (Optional)
  This is the background color* of data table headers.

*Note: All colors can be a standard browser color name or a 6-digit hex color code preceded by a number sign. (e.g. "black" or #000000).

## `graphs` section

The `graphs` section of your setting files contains settings to control the formatting of the graphs.

    [graphs]
    BG_Color = #FFFFCC
    Font = /usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf, 14, 12, 10
    Font_Color = #000000
    Width = 400
    Height = 300
    3d = 1
    Palette = lgreen, lblue, lred, lpurple,lyellow, green, blue, red, purple, yellow
    Cycle_Colors = 1
    Shadows = 1
    Format = png
    Path_To = /web/images/
    URL_To = /images/

`BG_Color` (Optional)
  This allows you to specify a color to be used for the graphing area of the graph. If none is given this will use the report page background color. This is separate from the background color for the graph image which will always match the report page backgroun color.
`Font` (Optional)
  This can be set to the full path of a True Type font that will be used for all text in the graphs. To use this on the source package, you must have installed lttf (see the Source Package Installation Notes for details).
  You can also customize the point size used for elements of the graphs. To do this you would follow the font name with a comma and a comma-separated list of 3 point sizes to use for graph title, axes titles and values labels. For example, you could specify `Font=C:\Windows\Fonts\arial.ttf, 24, 14, 10`. Be careful not to use too large of a font size or you won't leave room for the graph and you'll get a 'Vertical size to small' error.
  Mac Users The Mac version of Report Magic does not yet support True Type fonts. Therefore this option is ignored on the Mac platform.
`Font_Color` (Optional)
  This is the color of the graph text. The grid lines and axes are colored between this and the `BG_Color`, defined above. This defaults to the report page text color.
`Width` (Optional)
  This gives the desired width (in pixels) of the graph. Default is 400. You can change this on a report-specific basis by setting this under the report's section. See below.
`Height` (Optional)
  This gives the desired height (in pixels) of the graph. Default is 300. You can change this on a report-specific basis by setting this under the report's section. See below.
`3d` (Optional)
  This if set to 1, will draw 3d graphs, 0 draws 2d graphs. Default is 1. You can also specify 2d or 3d on individual graphs using, for example, 'lines2d' or 'lines3d' for the `GraphType` setting in the report specific sections. You can change this on a report-specific basis by setting this under the report's section. See below
`Palette` (Optional)
  This gives a comma-separated list of color names to use for the bars in the bar charts. Valid colors include any 6 digit hex code, preceded by a number/hash symbol ("#") or one of (white, lgray, gray, dgray, black, lblue, blue, dblue, gold, lyellow, yellow, dyellow, lgreen, green, dgreen, lred, red, dred,lpurple, purple, dpurple, lorange, orange, pink, dpink, marine, cyan, lbrown, dbrown).
`Cycle_Colors` (Optional)
  If this is set to 1, each bar in a series on the bar charts will use a different color from the `Palette` list. If set to 0, all bars will use the first color. Default is 1.
`Shadows` (Optional)
  If this is set to 1, Report Magic will draw drop-shadows on the bars in the bar charts. Set this to 0 to disable the shadows. Default is 1.
`Format` (Optional)
  This give the desired ouput format for graph images. Valid values are PNG and JPEG (and 'GIF' if you have a really old verion of libgd). Default is PNG because the files are much smaller. This will only work when you build Report Magic with support for the proper file types. For Windows users, both formats are supported. For Mac users, you will only get GIF format. On other platforms, this depends on the options you used when you built libgd. See the source package installation for details.
`Path_To`
  This specifies a path where the graph files should be stored on the server. By default, Report Magic stores graph files in the same folder as the report files. When working in CGI mode, however, it cannot send graphs unless they can be stored somewhere. This allows you to tell Report Magic to write the graphs in an explicit location in your web site. See `URL_To`, below, for the companion setting.
`URL_To`
  As a companion to `Path_To`, above, this tell Report Magic's reports where to find the images that have been stored on the web site. For example, if your web site is in `/web/` and you store your graphs in `/web/images/`, then you would want to set the `URL_To` value to `/images/` if you are writing the reports to the root of the web site or to CGI.

## Reports specific section

For each report, you can customize the default settings that you set in the `reports` section. To do this you create a section using the section name shown in the reports reference and set the approriate settings below that. For example, if you wanted to have a green background on the Monthly Report, you could add this to your settings file:

    [MONTHLY]
    BG_Color=green

You can also change report-specific configurations or text in these sections as well. This is covered in more detail in the advanced settings page. However, as an example, if you wished to change the name of the General Summary to "Executive Summary," for one set of reports you could add this to your settings file:

    [GENERAL]
    LongName=Executive Summary

#### Customizing the GraphType

The type of graph each report crates is already defined by Report Magic. Usually these types make sense for the majority of data in a report and do not need to be changed. However, by setting this option for a particular report, you can change the graph types you want displayed.

`GraphType` takes a comma-separated list of types of graphs that you want Report Magic to produce for the report. Basic values are `pie`, `bars` and `lines`. These will be formatted in 2d or 3d versions, based on the `[graphs]3d` setting described above.

It is also possible to force a specific report to use 2d or 3d graphs, ignoring the 'global' setting by specifying that in the `GraphType` setting for that reports. For example, to make all the line graphs on the time reports 2d, you would add something like this to your settings file:

    [MONTHLY]
    GraphType=lines2d
    [WEEKLY]
    GraphType=lines2d
    [FULLDAILY]
    GraphType=lines2d
    [FULLHOURLY]
    GraphType=lines2d
    [QUARTER]
    GraphType=lines2d
    [FIVE]
    GraphType=lines2d

#### Settings Rows in the Summaries

Finally, there are two report-specific options for the General Summary and Quick Summary. The `Rows` setting determines which rows will be displayed for each report.

    [GENERAL]
    Rows=SR, PR, FL, RR, NF, NH, BT

`Rows` (Optional)
  This specifies which rows Report Magic for Analog should include in the General Summary. These correspond to the values used by Analog in the computer readable output file. Values should be separated by commas (','). For a list see the General Summary section of the columns reference. If you don't include this setting or you use the keyword 'ALL', the General Summary will show all rows in your Analog file.

    [QUICK]
    Rows= m, W, D, H, B

`Rows` (Optional)
  This tells Report Magic for Analog which columns to show for the Quick Summary. The letters are those used by Analog to represent report in the computer readable output files. Values should be separated by commas (','). For a list of valid options see the code letters in the reports reference. If you don't include this setting or your use the keyword 'NONE', no Quick Summary will be made. If you use the keyword 'ALL', all possible summary rows will be show. The rows in the Quick Summary will be in the same order as the letters are in this option.

[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.