I have a field, {lab_name}. My formula, @HDL, looks like this:
if {LAB_NAME} = "HDL CHOL" and
(not isnull({LAB_RESULT})) and
{D_LAB_DRAWN} in (currentdate - 424) to CurrentDate
then {LAB_RESULT};
This displays the lab result for HDL Chol. I also have one exactly the same, @hdl date, displaying the date the lab was drawn. This is great, but I get all labs in the last 424 days. I want the last one. So I put the formula in the details and inserted a summary for max of @hdl and max of @hdl date. Doesn't work if I have
hdl 8 on 7/20/05
hdl 7 on 10/8/05
What I get is 8 on 10/8/05 being they are both the max. How do I get the max date but associated lab value? Thanks,Wendi
if {LAB_NAME} = "HDL CHOL" and
(not isnull({LAB_RESULT})) and
{D_LAB_DRAWN} in (currentdate - 424) to CurrentDate
then {LAB_RESULT};
This displays the lab result for HDL Chol. I also have one exactly the same, @hdl date, displaying the date the lab was drawn. This is great, but I get all labs in the last 424 days. I want the last one. So I put the formula in the details and inserted a summary for max of @hdl and max of @hdl date. Doesn't work if I have
hdl 8 on 7/20/05
hdl 7 on 10/8/05
What I get is 8 on 10/8/05 being they are both the max. How do I get the max date but associated lab value? Thanks,Wendi