Hi,
ordering is an array of OrderBy objects, so I believe it would be
array(new OrderBy('Date', 'ASCENDING'));.
See
http://code.google.com/apis/adwords/docs/reference/latest/ReportDefinitionService.Selector.html#ordering
for details.
Cheers,
Anash P. Oommen,
AdWords API Advisor.
On Mar 7, 9:28 am, stiggywigget <[email protected]> wrote:
> I'm trying to sort by date when defining and adding a report.
> In PHP:
>
> $selector->fields = array('CampaignId', 'CampaignName', 'Status', 'Clicks',
> 'Cost', 'Date');
> $selector->ordering = array('Date'); // Is this correct?
> $reportDefinition = new ReportDefinition();
> $reportDefinition->reportName = 'name';
> $reportDefinition->dateRangeType = 'LAST_7_DAYS';
> $reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
> $reportDefinition->downloadFormat = 'XML';
> $reportDefinition->selector = $selector;
>
> I suspect there's more to it. Thanks.
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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