Reports (templates for printing) creation
To launch the Report Designer, click on the "Open report designer" button in the Print window. You can also use the shorcut that was added in the Start menu, or launch AMCReport.exe that is located in the same folder than Ant Movie Catalog.
This Report Designer is the FreeReport Designer, and it was nearly not modified (it is rather complex, so I'll probably leave it like it is now).
This page will show the different steps of the creation of a report.
Paper size selection
Go to File -> Page Options to select the paper size. Usually it will be A4 (or Letter). You can also select Lanscape orientation instead of Portrait if you want. In this window, in the "Options" tab, you can also specify the number of columns that you want on your page.
Bands
To be recognized, the fields have to be on "Bands". To put a band on the page, click on the Band icon
and then click on the page, where you can to place this band.
Then you can select which band type you want to place:
Some types will never be used here. Those that you may want to use are:
Select "Master data" and click "OK". Another window asks you to select the source, leave the default choice ("None") and click "OK".
Text items
To put a text item on the Master data band, select the Rectangle object icon
and place it on the band (warning: do not place it
outside the band, or it may not appear on the final report).
The Text editor is displayed:
You can enter the text that you want here, then click "OK". To get this window again, simply double-click on a text object.
In the contextual menu (right-click) of these rectangle objects, there are three options:
Variables (movie fields and others)
To put a movie field, simply add a text item (Rectangle object). In its properties, specify the field name between square brackets [ ]. The list of field names is available from the "Variables" button in the Text editor window:
The field names can also be printed using variables. For that, you have to put the "label:" prefix in front of the fiend name, the whole name+prefix being still between square brackets. This is useful to make multilingual reports (that follow the language used in the program).
In the drop-down list you can also select "Other" to see special fields such as Page number, date, etc...
You can put normal text and variables in the same text object.
Graphics
To put a picture, use the Insert picture icon . The Picture window looks like that:
If you want to specify that this picture should display current movie's picture, click on the "Memo" button and enter "[Picture]" (or take it from the Variables list).
In the contextual menu of the picture object, there are three options:
You can also draw lines, with the Draw line icon .
Scripts
In the window used for editing text items and pictures, a "Script" option can be checked. Then, the bottom part of the window allows to enter a script. The scripts used here are not related to those used by Ant Movie Catalog, except that the language used is also based on Pascal. Here are few examples:
If you want an image to appear only for Action movies, put the following code in the "Script" part of image's memo:
begin Visible := [Category] = 'Action'; end;
If you want to put the year between parenthesis after the title only if the year is specified for the movie (to prevent empty parenthesis), put the following code in the "Script" part of a text item:
begin if ([Year] <> '') then tmp1 := [OriginalTitle] + ' (' + [Year] + ')' else tmp1 := [OriginalTitle] end;
Then place in the text area the code [tmp1]
to use the script result as a new variable.
Lots of functions of the Report Designer are not used here, such as the DB fields, the print preview, subreports, ... (for the print preview, save the template and then click "Refresh" in Ant Movie Catalog's script window, once the good template is selected in the list of course).
If you have problems with movie fields, be sure that they are on a "Master data" band. If fields such as "Total pages" do not work, be sure that the "Two pass report" option is checked in File -> Report Options.