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

Advantage data Selection

edited May 2003 in General
I am using Advantage as my tables with Delphi V. I am having trouble
selecting dates in a report with Report Writer. I am using the Standard
Edition. I cannot seem to make between date selection or date selection
with other criteria. Can anyone help.

Comments

  • edited May 2003
    Whitney,

    Check out the autosearch demos located in the \RBuilder\Demos\5.
    AutoSearch\... directory. Especially see the "AutoSearch Field to Table
    Filter" demo.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2003
    I tried this and was not successful.
  • edited May 2003
    Whitney,

    You will need to convert the autosearch field value entered by the user to
    the Advantage date format.

    ReportBuilder Professional or Enterprise contain Query tools that can do
    this for you. However, with the standard version you need to perform the
    conversion yourself.


    - convert the date string value of the auto search field to a Delphi
    TDateTime and then convert the Delphi TDateTime to the Ads format

    Example:

    var
    lsDateTime: String;
    lDateTime: TDateTime;

    begin
    lsDateTime := lAutoSearchField.Values[0];
    lDateTime := StrToDateTime(lsDateTime);

    lsAdsDateFormat := 'YYYY-MM-DD';

    lsAdsDateTime := FormatDateTime(lsDateFormat, lDateTime);


    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2003
    Thanks. Can you give me an example as to how this is done?
  • edited May 2003
    Whitney,

    Use the example code in my previous post in the OnGetAutoSearchValues event
    after you retrieve the AutoSearch values (as shown in then example located
    at \RBuilder\Demos\5. AutoSearch\1. AutoSearch Field to SQL Params.)

    --
    Best Regards,

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