Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Group footer formula in the Crosstab Summary Post Reply Post New Topic
Author Message
info12suchi
Newbie
Newbie


Joined: 16 May 2010
Online Status: Offline
Posts: 2
Quote info12suchi Replybullet Topic: Group footer formula in the Crosstab Summary
     Posted: 16 May 2010 at 1:54pm
Hi,

I have a formula in the Group footer, which calculates the total hours worked by the employees for a work date.
In report footer I have added the Cross tab to show the total hours worked by the employees for each day.
When I try to add the formula in the Cross tab summarized field. I feel the crosstab is treating the formula as a variable and just displaying the value  of the time worked for the last day.

Please help me in getting the appropriate value. 

Table name - WOMNT_LABOR

Fields in the Main report

1) WOMNT_LABOR.Work_Date
2) WOMNT_LABOR.Billing_Type
3) WOMNT_LABOR.Time(In hours)
4) WOMNT_LABOR.Name

Grouping Fields
1) WOMNT_LABOR.Work_Date
2) WOMNT_LABOR.Billing_Type(Billable/Non Billable)

Group Summary
1) Final_Time (Formula for the Sum of Hours)

Details of the formula:

Total_Mins := tonumber(sum(Split(Cstr(Time),".")[2]))
Remaining_Mins := Total_Mins mod 60
Total_Hrs := tonumber(sum(Split(Cstr(Time),".")[1]))+
((Total_Mins -Remaining_Mins)/60)

Final_Time := Tonumber(Totext(Total_Hrs,0)+"."+ Totext(Remaining_Mins,0))

The Row field in the Crosstab is WOMNT_LABOR.Work_date and Column field is Womnt_Labor.Billing_Type

The summary field i am trying to add to the cross tab is Final_Time.

Here is the data

Name    Time    Billing_Type    Work_date
Priya    1.20    Billable    5/3/2010
Anu    2.20    Not Billable    5/3/2010
Chandra    3.30    Billable    5/4/2010
Ramki    4.10    Not Billable    5/4/2010
Rochelle2.10    Billable    5/3/2010
Bob    2.20    Not Billable    5/5/2010
Michelle3.40    Billable    5/4/2010
Yolanda    4.10    Not Billable    5/3/2010
Maria    2.10    Billable    5/5/2010
Fariba    2.20    Not Billable    5/4/2010
Shreesh    3.30    Billable    5/3/2010


Expected output I need would be as follows

                   Billable        Non Billable

5/3/2010    7.00             6.30       

5/4/2010    7.10             6.30  

5/5/2010    2.10             2.20


But the Output i am getting right now is as follows

                   Billable        Non Billable

5/3/2010    2.20            2.20     

5/4/2010    2.20             2.20 

5/5/2010    2.20             2.20

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