Various Clipper stuff

Report generator

Here is an engine, which provides a storage of the report form descriptions in a textual file, rather than in a program's body, that allows to modify the forms of reports and create new without any changes in the program's code. More information you will find in a provided zip package.


Function TextView() allow to view large files ( > 64K ) which can't be viewed by standart MEMOEDIT() function.
I usually use it for viewing reports, redirected to a file instead of printer.
Used keys:

ESC - Exit;
F10 - Print;
Shift+Arrow down, Shift+Arrow up - Block operations, requires Clipper Tools library ( NUMAND(), KBDSTAT() - for detectind Shift key )

Function call:
where file_name - name of the file you want to view,
y1,x1,y2,x2 - coordinates of a browse window.

This file is for PUBLIC DOMAIN. You can freely use and modify it.


Just put a line

to your code - and your application will have a built-in calculator.
Used keys -
ESC - Quit,
F10 - Exit and place rezult to keyboard buffer,
+,-,*,/ - arithmetic operarions,
Space - clear buffer,
Ctrl+F1, Ctrl+F2, Ctrl+F3 - Store buffer to first, second, third memory item,
F1, F2, F3 - Get value from first, second, third memory item.
F9 - set number of decimal digits after '.' (default - 2).

This file is for PUBLIC DOMAIN. You can freely use and modify it.

Upgrading databases

This program will allow you to modify dbf files without using dbu like utilities. It is convenient when you need to make upgrade of your program for few or more clients. You are writing a simple script - the same for all users of your program, then send it to each client. He execute upgrade.exe with this script on his computer - and all dbf modifications are done.
The script commands are described below:

FILE filename -
open dbf file 'filename'
REPLACE fieldname WITH [formula1] [FOR formula2] -
replace field 'fieldname' with values, calculated by expression 'formula1' for records, matching expression 'formula2'
the beginning of commands set for structure modification
the end of commands set for structure modification
Commands for structure modification:
INSERT [AFTER fieldname] newfieldname type [len] [dec] [formula] -
insert new field 'newfieldname' after field 'fieldname' ( or to the end, if AFTER don't signed ) and to fill it with values, calculated by 'formula'
RENAME fieldname newfieldname -
rename field 'fieldname' to 'newfieldname'
CHANGE fieldname type [len] [dec] [formula] -
change options for field 'fieldname' and fill it with values, calculated by 'formula'
DELETE fieldname -
delete field 'fieldname'

This file is for PUBLIC DOMAIN. You can freely use and modify it.

Browse module

This is a browse module - a replacement for dbedit() and TBrowse. The first version of it I wrote more than six years ago for Clipper'87 because I didn't like dbedit(). I have added a lot of possibilities to it since first version, so it's much more powerful than dbedit(). What about comparison with TBrowse - no comments, because I never used TBrowse, the only thing I can say - that this module have mouse support.
This file is for PUBLIC DOMAIN. You can freely use and modify it.

Ini files reading

Rdini() function was written for loading memvars from ini files. This allows to change behavior of the application, to control it's execution without changing source code. It's main feature is a possibility to load codeblocks and arrays of any structure.

Rdini() scans file line by line, creates variables ( if they doesn't declared yet ) as Public and assignes them values.

File format:


Function reads variables from beginning of file until first section and from sections, named in function call.
Comments must have the symbol ";" in the first position of a line.
The symbol "&" indicates continue on the next line.

Variables may be logical:

    var_name={|| ... }
array of any structure, including all types of variables:
    arr_name={ ... { ... } ... }


    Rdini ( ini_file_name, [section1_name], [section2_name],  ;
     [section3_name], [section4_name] ),
     where ini_file_name - name of ini - file you want to read, section1_name, ..., section4_name - names of sections in ini - file which you want to read.

This file is for PUBLIC DOMAIN. You can freely use and modify it.

[Download - source code with sample][Download report generator][Return to main page].