• newsgroup_archive 16 years, 5 months ago

    Hi, how do I apply a filter at run time?

  • newsgroup_archive 16 years, 5 months ago

    Since it appears that absolutely nobody from Component One reads or responds
    to this Newsgroup, I'll go ahead and respond to your question...but I'm just
    another customer trying to get help with this otherwise excellent product.

    If I understand your question correctly, there are a couple of different
    ways of applying "filters" at runtime.

    You can set the RecordSource property to a SQL SELECT statement to
    dynamically build the source for the report...you must do this in the OnOpen

    Or, if your recordsource includes a WHERE clause that expects a parameter,
    such as in WHERE Customer = ?, then you can set the value of that prompt by
    using the QueryParamVal collection like this:

    vsreport1.QueryParamVal(1) = "whatever"

    You can pass in as many prompts as you need, but I find it easier to build
    my SQL within my code and simply set the RecordSource property...probably
    some performance improvements that way as well.

    wrote in message news:3a9b52fb@news.apexsc.com...
    > Hi, how do I apply a filter at run time?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.


Have questions? Use our Customer Portal at