Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: display data from different customers in same grou Post Reply Post New Topic
Author Message
Robotacha
Groupie
Groupie
Avatar

Joined: 11 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 97
Quote Robotacha Replybullet Topic: display data from different customers in same grou
     Posted: 29 Nov 2010 at 3:21am
hello,
 
I hope someone can help.
 
Let me quickly explain my report.
 
I have a {customer.code} of 3OCEAN
 
this customer also has another account 8ZZOCEAN which is an account we send stock into until he sells it.
 
I want to run a report, that shows WHAT stock we have sent him on the 8ZZOCEAN account, and also shows what matching stock he has sold on the 3OCEAN account.
 
ie;
 
group 1 {customer.code}
group 2 {customer.Stock}
 
account                units                    feb 10          mar 10
8ZZOCEAN                              
1556513PAB       6 units                   2 units         2 units
2345561BED       2 units                   0 units         2 units
1856454PAV       4 units                   2 units         1 unit
 
 
basically, The blue units are the sales on the 3OCEAN account, and the red data is from the 8ZZOCEAN account...
 
at the moment, I am getting no DATA where i want the blue units to show, and Im guessing this is because it is on the 8ZZOCEAN GROUP LEVEL.
 
 
does anyone know a way I can get my data to display like this?
 
 
I have not used the select expert to filter out the desired accounts, I have created a formula:
 
IF{CUSTOMER.CODE} startswith "8ZZ" then {CUSTOMER.CODE}
 
then grouped by this formula.
 
 
Please ask if you need any information or if I have not explained Clearly.
 
 
In a nutshell, I want data from 2 seperate accounts to be displayed on the same group level line.
 
Regards
 
 
Michael.
 
 
PLEASE HELP :D
 
Regards,

Michael Jones
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 Nov 2010 at 3:35am
is {Customer.Code} the same for both accounts?  It doesn't look like it.
 
I don't know the structure of the code, but given the example, I would modify the formula to:
 
IF{CUSTOMER.CODE} startswith "8ZZ" then
"3" + mid({CUSTOMER.CODE}, 4)
 
you just have to make the values match.  If you want to do this in a more general way, it would depend on how Code is 'created'...really how many digits are before the word. If it is always 1 digit then you could do something like:
 
IF{CUSTOMER.CODE} startswith "8ZZ" then
 mid({CUSTOMER.CODE}, 4)
ELSE
 mid({CUSTOMER.CODE}, 2)
 
HTH
IP IP Logged
Robotacha
Groupie
Groupie
Avatar

Joined: 11 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 97
Quote Robotacha Replybullet Posted: 29 Nov 2010 at 3:47am
Hi,
 
Our table is composed like this:
 
CUSTOMER:

CODE             STOCK       QTY        PRICE   
8zzocean
3ocean
3*****
3*****
8zz***
Regards,

Michael Jones
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 Nov 2010 at 5:13am
if you want to group them all together, like for Ocean, the second formula should work as will change the grouping to 'Ocean'.
 
The goal, at least of the formula, is to create just 1 group from multiple groups.
 
HTH
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