Help: records grouping from different fields
Hi guys, need urgent help. Any workaround to solve this following scenario n display it in crystal report?
status = IN
POD inches amount => based on POD ( port of destination )
USA 10" 30
USA 20" 5
SIN 10" 10
SIN 30" 10
status = OUT
POL inches amount => based on POL ( port of loading )
USA 8" 5
USA 30" 8
SIN 15" 10
SIN 10" 20
REPORT OUTPUT:
LOCATION = USA
inches IN OUT
8" 0 5
10" 30 0
15" 0 0
20" 5 0
30" 0 8
LOCATION = SIN
inches IN OUT
8" 0 0
10" 10 20
15" 0 10
20" 0 0
30" 10 0
I only managed to pull out the total of the status, but unable to segregate according to inches. Please help me to solveor at least gimme some ideas on it. Thank you very much in advance.....
[1228 byte] By [
TommyGL] at [2008-1-7]
What i understand
You got data like this
Status Location Inch Amount
IN USA 10" 30
IN SIN 10" 10
OUT USA 8" 5
OUT SIN 15" 10
Create Group on Location
Create Group on Inch
Create 4 Formulas
Formula 1
IF Status = "IN" THEN
Amount
ELSE
0
Forumal 2
IF Status = "OUT" THEN
Amount
ELSE
0
Formula 3
SUM(Formula1, InchGroup)
Formula 4
SUM(Formula2, InchGroup)
& you can use Formula3 & Formula 4 to display IN & OUT Amount against each Inch for particular Country
Might this can solve your problem
Regards
thank you for the reply.
it will work if the location is based on 1 field, but in this case, the location is based on 2 fields: POL and POD...
status IN will based on POD, while status ON will based on POL...
any ideas on how to group this 2 fields as 1 and solve the problems above? thank you again for the assistance.
it means when POL has data then POD will not & when POD will have POL will not right ?
E.g.
POL POD Location Inch Amount
IN USA 8" 30
OUT SIN 8" 10
If yes then create one more formula & write it as
IF POL = '' THEN
POD
ELSE
POL
& then use this formula to create IN Amount & OUT Amount
May this can solve 
Thanks a lot for your reply, I think I am close, but can you explain to me how to use thsi formula?
SUM(Formula1, InchGroup)
It prompts error " Formula1 unable to summarized"
Thank you again for the help...