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

RAP - conditional autosearch field

edited November 2008 in General
Hi,

I am calling a RAP report (v. 10.07) from Delphi 6. I am sending a variable
to an autosearch field which gets created in the 'BeforeOpenDataPipelines'
event. What I do want is for the creation to be dependent of the variable
received.
I.E. If I receive one 'contract number > 0' the report is written for this
one contract number. If I receive '-1' all contracts should be written.

Is this possible, or must I solve the problem in another fashion?

Thanks in advance,

Hans

Comments

  • edited November 2008
    Hi Hans,

    ReportBuilder 11 includes new features that allow you to directly assign
    your parameters to autosearch fields in DADE without the use of any code.

    Try using the TdaSQLBuilder object to create or alter your autosearch
    criteria. See the TdaSQLBuilder topics in the ReportBuilder help and the
    rbWiki for code examples and descriptions of how you customize your
    autosearch criteria from RAP. Using this class, it should be fairly easy to
    perform the task you mention below.

    http://www.digital-metaphors.com/rbWiki/DADE/SQLBuilder

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2008


    The AutoSearchField.ShowAllValues boolean can be used to indicate that all
    records should be retrieved.

    Example;

    myAutoSeachField.ShowAllValues := contract number < 0;

    if not (myAutoSeachField.ShowAllValues) then
    myAutoSeachField.SearchExpression := IntToStr(contract number);


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.