Changeing the search criteria within a report.
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.
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.
This discussion has been closed.
Comments
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
http://www.digital-metaphors.com
info@digital-metaphors.com