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

Pulling information from autosearchcriteria

edited November 2007 in RAP
Good morning,

Ik need to pull the two Dates entered in the autosearchcriteria.
I found some code in teh newsgroups but it does not seem to work:
Var
DateGrab: TppAutoSearchField;
begin
DateGrab:= Report.AutoSearchCriteriaByName('VerkoopKoppen',
'VK_Documentdatum');
Variable4.Value := DateGrab.Values[0];
Variable5.Value := DateGrab.Values[1];
end;
The first date is given, but the second variable stays blank, Although a
VK_Documentdatum>= and a VK_Documentdatum<= is entered.
Can someone please tell me what to do?

Thanks,
Rob Nowee
FSP

Comments

  • edited November 2007
    Hi Rob,

    The Values property only gives multiple values when using the Between or
    InList operators. This is not the case in your situation because you are
    essentially creating two separate autosearch fields based on the same field.
    One way around this is to access the autosearch fields directly.

    Var
    DateGrab: TppAutoSearchField;
    DateGrab1: TppAutoSearchField;
    begin
    DateGrab := Report.AutoSearchFields[0];
    DateGrab1 := Report.AutoSearchFields[1];

    Label1.Caption := DateGrab.SearchExpression;
    Label2.Caption := DateGrab1.SearchExpression;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.