Topic: Show records by date

Hi,

Trying to find a way to view records from today's date onward.   

Like [invoiceDate >= Today] in the Query forms Filter field.

Anyone have a solution for this

Regards

Hedan

2 (edited by derek 2021-06-19 15:41:12)

Re: Show records by date

Hi Hedan,
If I understand your question correctly, then
1.  define the datetimepicker field you want to use in the filter as your invoice date
2.  set the 'filter to' property to  >=
3.  set 'checked' property  = true
(see attached screenshot).
When you set the 'checked' property  = true, it always uses the current run date (today) and automatically adjusts itself with each new day.
You'll probably want a second date filter to re-display ALL invoice dates.  Just do the same but set  the second date filter 'checked' = false .
Anything not clear just shout.
Derek.

Post's attachments

Attachment icon hedan date.zip 553.63 kb, 250 downloads since 2021-06-19 

Re: Show records by date

Thank you Derek...

Worked fine, but i changed my mind and i think it became even clearer by showing upcoming records in a different color in the TableGrid

ToD := DateTimeToStr(Date);
  c := Fakturor.TableGrid1.RowCount - 1;
  for i := 0 to c do
   begin
    If Fakturor.TableGrid1.Cells[3,i] >= Tod Then
    Begin
    Fakturor.TableGrid1.Cell[0,i].TextColor := clYellow;
    Fakturor.TableGrid1.Cell[1,i].TextColor := clYellow;
    Fakturor.TableGrid1.Cell[2,i].TextColor := clYellow;
    Fakturor.TableGrid1.Cell[3,i].TextColor := clYellow;
    End;

Hedan