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

Changeing the search criteria within a report.

edited September 2001 in General
Using RB v5.1 (field test 1)

I am writing a report where I need to subtract 30 days from the Current
Date. I have been able to minus the 30 days from the current date but now
wish to pass it to the search criteria. I have created a variable called
newdate to hold the date.

The search wants to be something like this
select all from (table) where (tabledate) <
(newdate)

How do I modify the search criteria in the Calc section and in which
procedure.

Please provide examples.

Am I barking up the wrong tree with


Report.CreateAutoSearchCriteria(plinvoice,Idate,soLessthen,newdate,TRUE);



PS I am not using Delphi.



Thanks in advance


Antony Everington.

Comments

  • edited September 2001
    There is an event called Report.OnGetAutoSearchValues in which you can
    change the searchc criteria. Access the search criteria via RAP through the
    AutosearchCriteriaByName method of the report object. The result is a
    TppAutosearchfield object in which you can get access to the search
    expression string
    Report.AutoSearchCriteriaByName('Orders', 'Saledate').SearchExpression;


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.