Do it manually with one .odb in the UI and check the .rpy for the Python commands to automate it.
In the UI is an option Report -> XY...
Afterwards you can work with those text files.
Or you access directly the XY data in the .odb data structure.
In the documentation are two scripting subtopics to get more information.