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!

syntax logic

Status
Not open for further replies.

EBee

MIS
Aug 10, 2001
229
US
if {MB_View.Ad_Type} = 'C' and {MB_VIEW.Account_Type} = 'C'
or {MB_View.Ad_Type} = 'C' and {MB_VIEW.Account_Type} = 'G'
or {MB_View.Ad_Type} = 'L' and {MB_VIEW.Account_Type} = 'C'
or {MB_View.Ad_Type} = 'L' and {MB_VIEW.Account_Type} = 'G'
or {MB_View.Ad_Type} = 'L' and {MB_VIEW.Account_Type} = 'V'
or {MB_View.Ad_Type} = 'N' and {MB_VIEW.Account_Type} = 'C'
or {MB_View.Ad_Type} = 'N' and {MB_VIEW.Account_Type} = 'G'
// parameter period
and {MB_VIEW.Period} <= {?Period}
// compares period year to current year
and year({MB_VIEW.Insert_Date}) = year (CurrentDate)-1 then
//Revenue calculation
{MB_VIEW.Insert_Cost} - {MB_VIEW.Insert_Discount}


The formula YTD current revenue runs but I think the first part is not right. the way I wanted this to calculate is to total all revenue from period 1 to (?Period) ( the periods data are from 1 -12)

However, my report is not comming with the same amount with the current revenue

what 'em I doing wrong here, i appreciate any suggestions

thanks
erwin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top