Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display total if in date range 1

Status
Not open for further replies.

LouieGrandie

Technical User
Mar 3, 2011
136
US
Have a formula question. I need to write a formula that says if {AR_InvoiceHistoryHeader.InvoiceDate} is between 11/01/2013 and 10/31/2014 then {AR_InvoiceHistoryHeader.TaxableSalesAmt}+{AR_InvoiceHistoryHeader.NonTaxableSalesAmt} else 0 but not sure how to do that. There will be three formulas really, one for 2013 to 2014, one for 2012 to 2013 and one for 2011 to 2012.

Visit Sage's Online Community
 
One possible solution:
if {AR_InvoiceHistoryHeader.InvoiceDate} >= date("11/01/2013") and {AR_InvoiceHistoryHeader.InvoiceDate} <= cdate("10/31/2014") then {AR_InvoiceHistoryHeader.TaxableSalesAmt}+{AR_InvoiceHistoryHeader.NonTaxableSalesAmt} else 0
 
In the Crystal Reports Select Expert. It basically translates the between option to {AR_InvoiceHistoryHeader.InvoiceDate} in cdate("11/01/2013") to cdate("10/31/2014"). I am sure there are other ways to do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top