Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Access to variables from Code

edited March 2002 in General
How do I access a global variable from code? Can I access global contstants
as well? I would like to set the value of the global constant from code?

Thanks,

Scott Rowat

Comments

  • edited March 2002
    I assume you mean RAP global variables/constants. You could provide these
    values from the report to you Delphi code via a pass through function that
    you would call from RAP to which sets variables in your Delphi code. To set
    the value of the RAP global constant, use another pass through function to
    set it using RAP's global OnCreate event to get the value from your Delphi
    code.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited March 2002
    Is it not possible to access the RAP global variables/constants from code
    via the TppReport object or something similiar?

    Thanks,

    Scott.

  • edited March 2002
    RAP pass-thru functions are the way to go on this one.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited March 2002
    It does not appear that you can set the value of a Global Constant using a
    RAP Pass-Thru function however you can set a Global Variable.

    I need the ability to get the value of a Global Variable (or Global
    Constant) in a report from Delphi code. Is it possible to access the Global
    Variables in a report from Delphi code.

    Thanks,

    Scott Rowat

  • edited March 2002
    You'll have to write a RAP pass through function that you call from RAP
    which sets a Delphi variable's value to the RAP global variable value.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.