We have a table in Crystal that displays the lab results for patients. Sometimes certain labs are drawn and reported multiple times a day. I'd like to only have the most recent result display on my report. Is there a formula that can help me do this? Thanks!
Depending on the structure of your data, you could suppress detail-rows where Field 'X' is not equal to the Max(Field "X") on the group.
A matter of determining what defines the "most current" result and suppressing all those which do not fit the criteria.
Note: I *think* suppression is your only option, as to limit by a Maximum, the entirety of the group must be reported -- to this end, basic Totals and such may mis-report as they will still tally the supressed records. Circumvent this with contitional formulas and then summarize these Formulas.
Hope this helps, cheers!
Mike
--------------------------------------------------------------- "To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
I'm guessing there might be multiple types of tests per patient per day, so you might want to group #1 on {table.datetime} on change of day, group #2 on patient, and then group #3 on testtype.You can suppress all group headers/footers if you wish, and just display the detail record returned by the following.
This method is better than suppression in the sense that you can insert running totals on the displayed results and they will ignore the non-displayed records (which are still IN the report, though not displayed). With suppression, you would have to explicitly remove the records in an evaluation formula in the running total.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.