I think this is the error I am getting while downloading campaign performance report or keyword performance 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, Boolean returnMoneyInMicros, String postBody, Stream outputStream)
at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReportInternal(String downloadUrl, String postBody, Boolean returnMoneyInMicros, String path)
at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T reportDefinition, Boolean returnMoneyInMicros, String path)
at Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadClientReport[T](T reportDefinition, String path)
at Adwords.GetAdwords.DownloadReportFromAdwords(AdWordsUser user, AdsOAuthProviderForApplications oAuth2Provider) in \\ghosn01b\nerlekma$\My Documents\Visual Studio 2012\Projects\Adwords\AdWords\GetAdwords.cs:line 178
and here is the code I am using for it...
ReportDefinition definition = CreateReportDefinition();
user.OAuthProvider = oAuth2Provider;
//loop through all the accounts we got from database ga_config and download a file for each account.
for (int i = 0; i < NoOfAccounts; i++)
{
(user.Config as AdWordsAppConfig).ClientCustomerId = AccountIds[i].ToString();
fileName = AccountIds[i].ToString(); //+ "_" + DateTime.Today.AddDays(Convert.ToInt16(-1)).ToString("yyyy-MM-dd");
filePath = downloadFolderPath + "\\" + fileName;
try
{
(user.Config as AdWordsAppConfig).DeveloperToken = Properties.Settings.Default.DeveloperToken;
ReportUtilities utilities = new ReportUtilities(user);
utilities.User.OAuthProvider = oAuth2Provider;
utilities.ReportVersion = "v201306";
utilities.DownloadClientReport(definition, filePath);
Console.WriteLine("Report was downloaded to '{0}'.", filePath);
}
catch (Exception ex)
{
Console.WriteLine("Error: Failed to download report. Account ID : {0}. Error: {1}", fileName, ex);
}
FileInfo fileToDecompress = new FileInfo(filePath);
if (fileToDecompress.Exists)
{
Decompress(fileToDecompress);
fileToDecompress.Delete();
}
Let me know if you can help.