add prepare cursor method
fix cursor bug
use new datamapper in reports