I am trying to use the sample to pull back a report.
I am getting this error information:
Google.Api.Ads.AdWords.Util.Reports.AdWordsReportsException was caught
HResult=-2146233088
Message=Report download errors occurred.
Source=Google.AdWords
StackTrace:
at
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String
downloadUrl, String postBody)
at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.GetReport()
at
Google.Api.Ads.Common.Util.Reports.AdsReportUtilities.GetResponse()
at
Google.Api.Ads.AdWords.Examples.VB.v201409.DownloadCriteriaReport.Run(AdWordsUser
user, String fileName) in
E:\Development\Google\NewSample\examples\AdWords\vb\v201409\Reporting\DownloadCriteriaReport.vb:line
91
InnerException: System.Net.WebException
HResult=-2146233079
Message=The remote server returned an error: (400) Bad Request.
Source=System
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at
Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String
downloadUrl, String postBody)
InnerException:
Not much to go on. Here is my code(should look familiar it is right from
the Google Samples):
Dim definition As New ReportDefinition
definition.reportName = "CRITERIA_PERFORMANCE_REPORT ECG"
definition.reportType = ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT
'CRITERIA_PERFORMANCE_REPORT 'CAMPAIGN_PERFORMANCE_REPORT
definition.downloadFormat = DownloadFormat.GZIPPED_CSV
definition.dateRangeType = ReportDefinitionDateRangeType.LAST_7_DAYS
' Create the selector.
Dim selector As New Selector
selector.fields = New String() {"CampaignId", "AdGroupId", "Id",
"CriteriaType", "Criteria", _
"CriteriaDestinationUrl", "Clicks", "Impressions", "Cost"}
Dim predicate As 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
Dim filePath As String = ExampleUtilities.GetHomeDir() &
Path.DirectorySeparatorChar
& fileName
Try
Dim utilities As New ReportUtilities(user, "v201409", definition)
utilities.GetResponse().Save(filePath)
Console.WriteLine("Report was downloaded to '{0}'.", filePath)
Catch ex As Exception
Throw New System.ApplicationException("Failed to download report.", ex)
End Try
Thanks In Advance
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/6da56ba8-7624-425e-a30d-1e39e807c79e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.