Here's how to determine to which report tree a program, report writer report, ABAP/4 query or transaction code is attached.
From transaction SE16, enter table name SREPOVARI.
To search for non-ABAP/4 Query programs, enter the program name in the REPORT field.
To search for ABAP/4 queries, enter 'AQ' in the REPORTTYPE field, the query user group in the REPORT field and the query number in the EXTDREPORT field.
To search for transaction codes, enter 'TR' in the REPORTTYPE field and the transaction code in the REPORT field.
To search for report writer reports, enter 'RW' in the REPORTTYPE field and the report group in the REPORT field.
In all cases above, when you execute the table query, the report tree id is shown in the TREE_ID field.