Hi
I am trying to download historical data for the click performance report. I can get it to run with the YESTERDAY and TODAY date range type, but I want to be able to go back and download the last 90 days worth of data. I am using the Java adwords.axis examples as a base, and trying to do something like the following:
DateRange dr = new DateRange();
dr.setMin("20160401");
dr.setMax("20160402");
selector.setDateRange(dr);
reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.CUSTOM_DATE);
reportDefinition.setReportType(ReportDefinitionReportType.CLICK_PERFORMANCE_REPORT);
reportDefinition.setDownloadFormat(DownloadFormat.CSV);
However, I get the following error:
---
[07 Apr 2016 11:50:59,539-report_download:WARN:main] Response received with status code 400 and message: Bad Request
Report was not downloaded due to: HTTP Response Code: 400, Trigger: A single day DateRange is required for reportType: CLICK_PERFORMANCE_REPORT, Type: ReportDefinitionError.INVALID_DATE_RANGE_FOR_REPORT
---
If I omit the date range type altogether but leave the min and max in I get the exact same error.
Any help appreciated.
Thanks
Neil