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!

Combining Related Codes 1

Status
Not open for further replies.

TGHaddon

IS-IT--Management
Dec 19, 2003
12
GB
I am using Crystal Reports 8.5.

I am writing reports to analyse sales of wines generally using their bin number to sort/group.

Each product has a unique first 5 digits 12345 then the next three digits are the vintage e.g. 01 and a letter/number related to the case/bottle size 1 / A.

Can anyone see a way of producing a total in a report for all the vintages of a product rather than generating a group for each. i.e. ask Crystal to select based on starting with 12345 and then getting a single figure rather than details seperately for 12345001, 12345011 and 12345021.

Hope this is sort of clear.

Tim
 
Create a formula:

left({table.prodno},5)

And group on this. Then you can insert summaries on the details.

-LB
 
Thought this would probably be fairly simple, thanks.

I now realise I forgot a potentially more complicated part.

Where products come in more than one size i.e. halves, bottles, magnums etc. then the last digit depicts this, e.g 2 for 24 halves and E for 12 halves.

Can someone offer a formula that allows me to combine all the same case size by vintage.

In other words from 12345001, 12345011, 12345002 and 12345012 I want results for 123451 and 123452.

Tim
 
If I understand you correctly, I think you could adjust the formula to:

left({table.prodno},5) + right({table.prodno},1)

Or do you mean you want to ignore the product number, and group by vintage and size? Then it would be:

right({table.prodno},3)

-LB


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top