| Author |
Message |
GrisCorp
Groupie
Joined: 08 Mar 2013
Online Status: Offline
Posts: 64
|

Topic: Sort by data from different columns Posted: 30 Oct 2015 at 7:31am |
|
I am using Crystal Reports 2011.
I have a database table that
contains all the components used and the quantities used to create a
finished part. Each component and its corresponding quantity is in a
different column based on type (for example: PolyType, PolyTypeAmt,
IsoType, IsoTypeAmt, CatalystType, CatalystTypeAmt, ColorType,
ColorTypeAmt, etc.)
I need to create a report that extracts each component and its quantity
from the table then sorts all the components alphabetically while keeping their quantity lined up.
Can this be accomplished?
|
IP Logged |
|
|
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|

Posted: 30 Oct 2015 at 8:32am |
|
Yes, but not by joining tables together in the report. How are your SQL Skills? You'll need to write a Command, which is a SQL Select statement, that will do a union query pulling the finished part information, one type of component and its corresponding quantity in each select of the union.
There are a few things to be aware of when using commands to get them to work correctly, though. See my blog post for more information: http://scn.sap.com/community/crystal-reports/blog/2015/04/01/best-practices-when-using-commands-with-crystal-reports
-Dell
|
|
|
IP Logged |
|
GrisCorp
Groupie
Joined: 08 Mar 2013
Online Status: Offline
Posts: 64
|

Posted: 02 Nov 2015 at 3:13am |
|
Hilfy,
Thank you. I will try this. If I am unsuccessful, Production will just live with the components being listed in what ever order I place their fields on the report. There are not that many components to each part so it's not like there will be a large list they will have to look through.
|
IP Logged |
|
|
|