Print Page | Close Window

Grouping Problem for newbie. Please help!!!

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=6769
Printed Date: 19 Apr 2025 at 9:22pm


Topic: Grouping Problem for newbie. Please help!!!
Posted By: rdseal
Subject: Grouping Problem for newbie. Please help!!!
Date Posted: 18 Jun 2009 at 3:45am
Hi all,
First I want to say thanks to all contributors as I have been using this forum as a first resort for help if I was stack with my new reports and I was able to find my answers without any problem up until now... Please help!
My current sample report:

ConsignREF        lines       Supplier             Source
(String)                    items              Date           .
HD111984 ANT     25     50     FGS    18/03/09    OS
HD111984 ANT1    51     175   SID    14/03/09    OW
HE101526 M TR4   1      1      COS    10/02/09    EC
HE101526 TR2A    1      3        DIJ    02/02/09    OW
HE101526 TR1     16     20     AE CO   10/03/09    OW
HE101526 TR2     3      4       AE CO   10/03/09    OW
HE101836 FGTR    4      5       BINV   05/02/09    OW
HE102549 OIS4    1      9       GHYG   12/03/09    TR

We receiving orders for our clients from various suppliers consolidate them and send them out as one order.
Our main System allocates order number (AB123456) where AB- type of order and 123456 numeric no. unique for this order.
Our Stock Control System is independent from the main System. I am forced to use (AB123456 XXXXXX) as Consignment Ref. where XXXXXX is diffrent every time we receive an editional stock for the existing order as system will not alow me to use same AB123456 again.
Please note that ConsignREF in Stock Controll System is (string).
My question is how can I Groupe ConsignRef so all entries for order that containing same 123456 are consolidated and showing on one page so it makes easier to process complete order?
I guess I will have to use a formula as Groupe sort order???



If you need more info please ask.

Many thanks in advance.

-------------
read read read



Replies:
Posted By: rdseal
Date Posted: 18 Jun 2009 at 5:30am
Forgot to say I am using Crystal Reports 2008.

Thanks

-------------
read read read


Posted By: lockwelle
Date Posted: 18 Jun 2009 at 7:02am
could use formulas and group on them.  if there is always a space or the first part is of uniform length.
for the consignment group
mid({table.consignRef}, 10)
 
for the partnumber group
mid({table.consignRef},3,6)
 
now all of the consignment will be grouped together along with all the part numbers.
 
HTH


Posted By: JohnT
Date Posted: 18 Jun 2009 at 7:05am
If I understand correctly, your consignREF field is xx999999 and you want to sort on the last 6 characters regardless of the first 2 alpha characters.  Is that correct ?  If so, you can create a formula that strips off the last 6 characters and use the formula in your group.  The formula could be:
 
Mid(ConsignREF,3,6)


Posted By: DBlank
Date Posted: 18 Jun 2009 at 7:13am

NOt sure exactly what you want but here are a few options for some formulas that may make it groupable for you:

left({table.consignref},8)
or
left({table.consignref},instr({table.consignref}," "))
or
mid({table.consignref},3,6)
or
mid({table.consignref},3,instr({table.consignref}," ")-3)
 


Posted By: rdseal
Date Posted: 18 Jun 2009 at 7:27am
Hi and thanks for the reply.
I am trying to use
mid({Intake1.ConsignRef},3,6)
but I am keep getting an error "A constant expressions is required here" when I am trying to save it in Formula Workshop - Group Sort Order Formula?

-------------
read read read


Posted By: rdseal
Date Posted: 18 Jun 2009 at 7:29am
Tabel called
Intake1
Line called
ConsignRef

Thanks

-------------
read read read


Posted By: DBlank
Date Posted: 18 Jun 2009 at 7:31am

At the risk of you getting 3 more answers here... Create a formula field with the

mid({Intake1.ConsignRef},3,6)
and then sort (or group) on that formula field.


Posted By: rdseal
Date Posted: 18 Jun 2009 at 7:38am
Originally posted by DBlank

At the risk of you getting 3 more answers here... Create a formula field with the


mid({Intake1.ConsignRef},3,6)

and then sort (or group) on that formula field.

I am keep getting an error "A constant expressions is required here" ???

-------------
read read read


Posted By: DBlank
Date Posted: 18 Jun 2009 at 7:43am
So you are in the Formula WorkShop, you created a New Formula Field Called something like "Sort Field" and then you put:
mid({Intake1.ConsignRef},3,6)
 
and as crystal syntax and you get this error?


Posted By: rdseal
Date Posted: 18 Jun 2009 at 7:48am
Originally posted by DBlank

So you are in the Formula WorkShop, you created a New Formula Field Called something like "Sort Field" and then you put:
mid({Intake1.ConsignRef},3,6)

 

and as crystal syntax and you get this error?

NO because I was trying to use this formula in Group Expert.
Now Created NEW Formula Field and it WORKED!!! THANKS.

-------------
read read read


Posted By: lockwelle
Date Posted: 18 Jun 2009 at 10:01am
isn't this the part number, not the consignment number...just wondering. 


Posted By: rdseal
Date Posted: 19 Jun 2009 at 12:40am
no, its a Consignment no.
AB123456
where
A- Office Location
B- Order Type (E-export, D-domestic itc.)
and 123456- order number.



-------------
read read read



Print Page | Close Window