Record selection formular

Printed From: Crystal Reports Book — Forum Name: Technical Questions

I'm a bit of a novice with this and have read post upon post, so apologies if it's really obvious and i've posted this in the wrong place etc...

Currently my data looks like this in preview mode:

SKU | Name | Selling Price | Price Rule | Price Rule Value

001 | Football | £20           | NOW          | £20
002 | TV        | £200          | NOW          | £200
003 | Shirt      | £50             | NOW          | £50
001 | Football | £20             | RRP            | £30
002 | TV          | £200          | RRP            | £250

I want the user to be able to select several SKUs (which I have worked out on select expert), and then only show the RRP rule unless it doesn't exist and then show the NOW rule.

Ideally user selects SKU's 001, 002 & 003 and gets this back:

SKU | Name | Selling Price | Price Rule | Price Rule Value

003 | Shirt      | £50             | NOW          | £50
001 | Football | £20             | RRP            | £30
002 | TV          | £200          | RRP            | £250

Thanks in advance! I'm using Crystal reports 2013

Lawrence



if this is just about display and not calculations you can sort by SKU and Proce Rule then conditionally suppress a row using next() or previous() functions comparing the SKU and Price Rule values
maybe like this?
(Not onfirstrecord) and (previous(sku) = SKU and PriceRule = 'RRP')
The prior post assumes there are only up to two possible rows and each one is either RRP or NOW
DBlank, thank you for the reply. In theory this sounds like it could work, thank you.

I've had a go at the Conditional Suppression, I did this via Section Expert > Details > Ticked Suppress (no drill down)
Clicked the formula and written the following:

(Not onfirstrecord) and (previous({tbleProduct.SKU}) = {tbleProduct.SKU} and {vw_OA_PriceRuleDetail.PriceRule} = 'RRP')

I don't get any errors upon Save&Close, but on the preview I don't see any changes to the data either, I still have Now & RRP price rules for the SKU?

Sorry if i've misunderstood your instructions. Any further thoughts?

Thanks again, Lawrence
DBlank, I think I might have it working! I did the following:
(Not onfirstrecord) and (previous({tbleProduct.SKU}) = {tbleProduct.SKU} and (previous( {vw_OA_PriceRuleDetail.PriceRule} = 'RRP'))

I'll keep testing, thanks for your help.