Hi,
As the error indicates, your selector references one or more field names
that are not valid for the report. Valid field names are all documented on
the Report Types
page<https://developers.google.com/adwords/api/docs/appendix/reports#account>.
Use the name in the first column when constructing your report requests.
In this particular case, *Status* is not a valid field name for the Account
Performance Report.
Cheers,
Josh, AdWords API Team
On Monday, April 21, 2014 7:50:22 AM UTC-4, Najmudheen Chalakkandi wrote:
>
> Hi Friends
>
> I was trying to download 'Account Performance Report' and am using the
> following code but getting the error
> 'ReportDefinitionError.INVALID_FIELD_NAME_FOR_REPORT'
>
>
> /*---------------------------------------------------------------------------------------------*/
>
> Using *googleads-php-lib-master*
> Version* v201402*
>
> $user = new AdWordsUser(NULL, NULL, NULL, NULL, NULL,NULL, $client_id,
> NULL, NULL, NULL);
> $user->LogAll();
> $user->LoadService('ReportDefinitionService', 'v201402');
> $selector = new Selector();
> $selector->fields =array("Clicks","Impressions");
> $selector->dateRange = new DateRange($start_date, $end_date);
> $selector->predicates[] = new Predicate('Status', 'NOT_IN',
> array('DELETED'));
>
> // Create report definition.
> $reportDefinition = new ReportDefinition();
> $reportDefinition->selector = $selector;
> $reportDefinition->reportName = 'Adccount performance report #' . time();
> $reportDefinition->dateRangeType = 'CUSTOM_DATE';
> $reportDefinition->reportType = 'ACCOUNT_PERFORMANCE_REPORT';
> $reportDefinition->downloadFormat = 'CSV';
> $reportDefinition->includeZeroImpressions = FALSE;
> $options = array('version' => 'v201402', 'returnMoneyInMicros' => TRUE);
>
> // Download report.
> ReportUtils::DownloadReport($reportDefinition, $path, $user, $options);
>
>
> /*----------------------------------------------------------------------------------------------------------*/
>
> Please help me
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.