cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Maximum (orders.orders_date)

Former Member
0 Kudos
53

In my scenario, I want to get the data for the maximum (orders.orders_date).

I am using Report---->Select Expert -


> Record and then wrote the following formula

orders.orders_date = maximum ({orders.orders_date}) when I do check in the record selection formula editor it gives me this message

"This function cannot be used because it must be evaluated later"

Is there anyway so that I can get the records only for the maximum(orders.orders_date)

I appreciate your help.

Thanks,

Sukumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The problem is that CR needs to pull in the records to determine which is the maximum date. To get around this just use a little SQL Command trickery... Add this as a Command:


SELECT Max(orders_date) AS Orders_Date FROM orders

Now you have 2 options...

1) You can link the orders table to the command on orders_date = Orders_Date (INNER JOIN & Enforce both)

2) or write a formula i the Selection Expert:


{orders.orders_date} = {Command.Orders_Date}

HTH,

Jason

Former Member
0 Kudos

Thanks Jason.

Answers (0)