Navigation:  Exporting and Importing Data >

Data Export via Starter Views

Print this Topic Previous pageReturn to chapter overviewNext page

Under normal circumstances, the technique described in Exporting Contents of Grids in Forms will be sufficient for all complex data export. Use the technique of this page only when necessary.

 

Combining the flexibility of views and the grouping feature of view statistics, you will have the absolute power to retrieve the data of interest into your data export files. It is powerful because:

What we can do in other export functions, including Exporting Race Data, and Exporting Horse Data, discussed in previous sections, can all be done here.
By using Data Export via Starter Views, you can export not only the normal race and horse data, but also your notes, ratings, statistical results, jockey information, stable information, and much more.
Full power of MCL is available in Data Export via Starter Views.

 

Example

We will demonstrate the basic steps of running Data Export via Starter Views by a practical example. In the example, we will use the "User Comments" view to export the data columns in the following list. Although "User Comments", which we use in this example, is a built-in view, in most cases we will create a new view for Data Export via Starter Views.

Existence

Column to Export

Type

MCL Function

 

Built-in

 

Horse Name

Existing built-in column

 

No.

Existing built-in column

 

Rtg

Existing built-in column

 

R1

(User rating)

Existing built-in column

Numeric(3,0)

 

Comment

(User comment)

Existing built-in column

Character(200)

 

New

Season-#

New built-in column

 

FP

(Finishing position)

New built-in column

 

Top3 Rtg

(Rating of 3 fastest horses)

New user-defined column

Character(12)

RunnersList('HrRating( )',,'For HrFp( )<=3')

 

Steps

1.Open or create the view containing the data to be exported

In this example, we will open the built-in view "User Comments". If you have not made any change to the view, you will see a layout similar to the following figure. It will not be a problem if you have already made change to the view. You can proceed to the following step as long as the following columns still exist:

- No.

- Horse Name

- Rtg

- R1

- Comment

 

If any of the columns no longer exists, you may recreate it before proceeding into the following steps.

 

2.Create columns of interest

The columns Season-#, FP, Top3 Rtg do not exist in the original built-in view. Create these 3 columns. Season-# and FP are built-in columns, you may simple choose them in the Built-In Item list. Please put the columns before the No. and Wt columns respectively. Create the user-defined column before the Wt column. Don't forget to set the column type to "Character" and "Chars/Digits" to 12 (see the figure below).

 

3.Define Stat Groups

Set the following columns as "Stat Group". A letter "g" will be shown at the left of the column name in the column list:

- Horse Name

- Season-#

- No.

- FP

- Rtg

- R1

- Comment

 

4.Define Stat Column

Set the column FP as "Stat Column". A letter "s" will be show at the left of the column in the column list.

 

Note: Advance Data Export is actually using a statistical view to retrieve data from RaceMate's database. Even if we are not interested in any statistical item, we still need to set one. If we choose FP (finishing position) as the statistical column, the average, maximum and minimum values of FP of each data group (each horse in this example) will be shown in the data retrieved. If you are not interested in these figures, you may simply delete such columns in the resulting Excel sheet.

5.Rearrange Grouping Order

Move the Horse Name column to the top making it the first column. The purpose of doing this step is to make the final result be sorted firstly by Horse Name.

 

6.Save the View

Click on the [Save+Exit] button to save the changes. You will see a screen similar to the following figure.

 

7.Retrieve Data

Click on the [Stat] button on the form in the above figure. You will see the following form. Set the evaluation period to races 1-9999 of the season 2004-2005. Click on [Calculate]. The data retrieved will be shown in the grid at the bottom.

 

8.Export result to Excel

Click on the [Output] button to send the retrieved data into an external file. If you choose Excel as the output format, a Microsoft Excel spreadsheet similar to the following will be created.

Note: Special characters in column headings are replaced by an underscore by RaceMate

9.Fine Tune Excel File

 

Finally you may delete the rows and columns that you don't need from the exported Excel sheet.

 

 


Page url: http://www.racematenet.com/english/help/index.html?data_export_via_starter_views.htm