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

Trying to filter a template query. Is it possible?

edited February 2003 in General
Hi!

I have used the SetSQLObject(aReport: TppReport) and GetSQLObject(aReport:
TppReport) functions you gave me for getting or changing the SQL database of
a saved rtm template.

Now I'm investigating if is it possible to add a filter to de sql query
result of that template.
With the following line, I can see the "sql query text":

[...]
TdaQueryDataView(lDataView).SQL.SQLText.Text
[...]

and it shows successfully, but...
Is it possible to apply a filter to this query?

For example:
If the "sql query text" contains the "Sale_Date" field, I would like to
filter the result.
Something like this:

if pos('Sale_Date',TdaQueryDataView(lDataView).SQL.SQLText.Text) <> 0 then
TdaQueryDataView(lDataView).SQL.Filter := "Sale_Date =
.................'

Is it possible?
Thanks!

Comments

  • edited February 2003
    This is a question, being discussed in various threads already.

    e.g.
    instead

    HTH
    Bernd

  • edited February 2003

    DADE is designed to support autosearch criteria, which are used to
    dynamically generate the SQL Where clause. There is no built-in support for
    filtering a dataset.

    Top pursue this you would need to create your own custom dataview classes.
    See daADO.pas and the DADE thread of the Tech Tips newsgroup for more
    informatino. There are also classes in RBuilder\Demos\EndUser\Custom
    DataViews.


    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

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