Creating a Report

All field data contained in the database record and the related images can be automatically transferred to a Word document template to generate a printable report.
The document templates can be generated with any Word version, WordPad or Word-compatible editor.
In the program folder (C:\Programmi\Alexasoft_X-Pro) a selection of sample templates is available.
For X-Pro you can see the templates Report_Ex1.dot and Report_Ex2.dot.
 

document template

A template is a normal document, correctly formatted, with key words enclosed in braces. Each word identifies a field present in the database record and has the function of transferring automatically its content to the report.
For X-Pro you can see the templates Report_Ex1.dot and Report_Ex2.dot where the possible key words are indicated.

When you change the field names of the database record, they will become the new key words. For example, if Field3 has been renamed as Address, you will need to use the key word {Address} and not {Field3} in the document template. It is important to use the field name exactly as it is sensitive to cases, spaces, etc.

To transfer one or more images, you need to insert in the report
the following strings: {image00}, {image01}, etc., each of which identifies an image selected from the list in the database record. The string {image00} corresponds to the first image selected from the list.
To select more images, hold the <Ctrl> key down and click the left mouse button.

If you wish to position or resize the image, you need to insert the string {image00} in a table drawn with the Word Tables and Borders function   . See the template Report_Ex1.dot or use the Set Image Width for Report function.
 

generating a document template

To generate a new document template it may be convenient to modify an existing template chosen among the sample reports.
Outside the X-Pro program,  open the template Report_Ex1.dot with Word or similar program and modify it at will.
 

Saving a document template

Once a template layout is complete, the file must be saved with a .dot extension, not with a .doc extension, which is Word's automatic extension.
Then select in Word: File->Save As. The Save As dialog will open.
In  Save File as Type: select Document Template, then select the destination folder, indicate the file name and press OK to confirm.
If the file is saved with a .doc extension, i.e., as a Word Document, X-Pro will not be able to use it to generate a report automatically.
 

Report

Press the Report button in the database record and choose the desired template. Automatically, all the data of interest will be transferred to the report.
The resulting report can then be edited like any Word document and sent to the printer or stored.
 

sample report (Report_Ex1.dot)