User functions in RAP?
I am helping my users design some end-user reports that get to be
8 or more pages of end-user code. This could be shortened to just
a couple pages and be easier to maintain if we could write a little
function or subroutine in RAP. Just simple repetitive stuff as the
summary variables are calculated.
Scott
8 or more pages of end-user code. This could be shortened to just
a couple pages and be easier to maintain if we could write a little
function or subroutine in RAP. Just simple repetitive stuff as the
summary variables are calculated.
Scott
This discussion has been closed.
Comments
--------------------------------------------------
Article: Extending RAP
---------------------------------------------------
There are two very simple and powerful techniques to extend the capabilities
of RAP infinitely. These are summarized below and covered in more detail in
the RAP.hlp online help. Demos and tutorials are installed to
RBuilder\Demos\RAP. The tutorial text is located in RAP.hlp.
1. RAP Pass-Through Functions
These are functions that appear in the Language tab of RAP's Code Toolbox.
These functions are written in Delphi and can be called from RAP. RAP's
pass-through function architecture enable's developers to add new built-in
functions to RAP's code toolbox.
2. Extend RAP's RTTI
RAP's Run-time Type information defines what classes and properties can be
accessed via RAP. By default the published properties of any class that is
registered with Delphi's RegisterClass procedure is recognized by RAP. In
addition many of the public properties and methods of ReportBuilder classes
are exposed.
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.comRAP is extremely
simpl
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
In addition to creating RAP pass-through functions you can also use RAP code
to create global functions for use within a single report. There are
examples of this in the RAP demos - RBuilder\Demos\RAP...
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Which demos? I looked at quite a few, and find examples of using RAP
pass through functions - and use of the functions already provided.
But I was looking for how the end-user could create a function they
would call repeatedly - to avoid long repetitive code.
Scott Stalheim
1. Run RBuilder\Demos\RAP\Main. Use the Level directory to select the
section labeled
"21-30..global declarations, objects, and programs."
2. From the Calc workspace you can select View | Module, which presents the
global view of the calc module. You will see the following nodes:
a. Declarations - supports declaring global constants and variables.
b. Events - supports the global OnCreate and OnDestroy events in which you
can create global objects.
c. Programs - select this node to create the global programs and functions
that you are asking about. Position the mouse over either the list view pane
on the right and press the right mouse button. You can create procedures or
functions.
d. Event Handlers - select this node and it will display a list of all
event-handlers that have been implemented for the report.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com