Thanks Abhilash.
I tried this, had to use Max instead of maximum, and get the following errors when attempting to refresh data. "Failed to retrieve data from the database. Details: ORA-00934: group function is not allowed here" and "Details: Fail to execute SQL statement. OCI call:OCIStmtExecute [Database Vendor Code: 394]"
I googled the error code and found:
ORA-00934 group function is not allowed here
Cause: One of the group functions, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, was used in a WHERE or GROUP BY clause.
Action: Remove the group function from the WHERE or GROUP BY clause. The desired result may be achieved by including the function in a subquery or HAVING clause.
Here is my formula in record selection:
(year({ARRSTBND.BND_ARREST_DT}) = {?ReceivedYear}) and
(month({ARRSTBND.BND_ARREST_DT}) = {?ReceivedMonth}) and
({CASE.OFIC_CD} = uppercase({?OfficeCode})) and
{CASE.STAT_CD} = {?CaseStatus} and
{PTY.PTY_CD} in ["DFNDT"] and
{%Maxseq}={BONDSTAT.BND_STAT_SEQ}
Here is ny SQL expression:
Max("BONDSTAT"."BND_STAT_SEQ")