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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group like item ids 1

Status
Not open for further replies.

blueboyz

Technical User
Sep 13, 2005
210
US
I am creating a report in Crystal Reports 2008.

I need to rollup the freight for an item into the item's selling price.

For example, if notebooks sell for $3.00/each, and freight is $1.00, I need to show $4.00 for the selling price for notebooks.

The user enters the item sold and the freight on two rows:

Line #1: qty - 3, item - notebook, unit price - 3.00, amount - 9.00
Line #2: qty - 1, item - notebook freight, unit price - 1.00, amount - 1.00

Total Invoice: $10.00

The crystal report should show:
Line #1: qty 3, item - notebook, amount - 10.00

Total Invoice: $10.00

If the item id for notebook is "notebook" and the item id for freight is "f-notebook", is there a way I can group on "notebook" and "f-notebook" so I can hide the details and only show the subtotals?

 
You can create a formula if item always start with f-

@id

If itemfield like "f-*" then trim(mid(itemfield, 3, 50)) else itemfield

The 50 should be limited to the max size of any item name.

Group on this formula

Ian


 
Thank you Ian. That formula worked perfectly!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top