View Full Version : Duplicates in Crystal Reports
jont
20-Mar-2008, 04:16 PM
Using Crystal to link between Actinic and back office database on the product reference. All is well but it also returns product duplicates (1!ref, 2!ref etc) ... any suggestions on how to filter the main product only would be greatly welcomed.
v8.5.0
Crystal v8.5 Pro
jont
20-Mar-2008, 04:20 PM
I quit 5 minutes too soon .... in case of use to others ...
not ({Product.Product Reference} startswith ["1!", "2!", "3!", "4!"])
adding in more n! as required
wjcampbe
20-Mar-2008, 04:31 PM
May be possible - and shorter to use
not ({Product.Product Reference} contains ["!"])
jont
21-Mar-2008, 09:37 AM
That would be a more elegant (a powerful) solution .. tried it and Crystal does not appear to have the ability to use the operator "contains".
wjcampbe
21-Mar-2008, 10:25 AM
It may be if InStr(Product.Product Reference, "!") or something similar - there may be info on matching a substring in the CR help.
fergusw
21-Mar-2008, 10:42 AM
Quick check of CR function search results seems to indicate Bill's right.
if instr({Product.Product Reference} ,"!") = 0 then
wjcampbe
21-Mar-2008, 10:56 AM
Thanks Fergus.
Jont - Fergus code will need to be changed to
if instr({Product.Product Reference} ,"!") < 1 then
to give the 'not a duplicate' condition, but once working, will never need changed, no matter how many duplicates you have.
fergusw
21-Mar-2008, 11:00 AM
Ahem - *cough* - don't know what you mean ;) Never made that mistake :)
wjcampbe
21-Mar-2008, 11:02 AM
Ahh! The power of the edit button :D
I'd still use < 1, just in case CR sees False as -1 the same as Visual Basic.
fergusw
21-Mar-2008, 11:13 AM
Good point well made sir :) - I'll decline any further edits this time :)
jont
21-Mar-2008, 08:14 PM
Cheers guys - as always more than one way to skin the cat.
Loving Crystal at the moment - only really dabbled with changing Actinic reports but the power of the thing is amazing.. I'm like a kid with a new toy at the moment :cool:
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.