Are you in sandbox mode? - Jan
On 9 Okt., 18:20, AIDevTeam <[EMAIL PROTECTED]> wrote: > Hi All, > > I suspect I'm missing something minor here, but when I create a report > using the service, no data is returned. However, when I log in to My > Client Center and "create similar report" it returns loads of the > data. Can anyone point out where I'm going wrong? > > AccountService AccountService = new AccountService(); > AccountService.emailValue = new > PlatformConnectors.Google.Adwords1.email(); > AccountService.emailValue.Text = new String[] > { Settings.Default.AdwordsUsername }; > AccountService.passwordValue = new > PlatformConnectors.Google.Adwords1.password(); > AccountService.passwordValue.Text = new String[] > { Settings.Default.AdwordsPassword }; > AccountService.useragentValue = new > PlatformConnectors.Google.Adwords1.useragent(); > AccountService.useragentValue.Text = new String[] { "PPC Tracking > system. V0.01 (Alpha 2)" }; > AccountService.developerTokenValue = new > PlatformConnectors.Google.Adwords1.developerToken(); > AccountService.developerTokenValue.Text = new String[] > { Settings.Default.DeveloperToken }; > AccountService.applicationTokenValue = new > PlatformConnectors.Google.Adwords1.applicationToken(); > AccountService.applicationTokenValue.Text = new String[] > { Settings.Default.ApplicationToken }; > > string[] Accounts = AccountService.getClientAccounts(); > > ReportService Service = new ReportService(); > Service.emailValue = new email(); > Service.emailValue.Text = new String[] > { Settings.Default.AdwordsUsername }; > Service.passwordValue = new password(); > Service.passwordValue.Text = new String[] > { Settings.Default.AdwordsPassword }; > Service.useragentValue = new useragent(); > Service.useragentValue.Text = new String[] { "Tracking system. V0.01 > (Alpha 2)" }; > Service.developerTokenValue = new developerToken(); > Service.developerTokenValue.Text = new String[] > { Settings.Default.DeveloperToken }; > Service.applicationTokenValue = new applicationToken(); > Service.applicationTokenValue.Text = new String[] > { Settings.Default.ApplicationToken }; > > DefinedReportJob Job = new DefinedReportJob(); > Job.name = "Automated Job"; > Job.selectedReportType = > ReportTypes.PlacementAndKeywordPerformance; //"Keyword" > Job.startDay = new DateTime(DateTime.Now.Year, DateTime.Now.Month, > DateTime.Now.Day).AddDays(-1); > Job.endDay = Job.startDay; > Job.aggregationTypes = new string[] { AggregationTypes.Summary }; > Job.clientEmails = Accounts; > Job.crossClient = true; > Job.selectedColumns = new string[] { ReportColumns.Keyword.Name, > ReportColumns.Clicks.Name }; //"Keyword", "Clicks" > > Job.adGroupStatuses = new AdGroupStatus[] { AdGroupStatus.Enabled, > AdGroupStatus.Paused }; > Job.campaignStatuses = new CampaignStatus[] { CampaignStatus.Active, > CampaignStatus.Paused }; > Job.keywordStatuses = new KeywordStatus[] { KeywordStatus.Active, > KeywordStatus.Paused }; > > Service.validateReportJob(Job); > > long JobId = Service.scheduleReportJob(Job); > > ... > > The response is: > > <?xml version="1.0" standalone="yes" ?> > - <report> > - <table> > - <columns> > <column name="keyword" /> > <column name="clicks" /> > </columns> > <rows /> > </table> > - <totals> > <grandtotal clicks="0" /> > </totals> > </report> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---