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

Calculation Parameter

edited May 2004 in End User
Hello Everyone,

Not that is urgent but I'd like to know if it is possible to, in an end-user
environment, to ask the user for a parameter that can be used for a
calculation. For example I have a report that has an interest rate used to
calculate delay-of-payment charges so I'd like that when the report is
launched it would ask the user which rate the report will use to generate
the data.

Rigth now we're feeding the rates in a table but it is done outside of my
RBuilder end-user app.

Any suggestion is welcomed and thanks in advance

Eduardo Martinez

Comments

  • edited May 2004
    Hi Eduardo,

    If you have ReportBuilder 7.01 or higher, you may want to check out Report
    Parameters. This allows you to send value directly into a report and use
    them as you need them. Check out the following example for how to use
    Report Parameters.

    http://www.digital-metaphors.com/tips/HideDetailWithParameters.zip

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2004
    Thanks a lot, I've checked the example but in this case the parameter is
    passed by code, I'd like to know if there is some way to make RBuilder to
    ask the user at runtime for the parameter.

    This is because I have a general-purpose end user app interface using Report
    Explorer and saving reports in database, but in some of the reports we
    design at run-time i'd like to obtain parameters.

    I'm guessing if a user-defined function would do it, what do you think?

    Best regards

    Eduardo Martinez

  • edited May 2004

    The AutoSearch feature supports ask at runtime. Although it is most often
    used for query parameters, it can be used for any type of ask at runtime
    parameter. See RBuilder\Demos\AutoSearch for examples.

    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2004
    Again thanks a lot, but I think that I haven't explained myself very well
    (I'm native Spanish spoken), or I'm too fool (well, a little bit full). All
    the examples in the Demos folder involve creating source code in Delphi for
    a predefined report.

    Ok let's suppose that I'm a plain user (a little handy on databases) and my
    marvelous IT department has developed an multi-purpose ReportBuilder end
    user app. So I open my ReportBuilder Explorer, create a new report, and I
    need that the report asks me for a value that changes everytime I run the
    report. This value is not a search criteria, it is used within a
    calculation. How, as an end user, I can accomplish that?

    If the anwers for this is in the Demos folder please just point me to it.

    Best regards

    Eduardo Martinez

  • edited May 2004

    Okay, I am understanding better now. :)

    AutoSearch is not going to work for that scenario.

    As an end-user you have access to RAP, the runtime coding environment
    included with RB Enterprise. A possible solution would be to create one or
    more custom RAP functions that can display a parameter dialog and then
    either return the result or store the result in the Report.Parameters[]
    array.

    --------------------------------------------------
    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.com



    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited May 2004
    Yes, I was thinking that it will be the solution but I wanted to know if
    RBuilder has something already done for this.

    May be it can be a suggestion for the next version, a predefined RAP
    function for ask a question an get and answer. Something like MessageBox.
    You have a MessageDlg already working.

    Again thanks a lot, as usual you're a great help.

    Edaurdo Martinez
This discussion has been closed.