Should return nothing. I'll include a simple example and hopefully I'm just missing something!
The report needs to have current month and the previous 11 months.
Here is my formula. My parameter input for current month is 5, report year = 2003 and division = GRDH
// initialize month/year variable
datevar Cur1 :=Date (1999,9 ,9 );
//set variables
if {?Current Month}-1 >0
then Cur1 :=(Date ({?Report Year},({?Current Month}-1) ,1 )) else
Date ({?Report Year}-1,(12 + {?Current Month}-1) , 1);
//report plan for mo-1
if{MBP_QUAL_CPPM_PLAN.PEYR} = year(Cur1) and
{?Division} = {MBP_QUAL_CPPM_PLAN.DVCO} then
{MBP_QUAL_CPPM_PLAN.CPPM}
Here is what is currently in my MBP__QUAL_CPPM_PLAN table (trying to keep this simple and I still can't get it to work!!)
PEYR FUNC BUCO DVCO CPPM
2003 QCPP EMNA GRDH 20
2003 QCPP EMNA NODV 10
and lastly, here is what my report shows.
2003
April
20
2003
April
0
The section of detail should not be there. If I add another record into my table that does not meet the criteria, I get another section the 2003, April and 0.
The report needs to have current month and the previous 11 months.
Here is my formula. My parameter input for current month is 5, report year = 2003 and division = GRDH
// initialize month/year variable
datevar Cur1 :=Date (1999,9 ,9 );
//set variables
if {?Current Month}-1 >0
then Cur1 :=(Date ({?Report Year},({?Current Month}-1) ,1 )) else
Date ({?Report Year}-1,(12 + {?Current Month}-1) , 1);
//report plan for mo-1
if{MBP_QUAL_CPPM_PLAN.PEYR} = year(Cur1) and
{?Division} = {MBP_QUAL_CPPM_PLAN.DVCO} then
{MBP_QUAL_CPPM_PLAN.CPPM}
Here is what is currently in my MBP__QUAL_CPPM_PLAN table (trying to keep this simple and I still can't get it to work!!)
PEYR FUNC BUCO DVCO CPPM
2003 QCPP EMNA GRDH 20
2003 QCPP EMNA NODV 10
and lastly, here is what my report shows.
2003
April
20
2003
April
0
The section of detail should not be there. If I add another record into my table that does not meet the criteria, I get another section the 2003, April and 0.