Does anyone know how to do this? I've suppressed all but the maximum date values in a group, and I want to count only the records that pertain to those dates.
I tried that, but it still counts up all of the fields- including the ones that are suppressed. I've tried working with running totals too(using MAXIMUM()), but you can use a summary or running total in a formula.
basic structure of the report-
records are selected by discharge date, so we are selecting patients that are discharged within a given date range. In this case, Jan 2006.
patient records are grouped by patient id ("patid"), so all records that are selected are contained in that group.
each patient has a number of commital_status_values (yep- its a mental institution), and an effective_date that corresponds with it. What the facility needs is the last commital_status_value- i.e. the one that was active at the time of the patients discharge. So, I suppressed the unwanted records with this suppression formula:
IF {#RTotal0} = {COMMITMENT.EFFECTIVE_DATE} THEN FALSE ELSE TRUE
Also, #Rtotal0 is comprised of the following:
Maximum of COMMITMENT.EFFECTIVE_DATE
Evaluate: for each record
Reset: On change of group PATIENT_DATA.PATID
Now, this works for suppressing the fields I need. But, I use the following to try and count a specific committal_status_value, with a maximum effective_date, and the result is always 0:
IF {#RTotal0} = {COMMITMENT.EFFECTIVE_DATE} and {COMMITMENT.COMMIT_STATUS_VALUE} = "xxxxxxxxxxxxxxxxx"
then count({TX_COMMITMENT.COMMIT_STATUS_VALUE}) else 0
stumped... I've also removed the "else 0" clause, and it had no effect.
Oh- I dont think it matters, but this is reporting from an Oracle 9i DSS, which is replicated nightly from a Caché flat file database.
Field to summarize = COMMITMENT.COMMIT_STATUS_VALUE
Type of summary = COUNT
Evaluate for: USE A FORMULA
maximum(COMMITMENT.EFFECTIVE_DATE)
Reset on: DEPENDS ON, if this count is per the patient, per date or for the whole report.
dgillz- because I'm trying to get the records corresponding with the maximum effective_date for each grouped patid, and I dont know how to do that with record selection, other than grab the maximum effective_date for the entire dataset. does that make sense?
This would return only the most recent date per patient. Then you can insert running totals that will count only the displayed values without having to specify any criteria to exclude the non-displayed values.
For the running total, you would use something like count of patient ID, evaluate using a formula:
{TX_COMMITMENT.COMMIT_STATUS_VALUE} = "your specific value"
Reset never if at the report level. At least it sounded like you wanted to count some specific value for this field, not the field itself.
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.