Skip to Content
0
Former Member
Apr 24, 2014 at 08:18 PM

How to sum columns in detail section

30 Views

Table:

Order_Id Order_Nm User_Id Dt_Create Dt_Reopen Dt_Cmplt Days_Open Days_Loc1 Days_Loc2 Cmplt_No
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1011 Gloves user1 1/12/2014 null 1/31/2014 19 13 6 1
1011 Gloves user2 1/12/2014 2/06/2014 3/31/2014 53 33 20 2

1101 Hats user1 2/12/2014 null 2/22/2014 10 10 0 1
1101 Hats user2 2/12/2014 2/23/2014 2/28/2014 5 3 2 2
1101 Hats user3 2/12/2014 3/15/2014 3/31/2014 16 13 3 3

1010 Bats user1 1/02/2014 null 1/11/2014 9 3 6 1


I have a table with above information.
So when a user runs a report for a given date range, suppose Feb 1 to Feb 28 then the orders that have been completed should be displayed in the report.
If an order is been completed more than once in a given date range then the latest complete date should display and for the days_open, days_loc1, days_loc2
the total number of days so far from the date created should display.

Crystal Report outputs:
-------------------------------

Input: Date Range: 2/1/2014 - 2/28/2014

Grp Name: User2

Order_Nm User_Id Dt_Create Dt_Cmplt Days_Open Days_Loc1 Days_Loc2
----------------------------------------------------------------------------------------------------------------------------

Hats user2 2/12/2014 2/28/2014 15 13 2

Input: Date Range: 1/1/2014 - 1/31/2014

Grp Name: User3

Order_Nm User_Id Dt_Create Dt_Cmplt Days_Open Days_Loc1 Days_Loc2
------------------------------------------------------------------------------------------------------------------------------
Hats user3 2/12/2014 3/31/2014 31 26 5

Input: Date Range: 3/1/2014 - 1/31/2014

Grp Name: User1

Order_Nm User_Id Dt_Create Dt_Cmplt Days_Open Days_Loc1 Days_Loc2
-------------------------------------------------------------------------------------------------------------------------------
Bats user1 1/2/2014 1/11/2014 9 3 6
Gloves user1 1/12/2014 1/31/2014 19 13 6

Can someone help me with how to sum these columns in details sections. How can I achieve the desired output?

Thanks in advance.

Tulasi