Quantcast
Channel: SCN : All Content - SAP Training and Education
Viewing all articles
Browse latest Browse all 945

Crystal Reports - Using IF then in Report Select, will not allow nested IF THEN?

$
0
0

    I have a select looking up Sales date in a detail file.  I like to be able to exclude records that are specific to "Item Numbers base on Invoice date range".   Each if is a different set of Item numbers and date ranges.

 

({AR_InvoiceHistoryHeader.ARDivisionNo} = {?Divison Number} and

{AR_InvoiceHistoryHeader.CustomerNo} = {?Customer Number} and

{AR_InvoiceHistoryHeader.InvoiceDate} = {?Dates} and

{AR_InvoiceHistoryDetail.ItemType} = "1")

and

not

(

({AR_InvoiceHistoryDetail.ItemCode}=["PTOMC2Z","PTOMC1G","PTOMC32Z","PTOMC7ZT"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#07/01/2012#) to Cdate (#09/30/2012#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["TBG1G","TBG8Z"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#04/02/2012#) to Cdate (#06/30/2012#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["DPC5G","DPC1G","DPC68Z","DPC36Z","DPC14Z","DPC7ZT"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#10/1/2012#) to Cdate (#12/31/2012#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["PTOMG1G","PTOMGHG","PTOMG8Z"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#01/01/2013#) to Cdate (#03/31/2013#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["ATL1G","ATLHG","ATL8Z"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#04/01/2013#) to Cdate (#06/30/2013#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["MJTMG1G","MJTMGHG","MJMTG8Z"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#07/1/2013#) to Cdate (#09/30/2013#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["MLREW1G","MLREW32Z","MLCAL1G","MLCAL32Z","MLSER32Z","MLSER1G","MLBLI1G","MLBLI32Z","MLENE1G", "MLENE32Z"] and

   {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#01/15/2014#) to Cdate (#03/14/2014#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["ATL5G","ATL8Z","ATLHG","ATL1G"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#07/15/2014#) to Cdate (#09/14/2014#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["PTOMC1G","PTOMCHG","PTOMC8Z"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#04/15/2014#) to Cdate (#06/14/2014#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["DPC5G","DPC1G","DPC68Z","DPC36Z","DPC14Z","DPC7ZT"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#10/1/2014#) to Cdate (#12/31/2014#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["PTOMG1G","PTOMGHG","PTOMG8Z","PTOMC1G","PTOMC32Z","PTOMC7ZT"] and

   {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#01/15/2015#) to Cdate (#03/13/2015#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["HSBC1G","HSBCHG","HSBC7ZT","HSBO1G","HSBOHG", "HSBO8Z"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#03/16/2015#) to Cdate (#05/31/2015#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["RTMC1G","RTMCHG","RTMC16Z","MJTMC1G","MJTMCHG","MJTMC16Z","MJTMG1G","MJTMGHG","MJTMG8Z"] and

   {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#06/15/2015#) to Cdate (#08/12/2015#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["DPC5G","DPC1G","DPC68Z","DPC36Z","DPC14Z","DPC7ZT"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#09/14/2015#) to Cdate (#12/11/2015#)))

or

({AR_InvoiceHistoryDetail.ItemCode}=["ATL5G","ATL8Z","ATLHG","ATL1G"] and {AR_InvoiceHistoryHeader.InvoiceDate} = (cdate (#12/14/2015#) to Cdate (#02/12/2016#)))

)

 

 

I hope I am representing this correctly.  I keep only having this lookup use the first statement if never dro[ps trought looking at any of the other IF statements.

I am using Crystal Reports Version 14.0.3.613..

Could tyheir be a bug?  or ?


Viewing all articles
Browse latest Browse all 945

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>