get and print reporting sql from _shared