Hi
I have the following setup
=================================================================
MCC Production
=================================================================
Customer ID : 333-332-3726
===============================================================================================
MCC Test Account
===============================================================================================
Customer ID : 247-901-4773
Following are the accounts under this test Account
Name : Test1Account
Customer ID = 918-647-9765
Name : TestAccount2
Customer ID = 107-465-4253
===============================================================================================
I am able to sign in to Test account and create the reports from there
using UI. But when I try to create the reports for
Test1Account(918-647-9765) or MCC Account(247-901-4773) sing the API, I get
the error. I read some where that report cannot be created for test MCC
Account but their advertiser account. In my case, "Test1Account" is the
advertiser so there should be no error for creating report for this. I am
using the Client Libraries of .Net and using the web application sample(
this sample loads the campaigns successfully so there is no problem of
developer token or oauth token).
Following is the code for generating the report
ConfigureUserForOAuth();
(user.Config as AdWordsAppConfig).ClientCustomerId = txtCustomerId.
Text;//equal to 918-647-9765(Test1Account)
ReportDefinition definition = new ReportDefinition();
definition.reportName = "Last 7 days CRITERIA_PERFORMANCE_REPORT";
definition.reportType = ReportDefinitionReportType.
CRITERIA_PERFORMANCE_REPORT;
definition.downloadFormat = DownloadFormat.GZIPPED_CSV;
definition.dateRangeType = ReportDefinitionDateRangeType.LAST_7_DAYS;
// Create selector.
Selector selector = new Selector();
selector.fields = new string[] {"CampaignId", "AdGroupId", "Id",
"CriteriaType", "Criteria",
"CriteriaDestinationUrl", "Clicks", "Impressions", "Cost"};
Predicate predicate = new Predicate();
predicate.field = "Status";
predicate.@operator = PredicateOperator.IN;
predicate.values = new string[] {"ACTIVE", "PAUSED"};
selector.predicates = new Predicate[] {predicate};
definition.selector = selector;
definition.includeZeroImpressions = true;
string filePath = Path.GetTempFileName();
try {
ReportUtilities utilities = new ReportUtilities(user, "v201406",
definition);
utilities.GetResponse().Save(filePath);
} catch (Exception ex) {
throw new System.ApplicationException("Failed to download report.",
ex);
}
Response.AddHeader("content-disposition",
"attachment;filename=report.gzip");
Response.WriteFile(filePath);
Response.End();
I get the following error
"INVALID_PREDICATE_ENUM_VALUE, Trigger: ACTIVE, FieldPath: selector}"
and If I change the version number by changing the line
ReportUtilities utilities = new ReportUtilities(user, "v201406", definition
);
to this
ReportUtilities utilities = new ReportUtilities(user, "v201409", definition
);
I get the error
INVALID_REPORT_DEFINITION_XML
my question is that Can I create the download the reports for my adword
accounts under test MCC. I f yes, then what is the cause of the problem?
Regards
Ulfat Hussain
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/03bbdf4c-64b4-441a-8495-19a759a500c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.