Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports 4.5 - Please how used Between in this script ...

Status
Not open for further replies.

maniakul

Programmer
Oct 18, 2005
8
RO
Please how use BETWEEN in this script ?
1. DTPicker1 = from data
2. DTPicker2 = to data
/////////
procedure TForm3.Button3Click(Sender: TObject);
begin
With CRP1 do
begin connect := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbase.mdb;Persist Security Info=False;Pwd='+ 'system';
SelectionFormula = '{Total1.Data} BETWEEN'+ DTPicker1 to DTPicker2
ReportFileName := 'RPT.RPT';
WindowState := crptMaximized;
WindowTitle := 'REPORT';
Action := 1;
end;
end;
/////
Many thanks!!!
 
I haven't got a sample with Between but you could use something like this;

"{Total1.Data} >= Date (" & Format(DTPicker1.value, "yyyy,mm,dd") & ") and" _
& " {Total1.Data}<= Date (" & Format(DTPicker2.value, "yyyy,mm,dd") & "))"



Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top