Instead of using a command and a table, you could try doing something like this with the SQL:
Select c.risk, c.claim, rh.effective_date
from Claim as c
left join Reserve_History as rh
on rh.risk = c.risk
and rh.claim = c.claim
where rh.effective_date =
(select max(rh1.effective_date)
from Reserver_History as rh1
where rh1.risk = c.risk
and rh1.claim = c.claim
and rh1.effective_date <= :effective_date)
:effective_date is a parameter to the SQL. Brian, do you know the correct syntax for settin that up in a command so that it can be set from a parameter in the Crystal Report?
Edited by hilfy - 06 Apr 2007 at 12:47pm