I have objects inside a report, one of which is a sub report.
I need to loop through all the objects . This I can do.

However I need to know when the object is the sub report.

How do I know this? i.e if IsReport(object) then .......