Is it possible to define global constants for RAP functions?
Somewhere where you can put something that all RAP see without defining
in each report (imagine you want do calculationl like : r * pi_greek and
you don't want to re-define pi_greek each time)?
Comments
Inside the treeview in the upper left hand corner of the Calc tab, if you
right click and select "module" from the popup menu, you will get access to
all the global options in RAP. From the Declarations section you could
create any number of global constants or variables.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I thougt they are only for the report in which they reside...
Sorry, I must have missunderstood your first inquiry. RAP is designed to
allow each report to be completely portable and independent of a reporting
application. For this reason there is no such thing as an application
global constant in RAP. You will need to use a constant created in Delphi
to accomplish this.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Is there a way to add a function or global in Delphi code that can then be
used in the SQL of the RAP dialogs? Basically, some means of setting a
value that can be used in a comparison in the SQL is what I need.
/Matthew Jones/
Some options:
1. Create RAP pass-through functions that return Global values.
2. Use a JITPipeline with each field in the JITPipeline representing a
Global constant. Then you culd access these in RAP code or connect them to
DBText etc. For example
plGlobals['pi_Greek']
3. In the Report.Template.OnLoadEnd event. Initialize the report with some
Report.Parameters[]
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com