Print Page | Close Window

Multiple selection gives wrong result

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4459
Printed Date: 06 May 2024 at 2:19am


Topic: Multiple selection gives wrong result
Posted By: Crystal Method
Subject: Multiple selection gives wrong result
Date 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.



Replies:
Posted By: BrianBischof
Date 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>


Posted By: Crystal Method
Date 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.


Posted By: BrianBischof
Date 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 http://www.amazon.com/exec/obidos/ASIN/0974953601/bischofsystem-20 - Amazon.com or reading the http://members.crystalreportsbook.com - 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>



Print Page | Close Window