i am trying to download report for all campaign of all account in xml 
format . my code is here :
// $campaigns is  all campaign
foreach ($campaigns as $campaign) {
                $filePath = realpath(dirname(__FILE__)) . 
"/../../frontend/web/reports/" . $campaign->name . '_' . $campaign->id . 
'.xml';
                $selector->predicates[] = new \Predicate('CampaignId', 
'EQUALS', array($campaign->id));

                // Optional: use predicate to filter out paused criteria.
                // $selector->predicates[] = new 
\Predicate('CampaignStatus', 'NOT_IN', array('PAUSED'));
                // Create report definition.
                $reportDefinition = new \ReportDefinition();
                $reportDefinition->selector = $selector;
                $reportDefinition->reportName = 'Criteria performance 
report #' . uniqid();
                $reportDefinition->dateRangeType = 'ALL_TIME';
                $reportDefinition->reportType = 
'CAMPAIGN_PERFORMANCE_REPORT';
                $reportDefinition->downloadFormat = 'XML';
                
                $options = array();
                //     the report output.
                 $options['includeZeroImpressions'] = true;
                // Download report.
                $report = \ReportUtils::DownloadReport($reportDefinition, 
$filePath, $user, $options);
            
            }

it download all campaign but only one campaign have ROW element other 
campaign do not have campaign data. why is that ? report like this
<report><report-name name="Criteria performance report 
#56de67b688f5f"/><date-range date="All Time"/><table>
<columns><column name="campaignID" display="Campaign ID"/>
<column name="campaign" display="Campaign"/>
<column name="ctr" display="CTR"/>
<column name="impressions" display="Impressions"/>
<column name="clicks" display="Clicks"/
><column name="cost" display="Cost"/>
<column name="clientName" display="Client name"/>
<column name="budget" display="Budget"/>
<column name="endDate" display="End date"/>
<column name="startDate" display="Start date"/>
<column name="campaignState" display="Campaign state"/>
</columns>
</table>
</report>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/82e724b4-d6df-4f89-a002-971c906731d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to