Hi All,

There were some other posts which are similar to this but they don't have 
any answer so putting this separate post.

I requested a developer token and got it. 

I am submitting request to download report using v201306 still getting 
error downloading report. I am passing Client Customerid , details etc 
correctly.

{Google.Api.Ads.AdWords.Util.Reports.ReportDownloadError[1]}

{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, 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 ConsoleApplication1.ConsoleExample.Main(String[] args) in 
\\ghosn01b\nerlekma$\My Documents\Visual Studio 
2012\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 157
   --- End of inner exception stack trace ---
   at ConsoleApplication1.ConsoleExample.Main(String[] args) in 
\\ghosn01b\nerlekma$\My Documents\Visual Studio 
2012\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 174}


So I tried sample  in AdWords.Examples.CSharp.OAuth 



I can get the campagins but cannot download the report. Here is the code 
snippet I am using.. Auth is successful...I am redirected to the proper 
sites with buttons accept and reject...




     ConfigureUserForOAuth();           -----------------------------> this 
works fine


      ReportDefinition definition = new ReportDefinition();

      definition.reportName = "Last 7 days CRITERIA_PERFORMANCE_REPORT";
      definition.reportType = 
ReportDefinitionReportType.AD_PERFORMANCE_REPORT;
      definition.downloadFormat = DownloadFormat.CSV;
      definition.dateRangeType = ReportDefinitionDateRangeType.LAST_7_DAYS;

      // Create selector.
      Selector selector = new Selector();
      selector.fields = new string[] { 
          "CampaignId", "AdGroupId", "Id", "CustomerId", "Name" };

      Predicate predicate = 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;

      string filePath = Path.GetTempFileName();

      try {
               
        (user.Config as AdWordsAppConfig).ClientCustomerId = 
txtCustomerId.Text;
        (user.Config as AdWordsAppConfig).DeveloperToken = 
"myDeveloperToken";

        ReportUtilities utilities = new ReportUtilities(user);

         utilities.ReportVersion = "v201306";
         var report =  utilities.DownloadClientReport(definition, false, 
filePath);
      } catch (Exception ex) {
        throw new System.ApplicationException("Failed to download report.", 
ex);
      }


Any help in this would be really appreciated....Sorry if there is already a 
post with this info.

Thanks,
Mahesh

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

--- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to