Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Selecting 2 of the Same Fields in one report Post Reply Post New Topic
Author Message
kevinday17
Newbie
Newbie


Joined: 15 Jun 2007
Location: United States
Online Status: Offline
Posts: 2
Quote kevinday17 Replybullet Topic: Selecting 2 of the Same Fields in one report
    Posted: 18 Jun 2007 at 10:12am
I am hoping someone can help me with an issue that I can't figure out; I'm still pretty new to CR.  I use MS Great Plains with SQL server.  Here's the situation:  It is a standard inventory status report.  I want to pull on hand quantities but they are in one field (called QTYONHND) in a Inventory Master Qty's Table.  We have 8 different "Warehouses" or LOCCODE.  Call them Wherehouse 1, 2, 3, 4, etc...
 
I need three columns, one is Item #, O/H warehouse 1, O/H warehouse 2.  The other 6 warehouses aren't factored in.
 
I currently use Select Expert to limit the entire report to Warehouse 1 (LOCCODE = 1).  Each item # comes up with a quantity O/H for location code 1.  If I don't use Select Expert, I get 8 different QTYONHND for each item #.  Basically each Item # is listed 8 times in a row (sorted by item #) and each shows QTYAVAIL for each warehouse, most of which are 0 because we don't use them. 
 
I can sort of get the report near what I want by selecting "LOCCODE is like 1 or 2).  But I still get two of every item number.  I want to see it all in 1 row.
 
Example:
When I run the report with no select expert, I get for every item #:
 
Item Number          O/H             WHSE
999999                  1000              #1
999999                  200                #2
999999                  0                    #3
999999                  0                    #4
999999                  0                    #5
999999                  0                    #6
999999                  0                    #7
999999                  0                    #8
 
I want it to display
 
Item Number        O/H WH #1     O/H 2 WH #2
999999                   1000                     200     
 
Is there a select expert at the field level and not the report level?  I want to say O/H wh #1 should be QTY on HAND when LOCNCODE = #1 and  O/H 2 WH #2 should be  QTY on HAND when LOCNCODE = #2.  THis is where I'm stuck.
 
Any help would be appreciated.  It's probably that I don't know my CR/Basic syntax yet.  I jsut can't quite figure out how to go about it. 
 
Thanks in advance,
 
Kevin
 
IP IP Logged
Kevinma
Newbie
Newbie


Joined: 14 May 2007
Online Status: Offline
Posts: 6
Quote Kevinma Replybullet Posted: 18 Jul 2007 at 9:14pm
I guess you wish to create a table, vertically there are a list of items, and the columns are the number of items on hand at each of teh warehouses.
The answer is a cross tab table.  Use teh cross tab wizard and Filter out the warehouses you do not want (or build a parameter to allow flexible use of the same report).
Example of table is:
          WH1       WH2
1         123           17
123      24             1
267      12          143
346                     123
 
Hope this helps
Kevin March
IP IP Logged
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.