fixed reportType global problem by using attributes