Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about a Cross Tab

Status
Not open for further replies.

BradCustom

IS-IT--Management
Oct 5, 2007
296
US
I'm using Crystal 2011 and the report I'm writing is going to show the number of pieces shipped for a given part number. I wanted to insert a Cross Tab in the footer to show the part number and the total quantity shipped for that month. It works fine but the issue I have is the number of different part numbers shipped each month is pretty long so, I end up with a very long list at the end of each month. What I was wondering is can the Cross Tab be limited to the number of part numbers displayed? If yes then I could create a few Cross Tab's, one for each range. Something like 1 to 2, 3 to 4 and so on.

Thanks for all your help!
 
One approach would be to take advantage of Specified Order and Discard All Others which cam be used in a crosstab.
Lets say you wanted 4 cross tabs and weren't too fussy about the cross tabs having the same number of rows you could use the following technique.

Create four idential crosstabs with the part number on the row field and then your summary field.
(Copy and paste your first crosstab three times to save time.)
These crosstabs would be in the Group footer/header for each month.

Create four formulas.

So one first formula would look something like this:
if {table.partnumberfield} in 1 to 5 then 'include' else 'exclude'

Next formula would be
if {table.partnumberfield} in 6 to 10 then 'include' else 'exclude'

etc.

You will add the first formula to the first cross tab as the main row field (so you will need to move it up and use specified order choosing Include from the drop down. On the others tab you would choose Discard all others.
You need to then play around with suppressing and formatting to make it look presentable.

If there aren't any part numbers for 6 to 10 for Feb you will have a missing crosstab so this method can lead to ugly results.



Gordon BOCP
Crystalize
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top