Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: use external database date Post Reply Post New Topic
Author Message
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Topic: use external database date
     Posted: 27 Oct 2012 at 12:57pm
I have a formula for differents team, like T10 - T20 - T30 ,etc. I using hadr code to put the number values as a %. I though to create a database as a table like   date    team  Percenrtage
  this          Sep       10        21
                  Sep       20        32
                 Sep        30        45
                 Oct        10        34
                 Oct        20        45
                 Oct        30        55
 
and replace the hard code with the information in the database. But each team has to get it own percentage number. How can I replace the hard code value? or distribute those. Maybe load it to array and then a loop in each formula or maybe create the database with different structure.
I appreciate any idea.
 
thanks
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 29 Oct 2012 at 5:36am
What is the percentage of?  In other words, how are you calculating it?
 
This should not be difficult to do in Crystal.  I would group by Date, then by Team.  Then create a formula that is the sum of whatever you need the percentage of for the team group divided by the count of the items for the team group.
 
-Dell
IP IP Logged
rlassalle
Groupie
Groupie
Avatar

Joined: 09 Aug 2012
Online Status: Offline
Posts: 57
Quote rlassalle Replybullet Posted: 30 Oct 2012 at 7:25am
Thanks for answer, but it is not the idea. I can't group them becouse they are independen values in the formulas. I have to get from the database and use each record in the team that the number belong.  I did some thing in a net of if like this;
global numbervar O_RollGoal_10per;
global numbervar S_RollGoal_10per;
 
if trim({TableOfRollGoal_.Team}) = "T10" then
   if {TableOfRollGoal_.Month} = ('9') then
        S_RollGoal_10per := {TableOfRollGoal_.Roll Goal%}
   else if {TableOfRollGoal_.Month} = ('10') then
        O_RollGoal_10per :={TableOfRollGoal_.Roll Goal%};
 
The same for each team if i do not have better idea next months I am going to add N_RollGoal_10per  fro November and go on.
 
Thanks
 
 
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