Hello,
I'm trying to get a report with yesterday's costs for each client
account on an mcc. This is something I figured out how to do on v13
but I'm stuck on v201109. This is what I'm trying:
AdWordsUser user = new
AdWordsUser("mccEmail","mccPass","Mccs_ClientID","userAgent","devToken");
// Location to download report to.
String reportFile = "report.csv";
Selector selector = new Selector();
selector.setFields(new String[] {"ExternalCustomerId",
"Cost"});
// Create report definition.
ReportDefinition reportDefinition = new
ReportDefinition();
reportDefinition.setReportName("anything");
reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.YESTERDAY);
reportDefinition.setReportType(ReportDefinitionReportType.ACCOUNT_PERFORMANCE_REPORT);
reportDefinition.setDownloadFormat(DownloadFormat.CSV);
reportDefinition.setIncludeZeroImpressions(false);
reportDefinition.setSelector(selector);
FileOutputStream fos = new FileOutputStream(new
File(reportFile));
ReportDownloadResponse response =
ReportUtils.downloadReport(user,
reportDefinition, fos);
if (response.getHttpStatus() ==
HttpURLConnection.HTTP_OK) {
System.out.println("Report successfully
downloaded: " +
reportFile);
} else {
System.out.println("Report was not downloaded.
" +
response.getHttpStatus() + ": "
+ response.getHttpResponseMessage());
}
But I get the following error:
Report was not downloaded. 400: !!!2|||-1|||
[ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @
selector]???
Thanks in advance
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en