
November 21, 2005
Pragma 6 can display file reports in a dialog box.
An empty, default report is automatically created by running the standard verb DISPLAY REPORT (DSRP). The first parameter of the verb must contain the path-filename of the Report Textfile. You can put the Report Text file wherever you want, as long as your computer can see it. The second parameter of the verb determines the style of the dialog box (other styles not yet supported).
Of course an empty report is of no use to anybody, so you must tell Pragma 6 what you want to show and how you want to show it. To do this you must create a Report Text file with all the report parameters.
The Report Textfile can have any suffix you want and you must specify it in the path-filename. We strongly suggest that you call all yout report text files with the same suffix (.p6r for instance) so that you can easily find them.
In the Report Textfile you have to specify the FileManager. At this moment it automatically defaults to the Pragma file managers, PFM and Btrieve.
The next parameter is the PragmaFileName of the primary file you want to display in your report. File name is the name as it appears in Pragma.
After the file name you must also specify whether you want to use the internal or external file manager with the parameter IntExtFilemanager and then the key number with which you access the file, with the parameter KeyNoun.
An explanation of all the parameters is listed below. Wherever it makes sense a parameter has a default value. If the default value seems right for you, you can omit that parameter. There are no checks for the parameters and you can write nonsense values and more than likely there will be a nonsense report or response.
A Pragma 6 program can contain as many reports as you desire, as long as every report has its own report text file.
Please note that the report program was developed on a screen with a resolution of 1024 x 768. The results on other resolutions have not yet been tested.
Any spaces before or after the field strings are discarded before shown.
The tutorial vocab contains a form, FORM TEST REPORTS, that displays various reports. With the tutorial vocab there are also some chart text files. They all have the suffix .p6r.
The report text file is a regular text file that lists all the compulsory and optional parameters that will be used to display the report.
You must create the report text file with any text editor that creates a text file without control characters besides carriage return - new line (_M_J).
Another way of course is to create the report text file from within a Pragma program. This option is left to your ingenuity. In the future there may also be a report editor, to facilitate your task.
All parameters start with the parameter name, followed by an equal ( = ) sign and then the parameter itself, followed by a carriage return. A space before and or after the equal sign is optional. The parameter name is shown with some caps, to facilitate reading the parameter. These caps are optional, since the program converts all the parameter names to lower case letters.
There are various types of parameters, each with his own syntax.
The Report Textfile and some of these parameters and are also used by other programs that list files, like the Export SQL Utility. Each parameter shows where it can be applied to.
A text parameter contains a text string. What you see is
what you get.
Do
not use quotes (") unless you want them also displayed. If you don't
want anything displayed, not even the defaults, leave the entry after the equal
sign blank.
Don't forget the carriage return, if you are at the end of the file.
Pragma 6 Reports
The text on the caption bar of the form that contains the report. If this parameter is omitted the default will display the report text file name.
| Default: | DialogCaptionbarText = Pragma 6 Chart + textfile name |
Pragma 6 Reports
The text on the status line of the form with the report.
| Default: | StatuslineMessage = Welcome to the Pragma 6 report |
Pragma 6 Reports
The text above a report used to describe the report
| Default: | ReportHeadingText = Report Heading |
Color parameters, in the RGB (red, green, blue) format. The letters RGB are optional, but you must enclose the three color numbers in parenthesis and divide them with a comma. The color numbers go from 0 to 255. But you should know that by now.
| Example: | RGB (0, 0, 0) | Black |
| Example: | RGB (255, 255, 255) | White |
| Example: | RGB (255, 0, 0) | Red |
Pragma 6 Reports
The background color of the form (The client area).
| Default: | RGB (255, 255, 255) | White |
Pragma 6 Reports
The color of the report heading text. The report heading is the text above the report, in the form.
| Default: | RGB (255, 0, 0) | Red |
The rectangle parameters define the size of rectangles that surround the report.
Do not think of the numbers as real rectangles but of the position of the rectangle sides.
Pragma 6 Reports
Determines the size of the list control in the client area.
| Default: | 50,80,200,50 |
First number is the distance from the left
side of the report area.
Second number is the distance from the top
of the report area.
Third number is the distance from the right
side of the report area.
Fourth number is the distance from the bottom
of the report area.
The numbers, if more than one, must be separated by commas. Blank spaces are ignored.
Pragma 6 Reports
The filemanager that will be used.
2 are the Pragma file managers PFM and Btrieve.
| Default: | FileManager = 2 | Pragma file managers |
Pragma 6 Reports
Export File To SQL Utility
This parameter tells whether the internal or the external file manager of Pragma will be used.
0 is the internal file manager
1 is the external file manager
| Default: | IntExtFilemanager = 0 | Pragma Internal file manager |
Pragma 6 Reports
Export File To SQL Utility
This parameter determines what key number will be used when
accessing the
file.
| Default: | KeyNumber = 0 |
Export File To SQL Utility
The maximum number of records that will be listed.
At the moment used only by the utility View and Export a PFM
File
| Default: | MaxListNumber = 150 |
Export File To SQL Utility
Can be a string or a number that tells the filemanager where to start reading records (from). The default is a null string and the report will start from the beginning of the file.
| Default: | LowerBound = "" |
Export File To SQL Utility
Can be a string or a number that tells the filemanager where to stop reading records (to). The default is a null string and the report will go to the end of the file.
| Default: | UpperBound = "" |
Pragma 6 Reports
Export File To SQL Utility
The name of the Pragma file.
| Default: | No default |
Column
Pragma 6 Reports
Export File To SQL Utility
This string determines the contents of a column and the number of columns displayed. If these parameters are omitted all the fields of a record will be displayed, with the Pragma noun names of the fields in the header.
It is very important that you are consistent with defing these parameters. They all must have the same number of items.
| Column = 1, 1, Name,100,C | |||
| Column = 2, 3, City, 80,R |
The first item in the parameterstring is the column number to fill in the report. Column numbers must start with 1 and you can have as many or few columns you want. Be aware that the column numbers must be in sequence, without gaps.
The second item is the field
number of the file that you want to write
into the column. You can choose any field of your file you want, in any
order. Field numbers can start from zero. ??
Hint. Do a recap of your file and start counting. No
defaults and you must insert a number that makes sense.
The third item is the header you want to put on top of the column. You can leave this item blank and the program will use the Pragma noun name of the field, which is usually much less descriptive.
The fourth item is the column width, in pixels. If you leave this item blank, the default width of 100 will be used.
The fifth item is the alignment of the text or number in the column. Valid values are L (left aligned, default), C (center) or R (right).
ScriptPragmaFilename
Export File To SQL Utility
The names of the Pragma file that the scrpt will export and optionally the name of the Report Textfile to use for that Pragma file.
| ScriptPragmaFilename = ADDRESSES, Report adresses.p6r |
The first item in the parameterstring is the Pragma filename to export to SQL the Pragma file.
The second item is the Report
Textfile that will be used to export to SQL the Pragma
filename. This gives you control over how to export the Pragma
file. If this item is omitted, defaults will be used.
Can either be true or false.
Pragma 6 Reports
Whether to show the exit button (true) or not (false).
| Default: | ShowExitButton = false |
Export File To SQL Utility
Whether the Report textfile is a scriptfile (true) or not (false).
If this parameter is set to true, the whole textfile will be treated as a scriptfile
| Default: | ReportScript = false |
Export File To SQL Utility
Whether the program shows some of the queries (true) or not (false).
This parameter is useful at times for debugging and to see what is really going on.
| Default: | DebugShowQueries = false |
Export File To SQL Utility
Whether the program displays a message bow that gives you the choice to delete a tablename that exists (true) or not (false).
This parameter gives you the choice to abort if the table name already exists. If you are running a script more than once this parameter can become useful to avoid getting the abort or not message box.
| Default: | InformWhenDuplicateTablename = true |
Besides a small description of what is wrong, please always send me the report text file that is the culprit. A printout of the report text file is also acceptable.
I welcome suggestions, as long as you don't consider them orders. Here is a list of future possibilities. Let me know on a scale from 1 to 10 (1 = absolutely not necessary, save your efforts, 10 = would like this featre for yesterday) what you consider important or not.
Report Text File editor. A Pragma 6 utility that lets you create a chart text file.
Printing of a report.
Choice of various forms that host the reports (Borders, various sizes and positions).