betachristopher
Programmer
I have seen several posts similar to this, but I haven't found the solution for what I am specifically trying to do.
I have a report that lists data from patient visits. The visit name is one of the variables. Sometimes a patient repeats a visit. These are recorded as REPEAT in the {table.visit}. The client does not want to see REPEAT, they want to see the visit name that was repeated, and have another column that counts the number of times they came in for that visit. I am able to get the count with a running total, that's not a problem.
Below is the formula I have started with. The problem is when there are two consecutive REPEAT visits. If the previous record is also a REPEAT, I need it to look at the previous record to that.
IF {TABLE.VISIT} = "REPEAT" THEN PREVIOUS({TABLE.VISIT}) ELSE {TABLE.VISIT}
Any help is greatly apprecitated.
Using Crystal Reports XI with data stored on SQL server.
I have a report that lists data from patient visits. The visit name is one of the variables. Sometimes a patient repeats a visit. These are recorded as REPEAT in the {table.visit}. The client does not want to see REPEAT, they want to see the visit name that was repeated, and have another column that counts the number of times they came in for that visit. I am able to get the count with a running total, that's not a problem.
Below is the formula I have started with. The problem is when there are two consecutive REPEAT visits. If the previous record is also a REPEAT, I need it to look at the previous record to that.
IF {TABLE.VISIT} = "REPEAT" THEN PREVIOUS({TABLE.VISIT}) ELSE {TABLE.VISIT}
Any help is greatly apprecitated.
Using Crystal Reports XI with data stored on SQL server.