Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Downloads
Search: 

VFP to Word Report Generator DBRAD32
Dmitri Bayanov
FREE Report Generator (Nov 19, 2001) for Visual FoxPro applications with MS Word output(RTF/HTM) and built in UNIVERSAL MULTISELECT HIGHLIGHTED GRID. Full solution with TastTrade examples. To be built in your VFP application as a 1.7mb APP (to call as a function). Can be used as a Dynamic HTML-pages Generator for IIS. Charge free. Full source code (12000 lines of code, 50 forms and classes).
Created on
22 years ago
Downloads
3383
File type
General information
Description
Generator allows to design report form and execute it. As a result RTF/HTML files are generated and loaded in MS_Word/Ms_Viwer. Built in UNIVERSAL MULTISELECT HIGHLIGHTED GRID provides Sort, Search, Find_and_HighLight Select, Replace in HighLighted, AutoReferences, Scrolled Record Form, Save/Restore Column settings, GUID AutoPrimary Key Generator, Semaphore Multilevel Locks, etc. This solution resolves difficult report form task due to the next flexible methodological model - user report can be defined as a set of:
  • 1)Ordinary report,
  • 2)Macroprocedure report (named user's run-time procedure),
  • 3)CrossTable report (based on cross table with variable number of N_columns),
  • 4)Composite report, as a container of 1,2,3 aboved ordinary report types.
For a Macroprocedure report (2) special author's macrointerpretator with IF_ELSEIF_ELSE_ENDIF, DOWHILE_ENDDO support is used. It allows to run any external programms, native VFP reports, visual forms, commands and functions. Up to 4000 chars in macro expression is avialable due to recursive macro evaluator (standard &cText has a 256 chars limit). Internal Visual means and VFP-context codes in Event Methods, Word document Bodies and Macros provide wide and flexible range of solving tasks - from simple ones up to cool. ORDINARY report is selected from source table and consist of :
  • Body (Table or a Card forms chain for every record),
  • Common Head and Foot,
  • Five level SubHeads and SubFoots,
  • Ten Event Methods (user procedures for any report building event) .
Heads, Foots and Card Forms should be design in MS Word (or RTF box), using: 1)MacroText - expression, returning text (like function). Evaluated text is inserted in document instead of {Macro}. In Macro You can use RTF code like: {\b\i BoldItalicText \plain)} , {IIF(cVar,"\par","")}. 2)MacroCommand - (like procedure), started with ampersand character: {&.....}. Macrocommand is just executed: {&Messagebox("Hello, world")}. In macro You can use any legal VFP expressions, functions, variables and fields. Additionaly, MacroCommands may contain any of next control words:
IF _Cond_        
ELSEIF _Cond_               
..EXIT                       
..BREAK                    
ENDIF         

DO WHILE _Cond_
..LOOP            
..EXIT                
..BREAK               
ENDDO
IF_ENDIF and DO_ENDDO can handle text output in Word document like: Text head: ----------------
 {&IF RapTmp.Sign>0}
   Debet receipt text ...
 {&ELSE}
   Credit receipt text ...
 {&ENDIF}
The result for RapTmp.Sign>0 will : Text head: -------------- Debet receipt text ... Also You can issue this construction in one string like: Text head:{&IF RapTmp.Sign>0} Debet=.. {&ELSE} Credit=.. {&ENDIF} And the result for RapTmp.Sign>0 will : Text head: Debet=.. Controlling Macro allows to use IF_ELSEIF_ELSE_ENDIF, DOWHILE_ENDDO nested constructions and RTF tags like {/b/par} to control and format Word text output in resulting RTF document. RTF-modules Join and Macrointerpretator author's alghorithms are used in. Ordinary Report document is based on SQL-Select from user source table. This selected table is a "work horse" of report designer (with RapTmp alias, so You apply to it's fields as RapTmp.SomeField). Nevertheless, You can apply to native source fields, if You set on [Scaning] switch in [Settings] page. Selected group parent table in composite report is named as GroupTmp, so You apply to it fields as GroupTmp.Field. Before report build, You can call some dialog form for getting parameters or executing macroprocedure, preparing tables and variables, etc. Do it in LOAD method. After report is built, the UNLOAD procedure is executed. Issued BREAK command in LOAD cancels report building and calling MS Word window. Main features:
  • Select Filter Condition from source data.
  • Composite reports from ordinary ones chain.
  • Grouping, Sorting, Merging.
  • Five grouping levels.
  • VFP context Macros in MsWord document (evaluated and text controlled).
  • Heads and Foots designing right in MsWord.
  • HTML files compiles from RTF through MS Word converter.
  • Page Style settings.
  • Wide Table Autosplitting mode.
  • Whole Event Methods access.
  • A huge of user functions:
  • GUID() - Global Unique Identifier GUID generator,
  • SemLock(), SemUnlock(), SemLocked() - Semaphor multiuser locks,
  • CallTab() - Universal Multifunctional Highlited Grid function,
  • etc.
Attached Examples of report forms are based on well known Tastrade tables. Full source codes and project are avialable as opened information. App module and source code are located on the next servers: www.dbrad32.narod.ru/eng/dbe.htm (the freshest page on russian server) www.dbrad32.freehosting.net/eng/dbe.htm www.dbrad32.freeservers.com/eng/dbe.htm Some notes about GUID - Primary Key (Unique Value) Generator: Traditional context relations between tables are realized through semi-unique key values (as a rule - to be input manually). Well known method with incremental field in locked shared table can not garantee uniqueness on share-isolated systems. Also non-shared method 38-bytes unique value from Win API function by Microsoft is known. New improved method for original primary key (Globally Unique Identifier - GUID) is the subject of :
  • Application Session or PC Timer shift identifier
  • PC HDD checksum identifier
  • Unique timestamp code
Created GUID is compact enough (8 bytes) and able to store 20-years time interval (by 0.01 sec plus additional co-unique counter). Such method guarantees absolutely unique simultaneous keys generation on isolated information platforms (i.e. Offline Views) and allows to recover Creation Date from GUID value. Using such GUID as a primary field allowed to create primary keys automatically (in NEW trigger) - in "behind the scene" mode and to develop automated visual references as a standard object class. This idea was fully realized in DBRAD32 project. Simple function GUID() is described here: http://www.dbrad32.narod.ru/dbsys/guid.htm Report Generator is the external part of DBRAD32 project (Universal Application Engine) DBRAD32 is the abbreviature of "Data Base Rapid Application Development for Win32". DBRAD32 project is the part of Ph.D thesis. Original version is in Russian.
Created by

Comments
Add a comment
More downloads created from this member
Dmitri Bayanov
Ever got an idea to generate Your own RTF code for MS Word document file ? Here are some useful VFP functions codes for RTF-coding (RTF-code Join, Set common Page Size settings, Create table, Add row to table) by Dmitry Bayanov. ...
Created on
22 years ago
Downloads
793
File type