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.
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);
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.)
Comments
Check out the autosearch demos located in the \RBuilder\Demos\5.
AutoSearch\... directory. Especially see the "AutoSearch Field to Table
Filter" demo.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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.)
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com