Home General

Subreport & AutoSearch

edited October 2001 in General
Hi,

I have a subreport that has a simple query to count records. If I load and
run the subreport alone, it filters according to the autosearch criteria. I
have an OnGetAutoSearchValues function in my program to set the AutoSearch
criteria on the fly.

But when I load this report into another report as a subreport, the same
filtering does not occur and I get all records instead of a count of just
the ones matching the autosearch values.

Even after loading the subreport into my main report, I checked the pipeline
on the data tab and it does have the search fields set to AutoSearch.

Why would the same report recognize the autosearch criteria when run alone,
but not when run as a subreport within another report?

Thanks,
Vinnie Murdico

Comments

  • edited October 2001
    A subreport doesn't support autosearch, only the main report. Use the main
    report's OnGetAutoSearchValues event to filter the data.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited October 2001
    > A subreport doesn't support autosearch, only the main report. Use the main

    Thanks - but what if the query on the subreport is not linked to the query
    on the main report? Is linking it to the main report the only way to get it
    to filter data? If not, how would I use the main report to filter data for
    the subreport?

    Thanks again for all your time and assistance,
    -- Vinnie Murdico
This discussion has been closed.