Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: formula Post Reply Post New Topic
Author Message
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Topic: formula
     Posted: 08 Feb 2013 at 10:16am
I have a report with the following formula
{PD_CDDPDRATRANW_RECORD.TRX_COST_CTR} = 7070 and
{PD_CDDPDRATRANW_RECORD.TRX_POSTING_DT} in LastFullMonth and
{PD_CDDPDRATRANW_RECORD.TRX_QTY} > 100
 
I will then as time goes by have to exclude some data if it meets certain criteria and I'm not sure how to add it to the formula
 
I will want to add if {PD_CDDPDRATRANW_RECORD.TRX_PROC_NO} = 2792017 and the {PD_CDDPDRATRANW_RECORD.TRX_QTY} of that proc no <> 150 to print the line data to the report but if the line data matches this criteria then I don't want it to print to the report.
 
I will also have to add other trx_proc_no and trx_qty to the report such as
if {PD_CDDPDRATRANW_RECORD.TRX_PROC_NO} = 2700115 and the {PD_CDDPDRATRANW_RECORD.TRX_QTY} of that proc no <> 130
 
The trx_proc_no and trx_qty will/could be different for each exclusion.
 
Where do I add these exceptions and how to I formulate them?
Paula J
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Feb 2013 at 11:52am
i assume your first formula is your select statement. You just need to amend it with your new conditons
 
{PD_CDDPDRATRANW_RECORD.TRX_COST_CTR} = 7070 and
{PD_CDDPDRATRANW_RECORD.TRX_POSTING_DT} in LastFullMonth and
{PD_CDDPDRATRANW_RECORD.TRX_QTY} > 100
and
NOT({PD_CDDPDRATRANW_RECORD.TRX_PROC_NO} = 2792017 and {PD_CDDPDRATRANW_RECORD.TRX_QTY} <> 150)
and
NOT({PD_CDDPDRATRANW_RECORD.TRX_PROC_NO} = 2700115 and {PD_CDDPDRATRANW_RECORD.TRX_QTY} <> 130)
IP IP Logged
Paula J
Groupie
Groupie
Avatar

Joined: 22 Aug 2011
Location: United States
Online Status: Offline
Posts: 51
Quote Paula J Replybullet Posted: 11 Feb 2013 at 2:59am
Thanks for the formula but it does not stip out the 2792017's with 150 qty nor the 2700115's with 130 qty with the <> before the quantity but when I change that to = it does as I want it to.  Thanks! 

Edited by Paula J - 11 Feb 2013 at 3:03am
Paula J
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