Thanks for your response. This is a sample code Marco
$selector = new Selector( array( "AdGroupId", "AveragePosition", "Clicks", "Cost", "Impressions", "Id" ) ); $selector->dateRange = new DateRange( "20100927", "20101003" ); $selector->predicates = new Predicate( "AccountId", "EQUALS", "em...@example.com"); $reportDefinition = new ReportDefinition(); $reportDefinition->selector = $selector; $reportDefinition->reportName = "top keyword settimanali"; $reportDefinition->reportType = "KEYWORDS_PERFORMANCE_REPORT"; $reportDefinition->downloadFormat = "CSV"; $reportDefinition->dateRangeType = "CUSTOM_DATE"; try{ $reportDefinitionOperation = new ReportDefinitionOperation(); $reportDefinitionOperation->operand = $reportDefinition; $reportDefinitionOperation->operator = "ADD"; $res = $service->mutate( array( $reportDefinitionOperation ) ); print_r($res); } catch ( Exception $e ){ print_r($e); exit; } On 7 Ott, 19:39, AdWords API Advisor <adwordsapiadvi...@google.com> wrote: > Hi Marco, > > I've seen this error when the report definition contains an invalid > predicate value. Do you have the code you used to create the report > definition? > > Best, > - Eric Koleda, AdWords API Team > > On Oct 6, 4:38 am, "Marco T." <ma...@inartek.it> wrote: > > > Here's a snippet of code that return the error > > > ......... > > $service = $user->GetReportDefinitionService("v201008"); > > > try{ > > //taking all valid report > > $selector = new Selector(); > > $all = $service->get( $selector );} > > > catch ( Exception $e ){ > > print_r($e); > > exit; > > > } > > > //the ID of first report > > $id = (float) $all->entries[0]->id; > > > //try to download report > > $ch = curl_init( "https://adwords.google.com/api/adwords/ > > reportdownload?__rd=".$id ); > > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > > curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0 ); > > curl_setopt($ch, CURLOPT_TIMEOUT, 0 ); > > curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); > > curl_setopt($ch, CURLOPT_HTTPHEADER, array( > > 'Authorization: > > GoogleLogin auth=' . $user->GetAuthToken(), > > 'clientEmail: ' . > > $user->GetClientId() > > > )); > > $x = curl_exec($ch); > > > //print response > > echo $x; > > curl_close($ch); > > > On 5 Ott, 17:00, "Marco T." <ma...@inartek.it> wrote: > > > > Everytime I try to download accepted report (with or without the PHP > > > reports utilties) I obtaing this response: > > > > !!!1|||47767XX|||Could not read report??? > > > > Any idea? > > > Marco -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en