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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclude Data Based By Year of Existance

Status
Not open for further replies.
Feb 15, 2006
3
0
0
We have a table that has dummy data to make sure every page of our cross tab has every line item whether is real data or not. The problem is that I do not want the dummy data if we do not have current year real data. This report has previous year also.

I need 1965 and 2013 if 2014 exists but not 1965 if 2014 does not exist. There is more to it but if I can get that I can hopefully work through the rest.

Here is an what we have for the formula right now. Complicated but normally it gives us what we need.

{SW_SLS168_RPT__.AMOUNT_BALANCE} = 0
and {SW_SLS168_RPT__.ACCOUNTING_YEAR} = 1965
and {SW_SLS168_RPT__.C_CODE_B} = {?division} and
{@Record Selection - Supervisor}
and
(isnull({SW_SLS168_RPT__.COMPANY}) or {SW_SLS168_RPT__.COMPANY} = {?company})
or
(isnull({SW_SLS168_RPT__.C_GRP}) or {SW_SLS168_RPT__.C_GRP} <> "none")
and
{@Record Selection - Line} and
{@Record Selection - Unit} and
(isnull({SW_SLS168_RPT__.COMPANY}) or {SW_SLS168_RPT__.COMPANY} = {?company}) and
(isnull({SW_SLS168_RPT__.ACCOUNTING_YEAR}) or {SW_SLS168_RPT__.ACCOUNTING_YEAR} = {?acctyr} ) and
(isnull({SW_SLS168_RPT__.AMOUNT_BALANCE}) or {SW_SLS168_RPT__.AMOUNT_BALANCE} <> 0 ) and
{SW_SLS168_RPT__.C_CODE_B} = {?division}
and {SW_SLS168_RPT__.ACCOUNTING_PERIOD} <= {?acctper}
and
{@Record Selection - Supervisor}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top