public static void runExample(DfpServices dfpServices, DfpSession session) throws Exception {
// Get the ReportService.
ReportServiceInterface reportService = dfpServices.get(session, ReportServiceInterface.class);
// Get the NetworkService.
NetworkServiceInterface networkService =
dfpServices.get(session, NetworkServiceInterface.class);
// Get the root ad unit ID to filter on.
String rootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();
// Create statement to filter on an ancestor ad unit with the root ad unit ID to include all
// ad units in the network.
StatementBuilder statementBuilder = new StatementBuilder()
.where("AD_UNIT_ANCESTOR_AD_UNIT_ID = :ancestorAdUnitId")