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

calculated summary fields

edited June 2003 in End User
Dear all,
I am using rb pro and Delphi 6.

I have a report which includes a derived field which is the number of days
between 2 dates. For each record this is displaying fine.
I have a summary field which is the % of the number of records for which
this number of days is less than a parameter value.
In standard report building I use a variable and calculate it using a
procedure.
How can I do something similar in the end-user environment? Is it always
possible to build a SQL expression for complicated stuff like this?

regards
--
John Evans
Managing Director
Clear Advantage Ltd

www.Clear-Advantage.co.uk

Comments

  • edited June 2003
    A way to use your code in the end user environment is to use RAP. RAP lets
    you code at runtime and save the code in RAP, since we wrote our own
    interpreter. RAP is only available in RB Enterprise. This will be an easy wy
    to port your current Delphi code for these calculations to allow an end user
    to code it if you give them a template with the code in it. You coulde also
    provide some RAP pass through functions to help them out, because you do the
    code for them, they will just have to use your pass through functions in
    their RAP code. There are examples of creating RAP pass through functions in
    the RAP tutorials and RAP help file.

    RB's query tools allow you to do the most mainsteam SQL functions (remember
    we have to support SQL which will be run on different SQL databases). You
    can create expression type calculated fields in the Calc tab of the query
    designer. If your database supports the calc, then try entering it in there.
    Otherwise, you'll have to edit the SQL text to do more advanced stuff to
    create calculated fields on the dataset.



    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.