Professional Documents
Culture Documents
Annual
Seminar
Custom Reports
Custom Reports is a program which allows users to design and build their own reports
using any of the data sources supported by MSDA, ie., MineSight assay, composite,
blasthole and block model files, ODBC compliant databases, and text files. Users have
complete control over the choice of fields, statistics, filters, layout, and style of the report.
Each report is an HTML file which may be viewed in a web browser, Microsoft Word and
Microsoft Excel. A sample is shown in Figure R-1
Figure R-1
Functional Overview
Custom Reports works in two stages, as shown in Figure R-2. The first stage is Report
Builder, which creates a report matrix file of values according to the users criteria. For
example, one may build a report matrix based on mean, median, and standard deviation
of cu, pb, zn. and mo data, by copper cutoff grade and rock type. The actual selection of
statistics, fields, and filters (criteria) is entirely up to the user. Report Builder computes
all combinations of these values. In other words, it computes all statistics of all fields
according to all filters (criteria) and stores the results in a report matrix file (.mrb)
in XML format. If the data source is large, e.g., a large block model, and the criteria
are complicated, this step may be quite time consuming due to the large number of
computations involved.
The second stage is Report Viewer, in which the user extracts data from the report file
and creates a readable HTML file. For example, using the report file mentioned in the
Page 1
previous paragraph, we may ask for four tables, one per metal, with the mean and median
grade displayed by rock type in rows and cutoff grade in columns. The Report Viewer runs
essentially instantaneously, since all of the results are simply extracted from the report
file. It is common to do many different report views using a single report file. Report style
options are available to change color, text size, font, etc., for titles, column and row labels,
headers and footnotes, and so on. Since each report view is an HTML file, it can be easily
displayed, printed, opened in Microsoft Word, and so on.
22nd
Annual
Seminar
Figure R-2
A second option for Report Viewer is to display a chart rather than an HTML report.
For example, based on the same report matrix file, we could display a graph of copper
grade by cutoff with one series (curve) per rock type. This may be considered as just
another view of the report file. Like the HTML reports, charts are created pretty well
instantaneously.
Report Builder
In the Report Builder stage the user specifies the report content and builds a report
matrix file with an .mrb extension. This step is straightforward, but can be time
consuming to run if the data source is large and the filters are complicated.
There are two fundamental types of report which one may build: univariate and
bivariate. For univariate reports, one must specify:
General info such as titles and chart style file (Figure R-3).
Weighting info, used when you wish to weight statistics, e.g., by length or by tonnage.
When this option is used, the total weight (e.g., total tonnage) is available on the
report (Figure R-4).
A list of fields and field expressions (Figure R-5).
A list of statistics, such as mean and standard deviation (Figure R-6).
Page 2
22nd
Annual
Seminar
One or more filters, ie., selection criteria such as rock type and cutoff grade (Figures
R-7 to R-9).
Each of these specifications is discussed below in more detail.
Figure R-3
Figure R-4
Page 3
22nd
Annual
Seminar
Figure R-5
Figure R-6
Page 4
22nd
Annual
Seminar
Figure R-7
Figure R-8
Page 5
22nd
Annual
Seminar
Figure R-9
Page 6
22nd
Annual
Seminar
8.25 * mo, where cu and mo must be valid field labels in the data source. Buttons are
also available to Edit and Remove fields.
(*) Cutoff Values: Cutoff values are used in two ways in MSDA and Custom Reports and
a bit of explanation is needed here.
Cutoff Type I: When a cutoff value is used as part of a filter (see Defining Filters), it is
designed to filter entire records. For example, if we specify a filter with a cutoff grade
of 0.35% cu, then a record would be wholly accepted if it had cu >= 0.35%, and wholly
rejected otherwise. This is probably the case with which most users are familiar. For
example, if your ore cutoff is 0.35% cu, and you want ore stats for several metals, this
is the approach you would use. This is also the approach used throughout MSDA and
MineSight and most other mining programs.
Cutoff Type II: In certain circumstances, a user may want a report with statistics for
multiple fields wherein each field has its own cutoff. This is the type we use in the
individual field specification as shown in Figure R-5. For example, if we say that cu
cutoff = 0.3% and pb cutoff = 0.4%, then mean cu would be mean cu above 0.3% cu,
and mean pb would be mean pb above 0.4% pb.
Note: A useful by-product of Cutoff Type II is that we can filter out values from a
database or text file which are missing or too low to be useful. For example, suppose
we are reading a text file wherein all fields have many zero values which are
uninterpolated blocks that we want to exclude from our statistics. In such a case, we
can just enter cutoff values such as 0.001 to exclude zeros from the statistics. Note
that this is very different from setting cutoff values of 0.001 for fields in the filter
definition, which would reject the entire record whenever one field was below cutoff.
When defining a list of fields, please note that all of these fields will be included in the
report matrix file (.mrb) created by Report Builder. However, during the Report Viewer
stage, one can select any subset of the fields for inclusion in the final HTML file. Therefore,
it is usually prudent to include more fields rather than less. If you arent sure whether or
not you will need a field, its usually best to include it.
Defining Statistics
Selecting report statistics is a simple matter of checking the desired statistics from a list
of about twenty that are supported by Custom Reports (see Figure R-6). Certain statistics
are only relevant for bivariate reports, e.g., correlation coefficient (r), and these are
suppressed from the list when the user chooses the univariate report type. Some statistics
such as median and quartiles require that extended metadata be set in MSDA (*). These
statistics are suppressed from the list if they are not available.
(*) Note: Extended metadata includes results such as min. and max. of all fields. It is an
optional calculation performed elsewhere in MSDA.
Defining Filters
Filters refer to selection criteria such as rock type and cutoff grade. There are two ways
to define a filter:
Basic: The user defines a list of categories, cutoffs, or bins on a specified field (see
Figures R-7 and R-8).
Custom: The user enters an SQL statement to define a filter (see Figure R-9).
The basic filter is the preferred option wherever possible, since it is easier to work with
and the processing time is much faster. In this case, you choose a field on which to filter,
such as rock type, then list the values, cutoffs or bins. For example, to filter on rock types
3,6,10,11,12,13,14,21, you would choose the List option and enter 3,6,10:14,21. If you
wished to use cu cutoff grades of 0.1, 0.2, 0.3, and 0.4, you would choose Cutoffs and enter
0.1,0.2,0.3,0.4. If you choose Bins rather than Cutoffs, the previous example would
report bins 0.1 to 0.2, 0.2 to 0.3 and 0.3 to 0.4.
Page 7
When a basic filter is not flexible enough, you can enter a custom filter using statements
which are essentially SQL where clauses, such as cu >= 0.3 and rock = 1 or
rock = 2 (see Figure R-9). In the Labels textbox, enter a label for each filter value, one
per line. In the Filters textbox, enter the SQL where clauses corresponding to each filter
type. For example, in Figure R-9 we have defined four Ore Types: Waste, SP1, SP2, and
Ore. The definition of Waste is cu < 0.3, and so on.
Note on performance: It is desirable (but not mandatory) to put filter dimensions ahead
of field and statistics dimensions in the Report Builder dialog since the performance is
generally faster.
22nd
Annual
Seminar
Other Options
One may save the current report builder parameters with a specified name, e.g., My
Favorites, and restore them at a later date. This may be done by using functions on the
File menu or the toolbar.
Report Viewer
The Report Viewer allows one to extract results from the report matrix file (.mrb) and
write them to an HTML file for viewing and printing. To start the Report Viewer, simply
Open the report file (.mrb) in MSDA Manager, or double click on it. A small dialog will
pop up asking you to choose between Report (HTML) mode or Chart mode. These will be
discussed below.
Report Mode
When a report file is opened in this mode, the HTML Report dialog pops up as shown
in Figure R-10. The first and most important tab is the Layout tab. In this tab you select an
axis for each of the dimensions in the report file. For example, in Figure R-10 the report file
has five dimensions: field, statistic, ore type, rock type, and elevation. We are placing fields
in row groups, then for each field we are placing statistics in rows. Elevations will be laid
out across the columns, and finally, for each unique combination of rock type and ore type,
we will generate a separate page, ie.. a separate HTML table with page break. The specific
fields, statistics, ore types, etc., can be chosen by clicking on the appropriate Choose button
and selecting the ones you want from the list of those in the report file (see Figure R-11).
Figure R-10
Page 8
22nd
Annual
Seminar
Figure R-11
Note regarding Total and All: Custom Reports automatically adds two items to each
filter dimension, Total and All. The former is the total (union) of all specified filter items,
whereas the latter selects all records regardless of the value of the filter. For instance, if we
ask for rock types 1, 2, and 3, then Total would capture all records from rock types 1 + 2
+ 3, whereas All would capture all records regardless of rock type (including rock type 4,
5, etc., and even records with missing rock types). In other words, All basically collapses
the dimension. If you have a table of cutoff by rock type, then the row for rock type = All
would reflect data filtered on cutoff only.
The second tab in the HTML Report dialog is the Options tab. This tab allows one to
place headers, footers, etc., on the report. Headers may contain special fields such as [date]
and [page], which are replaced by the appropriate values when the report is created. This
tab is basically very straightforward.
The final tab is the Style tab, as shown in Figure R-12. To set the style of a particular
report component, such as Title, Cell Value, Row Label, Column Label, Footnote, etc.,
simply select the component in the combo box at the top of the page, then use the font
color and justification buttons to edit it. Standard Microsoft Windows color and font
dialogs are used. When you have made the style the way you like it (a sample is shown)
click on the Set button beside the report component at the top of the dialog.
Figure R-12
Page 9
Custom Reports can be used to build a very wide array of reports on all data sources
supported by MSDA, from simple summary tables with a few rows and columns, to
massive reports with complex filters, detailed tables using row and column groups, and
custom fonts, colors, and text size. The following figures show selected pages from two
report views of the same report file.
22nd
Annual
Seminar
Figure R-13
Figure R-14
Chart Mode
If you open the report file in Chart Mode, you are presented with a dialog similar to
that shown in Figure R-15. One can rapidly display charts using different combinations
of dimensions in the upper left corner. Each dimension in the report can be used in one of
four ways:
Page 10
22nd
Annual
Seminar
Figure R-15
Page 11
Definition: A variogram range line is a ray from the origin in the direction of the
variogram whose length is equal to the range of the variogram.
Definition: An error circle is a circle whose size is proportional to the difference
between the model and the experimental data at each lag point.
An Auto-fit tool is available to calculate the best fit 3-D variogram model. Var3D
supports up to three structures.
A dialog shows the best fit parameters. Users may manually edit these parameters to
modify the 3-D variogram model if desired.
22nd
Annual
Seminar
Figure V-1
Figure V-2 shows Variogram 3D Manager in Rose View mode. The following key
features can be seen in this view:
Page 12
22nd
Annual
Seminar
Figure V-2
Page 13
22nd
Annual
Seminar
Figure V-3
When working with the Standard View, it is important to remember that it has all of the
properties and benefits of any other MSDA chart, e.g., there is extensive right-click support
to modify the appearance of the chart (colors, fonts, titles, etc.), add a legend box, copy to
bitmap, print, etc. In addition, if you hover over any lag point with your cursor, a box will
pop up showing the lag properties, e.g., lag distance, number of pairs, value, etc.
Figures V-4 through V-6 show the Standard View as it appears with a variety of settings
illustrating some of the features discussed above.
Page 14
22nd
Annual
Seminar
Figure V-4
Figure V-5
Page 15
22nd
Annual
Seminar
Figure V-6
Page 16
22nd
Annual
Seminar
improves the accuracy of the contours. But remember, improved smoothness and
accuracy mean longer refresh times.
You may attach a style file to modify the charts style.
Figure V-7
The current plane control for the Rose View is defined in the dialog shown in Figure
V-8. It is possible to define the current plane via three rotation angles in any of the
supported conventions (GSLIB, GSLIB-MS, MEDS, Sage), or by selecting one of the
principal directions (EN, EZ, NZ). One may assign a window by checking Use window
of and assigning an angle, e.g., in Figure V-8 we are using a window of 5 degrees. At any
time, one may also rotate the plane by setting a rotation angle and an axis about which to
rotate, then clicking Rotate, e.g., one could rotate the current plane by 10 degrees about
the Easting axis (E). The icon shows the orientation of the current plane, e.g., in Figure
V-8 the current plane is horizontal (Z is shown coming out of the view towards the user).
Figure V-8
When working with the Rose View, it is important to remember that it has all of the
properties and benefits of any other MSDA charts, e.g., there is extensive right-click
support to modify the appearance of the chart (colors, fonts, titles, etc.), add a legend box,
copy to bitmap, print, etc.
Figures V-9 through V-12 show the Rose View as it appears with a variety of settings,
illustrating some of the features discussed above.
Page 17
22nd
Annual
Seminar
Figure V-9
Figure V-10
Page 18
22nd
Annual
Seminar
Figure V-11
Figure V-12
Page 19
Figure V-13
22nd
Annual
Seminar
Figure V-14
When the auto-fit parameters have been entered, the next step is to initialize the
variogram modelthe auto-fit needs a valid model with which to start. The easiest way to
do this is as follows:
Page 20
22nd
Annual
Seminar
On the Model tab, General sub-tab, enter a rotation convention, e.g., GSLIB, MEDS,
Sage (see Figure V-15). All rotation angles arising out of the auto-fit will be computed
in terms of the specified convention.
On the Model tab, Structures sub-tabs #1, #2, #3, check the structures you want, and
the model type for each structure (see Figure V-16). E.g., you may say that you want
two structures; the first is spherical and the second is exponential.
You now need to enter all of the ranges and sills to define a valid starting model.
You could enter each of these by hand, but in practice one generally uses one of the
following methods:
o Select Initialize Model from the 3D Model menu to set all of the ranges, sills, and
rotations to 0.0.
o After running auto-fit once, the parameters will be contained within the dialogs
shown in Figures V-15 and V-16. It is very common to keep these parameters
and re-run auto-fit again, perhaps with smaller tolerance, etc., in order to fine
tune the best fit model. In other words, your initial model for run #2 is the best fit
result from run #1.
Var3D lets you pin (fix) any of the parameters by checking the adjacent checkbox
(see Figures V-15 and V-16). E.g., one could set the nugget to 0.1, check the adjacent
checkbox, then run auto-fit. The result would be the best fit 3-D variogram model,
subject to nugget = 0.1.
Figure V-15
Figure V-16
The final step is to simply run the auto-fit program. This is done by selecting Auto-Fit
from the 3D Model menu. As the auto-fit progresses, the progress, current RMS Error, and
number of iterations are shown at the bottom of the screen. A typical auto-fit takes about
10 seconds, though this depends on many variables and could be longer.
Page 21
22nd
Annual
Seminar
Figure V-17
Figure V-18
Page 22