script to gen report