Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula for filtering Post Reply Post New Topic
Author Message
babypink2807
Newbie
Newbie
Avatar

Joined: 11 Mar 2011
Online Status: Offline
Posts: 1
Quote babypink2807 Replybullet Topic: Formula for filtering
     Posted: 11 Mar 2011 at 2:17am
Hi all

I am new to Crytal Reports so please be gentle (sorry)

I have created a report as follows (yes I know its simple but tok me ages!)

if{STOCK.CURRDEPOT}="01" then "Normanton" else
if{STOCK.CURRDEPOT}="02" then "Warrington" else
if{STOCK.CURRDEPOT}="04" then "Port Talbot" else
if{STOCK.CURRDEPOT}="05" then "Durham" else
if{STOCK.CURRDEPOT}="06" then "Konstructa" else
if{STOCK.CURRDEPOT}="07" then "AW Blake" else
if{STOCK.CURRDEPOT}="08" then "Hitchin" else
if{STOCK.CURRDEPOT}="10" then "Atlas CopCo" else
if{STOCK.CURRDEPOT}="12" then "Mobile Freezers" else
if{STOCK.CURRDEPOT}="14" then "ATR Aberdeen" else
if{STOCK.CURRDEPOT}="17" then "Toveys" else
if{STOCK.CURRDEPOT}="19" then "KDM Hire Ireland" else
if{STOCK.CURRDEPOT}="20" then "Torlundy" else
if{STOCK.CURRDEPOT}="21" then "Hill Top Farm" else
if{STOCK.CURRDEPOT}="22" then "Gibsons of Kendal" else
if{STOCK.CURRDEPOT}="23" then "Glasgow" else
"No Depot"

This runs all stock and all I want it to show is the items that fall into certain Product Groups, the field for that is PGROUP and put the following on

{STOCK.PGROUP}="0100" OR
{STOCK.PGROUP}="0600"

Of course its still running the whole stock list, please help its driving me nuts!

Thanks
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 11 Mar 2011 at 3:54am
You should just be able to enter that formula in the Section Expert as:
 
{stock.pgroup}="0100
or
{stock.pgroup}='0600"
|< /\ '][' ( )
IP IP Logged
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