How to use a setfilter to get maturity for today and above today

Hi Team,

I am working on a report that will show the investment with maturity of today and/ or the investment with maturity of high date.

Where “Short Term Investment” is the table

The below code was written on OnPreReport()

IF "Short Term Investment".GETFILTER("Maturity Date") = '' THEN BEGIN
  //"Short Term Investment".SETRANGE("Maturity Date",0D,TODAY)
   "Short Term Investment".SETFILTER("Maturity Date",'%1|>=%2',0D,TODAY)
  END ELSE
  DateFilter := "Short Term Investment".GETFILTER("Maturity Date");

Its written on OnPreDataItem()

“Short Term Investment”.SETFILTER(“Maturity Date”,DateFilter);

But am getting the investment that have matured from the start date to end date.

Thanks.

I guess that you should not be using the | which means OR. Try with & = AND instead.

I write this as you said “Short Term Investment”.SETFILTER(“Maturity Date”,’%1&>=%2’,0D,TODAY) but it giving me the investment that have matured before today and above. I want it to be showing investment that will matured date and above. Thanks

The report is run when the maturity date is empty. Thanks

Your filter makes no sense at all. Could you give an example of date interval you want to do…

is it BLANK AND/OR >=today ?

Lol @ Palle.

The Filter should work on BLANK , AND >= TODAY

I want the report run for maturity date of today and above today. When the maturity date is empty?

Reportu.PNG

I run the report without filter by maturity date which I wanted it to give me the Bill Series Code that will maturity today and above today. Above today is working fine but the report is given all information in the table. The mark blue should’nt show because the date is less than today.

This is what I used: “Short Term Investment”.SETFILTER(“Maturity Date”,’%1&>=%2’,0D,TODAY);

Thanks.