If you are going build reports I suggest you to use views instead of constructing the reports yourself. Using functions like...
views_embed_view
views_get_view_results
views_get_view
... You can do a lot of things: control access, filter data, relate data, paging, etc. You can search more on this functions everywhere.
Using views for building reports will allow to build not only what you want right now but also what you will need tomorrow, in most of the cases without coding.