Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
g.DrawString("单位:万套",new Font("宋体",9), Brushes.Black,new Point(525,12)) ;
for(int i = 0 ; i < sMoth.Length ; i++)
{
g.DrawRectangle(Pens.Black,myRec.X,myRec.Y,20,10);
//绘制小方块
g.FillRectangle(new SolidBrush(GetColor(i)),myRec.X,myRec.Y,20,10);
//填充小方块
//g.DrawString(sMoth[i].ToString(),new Font("宋体",9),Brushes.Black,myDec);
g.DrawString(sMoth[i].ToString(),new Font("宋体",9), Brushes.Black ,new Point(560,26)) ;
//绘制小方块右边的文字
myRec.Y += 15 ;
myDec.Y += 15 ;
}