Kelvin
unread,Nov 25, 2009, 1:54:59 PM11/25/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi, all.
I'm using the .net client lib and I set all the parameters in the
report service, however the returned xml shows:
<?xml version="1.0" standalone="yes" ?>
- <report>
- <table>
- <columns>
<column name="date" />
<column name="keywordid" />
<column name="keyword" />
<column name="firstPageCpc" />
<column name="budget" />
<column name="imps" />
<column name="clicks" />
<column name="cpc" />
<column name="pos" />
<column name="conv" />
</columns>
<rows />
</table>
- <totals>
<grandtotal imps="0" clicks="0" cpc="0" pos="0.0" conv="0" />
</totals>
</report>
Part code:
ReportService service = new ReportService
{
applicationTokenValue = appToken,
developerTokenValue = devToken,
useragentValue = usrAgent,
emailValue = email,
passwordValue = psword,
clientEmailValue = new clientEmail { Value = new
string[] { "xxxxxxxxxxxxxxxxxx" } }
};
DefinedReportJob job = new DefinedReportJob{
selectedReportType = "Keyword",
aggregationTypes = new string[] { "Daily" },
selectedColumns = new string[] { "Keyword",
"KeywordId", "Impressions", "Clicks", "Conversions",
"AveragePosition", "CPC", "FirstPageCpc", "DailyBudget" },
name = "KeywordReport",
startDay = DateTime.Today.AddDays(-2),
endDay = DateTime.Today,
adWordsType = AdWordsType.SearchOnly,
adWordsTypeSpecified = true,
keywordType = KeywordType.Broad,
keywordTypeSpecified = true};
try
{
service.validateReportJob(job);
long jobId = service.scheduleReportJob(job);
ReportJobStatus status = service.getReportJobStatus
(jobId);
while (status != ReportJobStatus.Completed &&
status != ReportJobStatus.Failed)
{
Thread.Sleep(30000);
status = service.getReportJobStatus(jobId);
}
if (status == ReportJobStatus.Failed)
{
System.Environment.Exit(0);
}
return service.getReportDownloadUrl(jobId);
I can get the correct report data through running report service in my
google account, but through adwords API, empty xml fiels are always
returned, anything wrong?
Thanks.