One way of dealing with the problem of missing months is to use a formula like the one below:
//This formula is placed in the month group header in the sub-report which populates the shared variable
//It collects the months data into the right slot and it won't matter if we don't have data for a particular month
Shared CurrencyVar Array MonthSales;
Redim Preserve MonthSales [12];
MonthSales[1] := if Month({Orders.Order Date}) = 1 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[1] ;
MonthSales[2] := if Month({Orders.Order Date}) = 2 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[2] ;
MonthSales[3] := if Month({Orders.Order Date}) = 3 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[3] ;
MonthSales[4] := if Month({Orders.Order Date}) = 4 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[4] ;
MonthSales[5] := if Month({Orders.Order Date}) = 5 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[5] ;
MonthSales[6] := if Month({Orders.Order Date}) = 6 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[6] ;
MonthSales[7] := if Month({Orders.Order Date}) = 7 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[7] ;
MonthSales[8] := if Month({Orders.Order Date}) = 8 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[8] ;
MonthSales[9] := if Month({Orders.Order Date}) = 9 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[9] ;
MonthSales[10] := if Month({Orders.Order Date}) = 10 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[10] ;
MonthSales[11] := if Month({Orders.Order Date}) = 11 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[11] ;
MonthSales[12] := if Month({Orders.Order Date}) = 12 then Sum({Orders.Order Amount}, {Orders.Order Date}, "monthly") else MonthSales[12] ;
MonthSales [Month({Orders.Order Date})]
and in the main report the formula below is also placed in the month group header
//This formula is in the main report
Shared CurrencyVar Array MonthSales;
if GroupNumber <=12 then MonthSales [GroupNumber]
This might give you an idea of how to approach the problem of missing months
Gordon BOCP
Crystalize