Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Using an Average forumla in Crosstabs... Post Reply Post New Topic
Author Message
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Topic: Using an Average forumla in Crosstabs...
     Posted: 11 Mar 2009 at 4:44pm

Hi again!

Still using CRXI.
I'm writing this report basically to see the average persons seen per day every month per department.
 
My boss wants it done using crosstab (after i already had completed it and looks awesome normally... *sigh*)
 
My issue is, i'm trying to use a formula field to take the average. the same formula field that works great in my actual report.
 
But whenever i try to put it into the crosstab rpt it just spits it out...
what i'm basically trying to do is...
 
                      January/2005 | Feb /2005 | ect. (all the way up to 2009 not where my issue's accuring)
department name:  {@avg}| {@avg}     | ect.
 
The {@avg} is the avg of persons seen per day for that month.
 
if anyone has any ideas, please help! Ouch
 
Thanks!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Mar 2009 at 5:26pm
Hey Takesen,
I assume you have a colum for Department and rows for each day.
CAn you just use the Crosstab grouping on the day field set as an Average to get what you need?
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 11 Mar 2009 at 8:36pm
I've tried.
what i'm trying to get is basically.

the number of people they served in the given month...
devided by
a count of the number of days the department served for that month

but when i try to use the formula i used for the report itself before i made it into a crosstab rpt it wont work... :(
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Mar 2009 at 8:42pm
That's a nasty one for a crosstab. I'll have to look at that in the am when I have access to my crystal and see if I can come up with a solution.
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 11 Mar 2009 at 8:45pm
yea =(
it's driving me nuts.
Thank you so much for the help!


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Mar 2009 at 7:56am
Hey Takesen.
I have been running through different options and can't come up with anything that would give you this exact output. Maybe if you did all the calculations in a stored procedure or view you could use that output data and display it as needed but even with that idea I have not totally thought through a valid process.
The best I have come up with would be to present the 2 values (total served for the month and total number of days of service) in a single cell. This would get you close and not sure if it would be accepted by the client. Let me know if you want that process.
IP IP Logged
Cordellv
Newbie
Newbie
Avatar

Joined: 14 Jan 2009
Location: United States
Online Status: Offline
Posts: 35
Quote Cordellv Replybullet Posted: 12 Mar 2009 at 1:52pm
I am just trying to learn Cross-tabs myself so I am not the one to answer this question but at least I just read the book a couple of times.  It sounds to me like you are describing almost the same requirements as outlined in Tutorial 13-6 in the book on page 504.  You are just wanting to do an average of the months visits not a sum of date differences.... ????   I may be totally off base here.  Cordell
Making Things Better One Day At A time
IP IP Logged
Takesen
Senior Member
Senior Member


Joined: 29 Dec 2008
Location: United States
Online Status: Offline
Posts: 143
Quote Takesen Replybullet Posted: 12 Mar 2009 at 4:45pm
I actually got today off,
I'll be back in the office tomorrow morning.
I'll take another look at it, and check out the Tutorial you suggested
out of the book when i get to my book on my desk.


Thanks guys, i'll letcha know soon
IP IP Logged
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