Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Issues with Record selection Post Reply Post New Topic
Author Message
Crystal-Newbie
Newbie
Newbie


Joined: 02 Nov 2016
Online Status: Offline
Posts: 6
Quote Crystal-Newbie Replybullet Topic: Issues with Record selection
    Posted: 03 Nov 2016 at 10:43pm
Hi All,

First post here, I am a relative newbie to Crystal, just been using it on and off with my job. Been asked to amend a current report we do so that it includes records with No Values in a certain field. I have managed to do this by adding a ISNULL and Not(isnull) statement to the record selection.

This is great, it includes the previously excluded values I was missing before. The problem is now that another part of my record selection is being ignored for some reason.

I'll attached screenshots so that it's easier to see what I mean.

Please see attached album:Link to album
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 04 Nov 2016 at 10:24am
Just remember how OR's and AND's work.  Anytime I mix  OR's and AND's I have to use parenthesis to make sure the logic is correct.  I am not sure what your are trying to achieve with your select statement.


IP IP Logged
Crystal-Newbie
Newbie
Newbie


Joined: 02 Nov 2016
Online Status: Offline
Posts: 6
Quote Crystal-Newbie Replybullet Posted: 06 Nov 2016 at 9:27pm
Hi Kevlray.

I'm essentially trying to retrieve all the part numbers in a range (E1 - F99999) that includes all the part numbers that may not have a supplier code attached to them, which is why I felt the need to put in the ISNULL and NOT(isnull) statements.

The report now includes the Part numbers without supplier codes however its also including some part numbers which are not within the range E1 to F99999 as shown in the last picture.

I'm just at a bit of a loss on how to rememdy this.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Nov 2016 at 2:55am
I think you will need a left join from part_count to Part_suplier_link and as Kevlray notes you need to add parenthesis to the appropriate part of the condition. I also would set the formula to use default values for nulls.
I think you need to something like
(ISNULL(PSL.What_toOrder) or PSL.Qty=0)
and
pc.cost_rate_code = 'current'...
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.015 seconds.