Thursday, May 11, 2006
From the Edge:
Keeping Track of Form, Label and Report Design Revisions
Section: Database Maintenance
Chapter: Running R:BASE Your Way!
Platform: R:BASE 7.5 and V-8 Turbo for Windows
Builds: 7.5.25.30511, 8.0.12.30511 or higher..
Have you ever had a need where, for some reason, you
wanted to revert back to a previous version of a form,
report or label without going to your backup (if you
ever made one), or you wanted to see what was changed
since the last revision?
Along with many requested enhancements, R:BASE 7.5
(Build: 7.5.25.30511 and higher) and V-8 Turbo (Build:
7.5.25.30511 and higher) include the following two
features:
A.
The following system variables will be created when
opening the Form, Report or Label in appropriate
designer:
Form Designer: RBTI_FORM_FORMNAME
Report Designer: RBTI_REPORT_NAME
Label Designer: RBTI_LABEL_NAME
B.
Form/Report/Label Designer: On Close Designer Action...
Form Designer | Layout | On Close Designer Action...
Report Designer | Report | Actions | On Close Designer...
Label Designer | Label | Actions | On Close Designer...
Taking advantage of both requested enhancements, now
you have the swift option to track revisions of the
forms, reports and labels, as well as to save a backup
copy of this particular form, report and label with On
Close Designer Action. The custom defined EEP code will
be executed when the appropriate designer is closed. If
you wish to keep track of all forms, labels and report
and would like to keep those revisions in the same
database, below is one approach to implement such a
routine in your database. Feel free to modify anything
in this document to fit your needs.
Objectives:
Keep a backup copy of the form, report and label each
time the form, report or label is brought up in
appropriate designer
Track the revision number, date, time and name of the
user who modified or brought up the form, label or
report in designer
Steps:
01. Add the following three tables:
. Form_Revisions
. Label_Revisions
. Report_Revisions
See all details on next page for table schema
. Form_Revisions.STR
. Label_Revisions.STR
. Report_Revisions.STR
02. Include the following code in each form, label and
report as embedded "On Close Designer..." EEP:
. Form_Revisions.EEP
. Label_Revisions.EEP
. Report_Revisions.EEP
A PDF document with all details/code is available at:
From The Edge: http://www.razzak.com/fte
If designed and implemented correctly as outlined,
you should have a completely automated process to
keep track of your form, report and label for given
database.
A sample application along with all details to
demonstrate the use of this technique is also
available on "Super" Advanced R:BASE 7.5 for
Windows Training CD (Indianapolis Edition).
http://www.rbaseuniversity.com
Enjoy and make sure to have fun!
Razzak.