Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Refrencing value in record Post Reply Post New Topic
Author Message
Bmowrey
Newbie
Newbie


Joined: 10 Dec 2010
Location: United States
Online Status: Offline
Posts: 4
Quote Bmowrey Replybullet Topic: Refrencing value in record
    Posted: 10 Dec 2010 at 2:53am

I have a table that list EMS unit responses.

Each response is referenced by Incident number and each unit responding is referenced by run number, each record has response time for responding unit. Example

Incident#   Run#  Unit# Address               RespTime

123                22      A1         1212 12th              5.50

123                23      F2         1212 12th              2.50 

I want to be able to reference the shortest response time for each incident to do calculations, such as overall avg response time.

I have grouped records by Incident number and have the min response time displayed in the group header but I am unable to do calculation based off of that field. See example below.

48,204 3.45

Date                 Inc#                  Run#                TOC                 TOS                 RespTime         Unit

2010-11-30        48,204             46,316              00:04:11            00:11:03            6.87                  52        

2010-11-30        48,204             46,317              00:04:35            00:08:02            3.45                 Fx4

 

Thanks for your assistance

 

 

 

 

IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 10 Dec 2010 at 4:47am
When I created a minimum summary field based on group, I can open formula editor and find that particular field in the list of fields in the report.

I can then reference it using other formulas.


However what you want to accomplish sounds similar to
http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=11816 in the sense that you want to do a summary on an existing summary.

You can try the suggestion lockwelle posted.

Edited by Keikoku - 10 Dec 2010 at 4:50am
IP IP Logged
Bmowrey
Newbie
Newbie


Joined: 10 Dec 2010
Location: United States
Online Status: Offline
Posts: 4
Quote Bmowrey Replybullet Posted: 10 Dec 2010 at 5:21am

I created a formula field “IncRespTime”

if {@RespTime}=Minimum ({@RespTime}, {Trips.IncidentID})then Minimum ({@RespTime}, {Trips.IncidentID})else 0

I placed this field in the report, I set field to suppress if 0 which shows the correct response time for the incident.

Date                        Inc#             Run#           TOC                TOS                    RespTime      Unit         IncRespTime

2010-04-13     26,009    14,082    05:27:41   05:37:47     10.10          45

2010-04-13     26,009    14,083    05:27:56   05:35:44      7.80           Fx1          7.80

 

But when I try to get the average of that field I get an error that I cannot summarize that field.

 

I hope this makes since

IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 10 Dec 2010 at 5:50am
Maybe you can do what lockwelle suggested with the shared variable idea that will add up the values as you go and then finally manually take the average (you will have to store the number of records that you have added somehow)

Using the average function means it will go through the data again.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.