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

Auto Search Criteria - Timestamp fields

edited February 2009 in End User
Hello

Delphi 2007 and RB11.02 Enterprise

This is a report previously working in RB9 but having problems in RB11

I have a report which looks at stock movements between two timestamps.
Using Rap i preset the values for the auto search criteria as follows.

procedure ReportBeforeAutoSearchDialogCreate;
begin
Report.AutoSearchFields[0].SearchExpression :=
DateTimeToStr(CurrentDateTime - 28);
Report.AutoSearchFields[1].SearchExpression :=
DateTimeToStr(CurrentDateTime);

end;


This all worked fine in RB9 and the correct data would be found. In RB11 no
data is being found. I can change the auto search criteria values but this
makes no difference. If I remove the RAP coding then I am prompted with
date pickers and everything works ok but I am limited to dates and not
timestamps (which I need).

Regards

Tim Murfitt

Comments

  • edited February 2009
    Hi Tim,

    In my testing with a simple dataset identical code to yours below, I was
    unable to recreate the behavior. The ouput of the report matched the search
    criteria set in the BeforeAutoSearchDialogCreate event in RAP.

    If possible, please send a simple example that I can run on my machine in
    .zip format to support@digital-metaphors.com and I'll take a look at it for
    you.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2009
    Hi Nico

    I will try to put a simple example together and send it to you.

    I know that the problem is definitely related to the new date time picker.
    If i hardcode the timestamp values into the data without autosearch then
    there is no problem. Also if run the identical report with an old copy of
    RB9 then there is no problem. If the new date picker is used again no
    problem but I have lost the required functionality of being able to set the
    time as well.

    I am wondering if it is anything to do with the regional settings and the
    date time picker. In the UK the short date time format is dd/MM/yy
    HH:mm:ss. The date time picker seems to be limited to hours 1 to 12. I can
    not for example set a time of 0:01 or 13:30.

    Regards

    Tim Murfitt



This discussion has been closed.