Failing to Download reports using v201406

21 views
Skip to first unread message

Vandita Chhabaria

unread,
Jul 14, 2015, 7:08:06 AM7/14/15
to adwor...@googlegroups.com
Hello,

I am using AWQL in my c# console application to download adwords report which was working fine since a year and suddenly I am getting Exception in downloading report:

Code I am using:

                string reportDate = startDate.ToString("yyyyMMdd");

                string adQuery = "SELECT " +
                                    "CampaignName, AdGroupName, Id " +
                                    "FROM  AD_PERFORMANCE_REPORT " +
                                    "DURING " + reportDate + ", " + reportDate;

                string query = "SELECT " +
                                "CampaignName, AdGroupName, PlacementUrl, MaxCpc, Impressions, Clicks, Conversions, Cost " +
                                "FROM  PLACEMENT_PERFORMANCE_REPORT " +
                                "WHERE AdNetworkType1 = 'CONTENT' " +               // 'CONTENT' indicated only Display Networs
                                "DURING " + reportDate + ", " + reportDate;

                try
                {
                    // Download the report
                    ReportUtilities utilities = new ReportUtilities(user);
                    utilities.ReportVersion = "v201406";
                    utilities.DownloadClientReport(query, DownloadFormat.CSV.ToString(), filePath);
                    utilities.DownloadClientReport(adQuery, DownloadFormat.CSV.ToString(), adFilePath);
                }
                catch (Exception ex)
                {
                    throw new System.ApplicationException("Failed to download report.", ex);  // I am getting exception here
                }


Exception:
System.ApplicationException: Failed to download report. ---> Google.Api.Ads.AdWords.Util.Reports.ReportsException: Report download errors occurred, see errors field for more details. at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReportToStream(String downloadUrl, Nullable`1 returnMoneyInMicros, String postBody, Stream outputStream) in z:\Git\google3\third_party\dotnet_src\adsapi\compile\Util\Reports\ReportUtilities.cs:line 314 at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReportInternal(String downloadUrl, String postBody, Nullable`1 returnMoneyInMicros, String path) in z:\Git\google3\third_party\dotnet_src\adsapi\compile\Util\Reports\ReportUtilities.cs:line 264 at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport(String query, String format, Nullable`1 returnMoneyInMicros, String path) in z:\Git\google3\third_party\dotnet_src\adsapi\compile\Util\Reports\ReportUtilities.cs:line 192 at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport(String query, String format, String path) in z:\Git\google3\third_party\dotnet_src\adsapi\compile\Util\Reports\ReportUtilities.cs:line 170 at AdWordsDataScript.Program.LoadData(DateTime startDate, DateTime endDate) in c:\svn_trainee\AdWords\AdWordsDataScript\AdWordsDataScript\Program.cs:line 741 


Please help me asap as this thing is creating a big delay in taking decisions !

Thanks
Vandita

Reply all
Reply to author
Forward
0 new messages