Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Help with printing variables in a forumula Post Reply Post New Topic
Author Message
flanman
Senior Member
Senior Member
Avatar

Joined: 04 Nov 2009
Online Status: Offline
Posts: 123
Quote flanman Replybullet Topic: Help with printing variables in a forumula
     Posted: 30 Nov 2009 at 9:38am
How do I print a variable value within a formula?  I have the following formula in my report.

**
//Create Variable for max number of spanish reps
Numbervar MaxReps;
NumberVar CurrentStaffed;




//Assigning value to Max Reps based on local staffing guidelines.
//If the guidlines change just adjust the "MaxReps = x" value for the day.
// Sunday
If DayOfWeek ({DriveMaster.FromDateTime}) = 1 Then
MaxReps = 10
Else
//Monday
If DayOfWeek ({DriveMaster.FromDateTime}) = 2 Then
MaxReps = 10
Else
//Tuesday
If DayOfWeek ({DriveMaster.FromDateTime}) = 3 Then
MaxReps = 16
Else
//Wednesday
If DayOfWeek ({DriveMaster.FromDateTime}) = 4 Then
MaxReps = 16
Else
//Thursday
If DayOfWeek ({DriveMaster.FromDateTime}) = 5 Then
MaxReps = 16
Else
//Friday
If DayOfWeek ({DriveMaster.FromDateTime}) = 6 Then
MaxReps = 6
Else
//Saturday
If DayOfWeek ({DriveMaster.FromDateTime}) = 7 Then
MaxReps = 6

// Figure out if the total schedules reps for a day is over
//the max allowed for that day based on the weekday.

CurrentStaffed = MaxReps - Sum ({CertificationDetail.StaffRequired}, {DriveMaster.FromDateTime}, "daily")

***

From this formula how do I get the "CurrentStaffed" value to print on my report?

Thanks,
Flanman


IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 30 Nov 2009 at 10:23am
Do the end of the formula like this:
 
..... {DriveMaster.FromDateTime}, "daily");
 
CurrentStaffed;
 
That will display in the field on the report the value that CurrentStaffed is.
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