Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Multiple selection gives wrong result Post Reply Post New Topic
Author Message
Crystal Method
Newbie
Newbie
Avatar

Joined: 06 Oct 2008
Location: United Kingdom
Online Status: Offline
Posts: 15
Quote Crystal Method Replybullet Topic: Multiple selection gives wrong result
    Posted: 06 Oct 2008 at 7:49am

I have created a Select Expert formula to select warehouses and items within warehouses.  The problem is if I select 'ALL' warehouses and then try to select only discrete values for the Item, I get all items.  If I select one or more discrete Warehouses and also discrete items, I get only the discrete items in the discrete warehouses.

Why does selecting 'ALL' warehouses give me also 'ALL' items when I only want discrete items?
 
If {?Warehouse}= 'ALL'
Then {Relsc.Lagerort} like '*'
Else {RelSc.Lagerort} = {?Warehouse} and
if {?Item} = 'ALL'
Then {RELSC.ARTIKELNR} like '*'
Else {RELSC.ARTIKELNR} = {?Item}

Seagate Crystal Reports 8.5.0.389 in the guise of INFOR:Reports as part of Infor:COM ERP software.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 06 Oct 2008 at 9:35am
You should use parentheses to group the logic together. I think the AND in the third line is messing up the logic because it might be including it as part of the ELSE statement. Using parenthese will make it easier to tell CR what part of the logic belongs together.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Crystal Method
Newbie
Newbie
Avatar

Joined: 06 Oct 2008
Location: United Kingdom
Online Status: Offline
Posts: 15
Quote Crystal Method Replybullet Posted: 08 Oct 2008 at 1:32am
Hi Brian,
 
That worked a treat!  Thanks very much.
 
Is your Encyclopedia relevant to Crystal Version 8?  Is there a FAQ anywhere to show the differences between version 8 and 9,X... ?
Seagate Crystal Reports 8.5.0.389 in the guise of INFOR:Reports as part of Infor:COM ERP software.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 08 Oct 2008 at 10:00am
My book is for CR XI. However, most of the techniques that it covers apply to all the versions of Crystal Reports. Of course, things like dynamic images and dynamic cascading prompts are only for XI. But the report formatting techiques work for many versions.
 
There used to be an online comparison of all the different CR versions on the BOBJ site, but since there were acquired by SAP most of my links are broken now.
 
You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.