I had exactly the same problem waiting for MCC Cross client reporting
so I created a report for every individual client account and combined
them later. Oh and you should NOT use client email but account number
instead.

The code looks like this using the v201101 .NET API Client Library in
C#

            // 1) Set the required authentication headers!
            Dictionary<string, string> headers = new
Dictionary<string, string>();
            headers.Add("companyName", "XXXXX");
            headers.Add("authToken", "XXXXX");
            headers.Add("useragent", "XXXXX");
            headers.Add("developerToken", "XXXXX");
            headers.Add("clientCustomerId", "123456789");   // This
MUST be the account number of the individual account
            AdWordsUser adwordsUser = new AdWordsUser(headers);

            // 2) Create the report definition!
            var reportDefinitionService =
(ReportDefinitionService)adwordsUser.GetService(AdWordsService.v201101.ReportDefinitionService);

            // 3) Set the report options!
            var reportDefinition = new ReportDefinition();
            reportDefinition.reportName = String.Format("{0}
CampaignPerformance", "REPORT");
            reportDefinition.dateRangeType =
ReportDefinitionDateRangeType.CUSTOM_DATE;
            reportDefinition.reportType =
ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT;
            reportDefinition.downloadFormat = DownloadFormat.XML;
            reportDefinition.selector = new Selector {
                                                        fields = new[]
{ "ExternalCustomerId", "CampaignId", "CampaignName", "Cost",
"Clicks", "Impressions", "Status" },
                                                        dateRange =
new DateRange { min = "20110701", max = "20110731" }
                                                     };;
            var operation = new ReportDefinitionOperation();
            operation.operand = reportDefinition;
            operation.@operator = Operator.ADD;

            // 4) Run the report and download it!
            ReportDefinition[] result =
reportDefinitionService.mutate(new[] { operation });
            if (result != null && result.Length > 0) { new
ReportUtilities(adwordsUser).DownloadReportDefinition(result[0].id,
@"C:\REPORTS\CAMPAIGN.xml"); }

            // 5) Happy days coz you now have your report so open it
and parse the XML!

If you wrap this code up into a loop that repeats for every account
number then you should be fine. If you really want to speed things up
then do it across multiple threads, although you will need to watch
the filename and make it unique, or you'll realy get screwed. LOL!

Regards

Tony

On Jul 29, 8:52 pm, Ken Foster <[email protected]> wrote:
> OK, this lack of reporting for MCC accounts is really becoming a pain. I
> thought I could do a temporary workaround by creating a ReportDefinition and
> iterating through a list of clientEmails downloading that report for each
> one. It looks like, however, that I have to define a separate
> ReportDefinition for each clientEmail....even though the report is the exact
> same for each of them!  Am I reading that wrong?
>
> Is there any, viable, way to get the same report for all clients under an
> MCC account in the v201101 API?!?
>
> We have 25 clients and 4 MCCs under a master MCC. the 4 MCCs have from 8 to
> 12 or so clients each. I need to get a fairly generic, non filtered, Ad
> performance, Keyword performance and Search Query performance report for all
> those clients on a daily basis. In v13 it took an hour, but came down in one
> file per report type. How do I do this with v201101? Even recognizing that
> the MCC support is behind, that's fine, I don't mind combining data from
> different files on my end because they will be the exact same structure,
> however now I have to create something like 65 *exactly the 
> same*ReportDefinitions? There has to be an easier way. Anyone?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

Reply via email to