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

Can i get to the created sql in a search panel?

edited October 2007 in End User
Hi

Is it possible to get/retrieve to the sql in a searhpanel class?

Eric

Comments

  • edited October 2007

    Try something like this...

    uses
    ppAsField, daQueryDataview, daSQL;

    var
    lSQL: TdaSQL;

    if myAutoSearchField.DataView is TdaQueryDataView then
    lSQL := TdaQueryDataView(myAutoSearchField.DataView).SQL




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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2007
    Hi

    The sql does not jet contain a where clause based on the searchfield.
    Can i get to the searchfield conditions there where i decided to use an 'OR'
    between 2 searchfields?

    Eric


  • edited October 2007

    The TdaSQL object contains an object based description that is used to
    generate a SQL statement. You cannot check the SQLText, because it will not
    be generated until after the autosearch dialog is displayed. Instead you
    need to iterate over the TdSQL.Criteria[ ] items or use TdaSQLBuilder to do
    it.



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

    Best regards,

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