Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Grouping Post Reply Post New Topic
Page  of 2 Next >>
Author Message
TanyaCVV
Newbie
Newbie
Avatar

Joined: 06 Sep 2016
Online Status: Offline
Posts: 17
Quote TanyaCVV Replybullet Topic: Grouping
    Posted: 28 Sep 2016 at 12:44am
I have a report that I send to customers which is a price list. It has columns for item #, their sku # (formula field), price, their suggested sell price (formula field) and description. I would like to group these items by the product type, the product type could be established based of a database item such as the product code (this is how we establish a grocery item from a pet item) or preferably I would like to build the grouping based on a formula that says
if the item is one of the following part #'s then put into group "Horse Products"
if the item is one of the following part #'s put into group "Pet Products" etc etc

Either way thus far I have been unable to generate any sort of proper grouping in either way, please help.
Tanya Vander Vecht
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 28 Sep 2016 at 3:55am
You should be able to generate a formula (and provided you are getting the results you need), group on that formula.  It probably be a rather tedious process if you have a lot of part numbers.  Hopefully a lot of the part numbers will be similar (i.e., all horse products start with the number 20)
IP IP Logged
TanyaCVV
Newbie
Newbie
Avatar

Joined: 06 Sep 2016
Online Status: Offline
Posts: 17
Quote TanyaCVV Replybullet Posted: 29 Sep 2016 at 8:09am
Originally posted by kevlray

You should be able to generate a formula (and provided you are getting the results you need), group on that formula.  It probably be a rather tedious process if you have a lot of part numbers.  Hopefully a lot of the part numbers will be similar (i.e., all horse products start with the number 20)


I am not sure how to build a group based on a formula though. When I go to group field and select - insert group, it gives me the option to pick only from database fields not formula fields?
Tanya Vander Vecht
IP IP Logged
TanyaCVV
Newbie
Newbie
Avatar

Joined: 06 Sep 2016
Online Status: Offline
Posts: 17
Quote TanyaCVV Replybullet Posted: 29 Sep 2016 at 8:10am
Nevermind I was able to find the formula fields.


Tanya Vander Vecht
IP IP Logged
TanyaCVV
Newbie
Newbie
Avatar

Joined: 06 Sep 2016
Online Status: Offline
Posts: 17
Quote TanyaCVV Replybullet Posted: 29 Sep 2016 at 8:16am
Ok So it kind of worked but not really. So now I have this:
Horse Products
34437360EA 700100591 BMZ 3KG Yes 30.13000 48.40
(13)
Horse Products
3555 BBD 223254 HORSE BLOCK 25KG Yes 29.76000 34.33
(13)
Horse Products
3589 HDH 507496 Apple chunks 10Kg Yes 22.26000 25.76
(13)
Horse Products
F8200355900EX20 507497 ATHLETE HORSE 20kg Yes 23.41000 26.96

As you can see what it has done is added the heading for my group above each item that fits in it but what I want is this

Horse Products
34437360EA 700100591 BMZ 3KG Yes 30.13000 48.40
(13)
3555 BBD 223254 HORSE BLOCK 25KG Yes 29.76000 34.33
(13)
3589 HDH 507496 Apple chunks 10Kg Yes 22.26000 25.76
(13)
F8200355900EX20 507497 ATHLETE HORSE 20kg Yes 23.41000 26.96
Tanya Vander Vecht
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 29 Sep 2016 at 11:38am
I am not sure how you did the formula.  But if done correctly then all the items for Horse Products should be in the one group.  One way to check is by removing the group, dropping the formula into the detail level and anything that is a horse product, the formula should return a value of 'Horse Products".
IP IP Logged
TanyaCVV
Newbie
Newbie
Avatar

Joined: 06 Sep 2016
Online Status: Offline
Posts: 17
Quote TanyaCVV Replybullet Posted: 03 Oct 2016 at 4:20am
I created a formula field this is the formula I used :
if{INVENTORY.INV_DESCRIPTION}="SIMPLIC-T PRO 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="SIMPLIC-T FIBRA 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="SIMPLICI-T ORIGINAL 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="SIMPLICI-T PRO GRAIN 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="SIMPLICI-T NATURE 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EVOLUTION MATERNITY 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EVOLUTION JUVENILE 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EVOLUTION SPORT ELITE 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EVOLUTION SENIOR 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="OMOLENE MATERNITY 300 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="OMOLENE SPORT 200 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="OMOLENE SPORT PLUS 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="OMOLENE SENIOR ACTION 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="VELOCI-T TRADITION 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="VELOCI-T MAX 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM MATERNITY XT 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM SPORT XT 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM TRIMAX 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM PRO PLUS 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM FIBRA PLUS 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM FIBRA CLASSIC 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM INTEGRI-T 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM EQUILIZER 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="EQUILIBRIUM OPTIMAL 25kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="Apple chunks 10Kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="APPLE CHUNKS - 1 kg Package"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="ATHLETE HORSE 20kg"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="HORSE BLOCK 25KG"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="BMZ 3KG"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="HORSE PLUS 3KG"
then"Horse Products" else
if{INVENTORY.INV_DESCRIPTION}="GOLDEN GROWENA 25kg"
then"Backyard Products" else
if{INVENTORY.INV_DESCRIPTION}="GOLDEN LAYENA L 25kg"
then"Backyard Products" else
if{INVENTORY.INV_DESCRIPTION}="GOLDEN LAYENA TEX 25kg"
then"Backyard Products" else
if{INVENTORY.INV_DESCRIPTION}="GOLDEN STARTENA (layers - extra small crumble) 25kg"
then"Backyard Products"


I went to group name fields, clicked insert group, and chose to group by the formula field in ascending order.
Tanya Vander Vecht
IP IP Logged
TanyaCVV
Newbie
Newbie
Avatar

Joined: 06 Sep 2016
Online Status: Offline
Posts: 17
Quote TanyaCVV Replybullet Posted: 03 Oct 2016 at 4:22am
So as you can see from my prior post its returning the right value but its heading each item instead of one group heading and then listing all items in that group under the one heading.
Tanya Vander Vecht
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 03 Oct 2016 at 5:00am
I would do it a different way.

if {INVENTORY.INV_DESCRIPTION}="SIMPLIC-T PRO 25kg" or
{INVENTORY.INV_DESCRIPTION}="SIMPLIC-T FIBRA 25kg"  or
if{INVENTORY.INV_DESCRIPTION}="SIMPLICI-T ORIGINAL 25kg" or
...
then then"Horse Products" else
if {INVENTORY.INV_DESCRIPTION}="GOLDEN GROWENA 25kg or
{INVENTORY.INV_DESCRIPTION}="GOLDEN LAYENA TEX 25kg or
{INVENTORY.INV_DESCRIPTION}="GOLDEN STARTENA (layers - extra small crumble) 25kg"
then"Backyard Products"


Probably should have another else to pick up anything you might of missed.

You probably could do the same thing (sorta) in the group expert, but it is a bit cumbersome with this many values.


IP IP Logged
TanyaCVV
Newbie
Newbie
Avatar

Joined: 06 Sep 2016
Online Status: Offline
Posts: 17
Quote TanyaCVV Replybullet Posted: 03 Oct 2016 at 5:31am
So I changed the entire formula to that format and I am still receiving the same result, the heading is just listed above all items that fit the specified criteria and are not grouped together beneath the heading.

I do not see a way to attach the report in this forum for you to see if there is a way I can that may make it easier for you.
Tanya Vander Vecht
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.