private static void CreateAndRunFloodlightReport(DfareportingService service, long userProfileId) { DimensionValueList floodlightConfigIds = new GetDimensionValuesHelper(service).Query( "dfa:floodlightConfigId", userProfileId, StartDate, EndDate, MaxListPageSize); if (floodlightConfigIds.Items.Count > 0) { // Get a Floodlight Config ID, so we can run the rest of the samples. DimensionValue floodlightConfigId = floodlightConfigIds.Items[0]; Report floodlightReport = new CreateFloodlightReportHelper(service).Insert( userProfileId, floodlightConfigId, StartDate, EndDate); File file = new GenerateReportFileHelper(service).Run(userProfileId, floodlightReport, false); if (file != null) { // If the report file generation did not fail, display results. new DownloadReportFileHelper(service).Run(file); } } }