I would look into either using the printer object (look it up in help) or look into using a datareport. (look it up in help)