new funtion and library to export reports