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

Copying Search Parameters Between Queries

edited July 2006 in RAP
Hello,

If i create the following

QUERYA
Search
Field1 = XXXX Autosearch
Field2 = XXXX Autosearch
Field3 = XXXX Autosearch


QUERYB
Search
Field1 = XXXX (No Autosearch)
Field2 = XXXX (No Autosearch)


How can i copy the Report.AutoSearchfields[n] into the search parameters for
QUERYB after the user closes the autosearch dialog.


I think it works if i define autosearch on queryb but i do not want the
extra tab on the autsearch dialog.

please help

Comments

  • edited July 2006
    Hi Steve,

    It is possible to add search criteria to a query in DADE without it being
    AutoSearch criteria. The easiest way to do this is by using the
    TdaSQLBuilder class added for RB 9 or later. You can use the
    TdaSQLBuilder.SearchCriteria.Add routine to add an ordinary search condition
    to a given query. Take a look at the TdaSQLBuilder and TdaSQLCriteriaList
    topics in the RBuilder help for more information.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2006
    Excuse my Ignorance but none of the below give me a green icon.



    lSQLBuilder := TdaSQLBuilder.Create(Report.DataPipeline);

    or

    lSQLBuilder := TdaSQLBuilder.Create(Report.DataPipeline.LOT2);

    or

    lSQLBuilder := TdaSQLBuilder.Create(LOT2);



    The query i want to change set search fields on is called LOT2 and shows in
    the data tab. Thanks



  • edited July 2006
    Sorry i didnt mention, this report is in the "End user configuration", to be
    run from the reportbrowser.


  • edited July 2006
    Hi Steve,

    I found an example of what you are trying to do that another engineer here
    created.

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


    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.