Print Page | Close Window

Analyze data in group data

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22182
Printed Date: 02 May 2024 at 7:10am


Topic: Analyze data in group data
Posted By: joeg1962
Subject: Analyze data in group data
Date Posted: 20 Dec 2016 at 8:55am
Perhaps simplest to understand with some sample info.

Doctor begins office visit with a time-stamp 8am on a record. Store to Var1
Read many more also storing to Var1
Doctor makes last entry at 8:15 also storing to Var1

At the group level, I can determine the min as 8:00 and max as 8:15
Therefore at group I can know time elapsed was 0:15

Do this for all the office visits, creating printout like
Doc1 Pt1  8:00 8:15 0:15
Doc1 Pt2  8:20 8:25 0:05
Doc1 Pt3  8:25 8:55 0:30

Because I have already done some 'math' on the data, that seems to prevent me from doing math on the group level math
So, do I try one of these or something else?
(a) Create some running-total variables to know Doc1 saw 3 pts for 50 minutes (and 16.7 minute average).
(b) Save this file to Excel and then write a 2nd CR to ODBC connect and read all the lines in this 2nd report create the summary/table.



Replies:
Posted By: kevlray
Date Posted: 20 Dec 2016 at 10:45am
You be able to do some manual running totals if nothing else.  In a formula that would be reset at the group header for the doctor, you might have this formula in a group footer (?)

shared numbervar timetotal;
timetotal := timetotal + max({time}) - min({time})

then have a running total that just counts the visits and is reset at a group.  Also you could have a formula for the average (Group Footer?).

Shared numbervar timetotal;
timetotal/{#countofvisits)*100

These are just examples to hopefully get you pointed in the right direction.



Print Page | Close Window