Re: Error Missing Parameter with function DownloadClientReport (v201209)

2012-12-13 Thread Alexander Nitschke
No, email and password are those of your normal login. You have to set the 
CustomerId of the AdwordsUser object before downloading the report, for 
example (in Visual Basic .NET): TryCast(AdWordsUser.Config, 
AdWordsAppConfig).ClientCustomerId = GCustomerId, where AdWordsUser would 
be your user object and GCustomerId is a long variable with the CustomerId 
of the client. And by any means, don't make a new log in for each client, 
just set the CustomerId as described - otherwise you will run into the 
dreaded captcha problem.
.
Best wishes
Alexander

Am Mittwoch, 12. Dezember 2012 15:37:26 UTC+1 schrieb Reinhold Maurus:
>
> Dear Alexander, thanks for the answer. Is there a code example covering 
> this? Does it mean the Download function needs the email and password of 
> each client?

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





Re: Error Missing Parameter with function DownloadClientReport (v201209)

2012-12-12 Thread Reinhold Maurus
Dear Alexander, thanks for the answer. Is there a code example covering 
this? Does it mean the Download function needs the email and password of 
each client?

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





Re: Error Missing Parameter with function DownloadClientReport (v201209)

2012-12-12 Thread Alexander Nitschke
I say you aren't specifying the client. Reporting for multiple clients 
isn't possible anymore with the adhoc reports, so you have to get a report 
for each client (and specify the client of course).

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





Error Missing Parameter with function DownloadClientReport (v201209)

2012-12-11 Thread Reinhold Maurus


I have converted a Keyword Performance Program in MS VS 2008 c# to API 
v201209 and have an error when downloading a report. Error Code: 

ReportDownloadError.MISSING_PARAMETERMissing
 
client 
information 


See attached code snippets. I checked all parameters and they look correct. 
I´m using the Adwords Client lib. v 15.2 for c# and use the MCC 
authentication (AdWordsUser). Does anyone know how to get the parameter 
missing or can anyone help me or knows someone who can debug the error?

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



  // Create a custom AdWordsUser.
  AdWordsUser AdUser = new AdWordsUser(headers);


  ReportDefinition definition = new ReportDefinition();
  definition.reportName = "KEYWORDS_PERFORMANCE_REPORT";
  definition.reportType = 
ReportDefinitionReportType.KEYWORDS_PERFORMANCE_REPORT;
  definition.downloadFormat = DownloadFormat.XML;
  definition.dateRangeType = ReportDefinitionDateRangeType.CUSTOM_DATE;

  Selector reportselector = new Selector();
  
  reportselector.fields = new string[] { 
"AccountDescriptiveName",//CustomerName
"CampaignName",  //Campaign
"AdGroupName",   //AdGroup
"KeywordText"//Keyword
};
  Predicate predicate = new Predicate();
  predicate.field = "Status";
  predicate.@operator = PredicateOperator.IN;
  predicate.values = new string[] { "ACTIVE", "PAUSED" };
  reportselector.predicates = new Predicate[] { predicate };
  definition.selector = reportselector;
  definition.selector.dateRange = new DateRange();

  string sVMonth, sVDay, sEMonth, sEDay;
  if (dtStartDate.Month < 10) { sVMonth = "0" + 
dtStartDate.Month.ToString(); } else { sVMonth = dtStartDate.Month.ToString(); }
  if (dtStartDate.Day < 10) { sVDay = "0" + dtStartDate.Day.ToString(); 
} else { sVDay = dtStartDate.Day.ToString(); }
  if (dtEndDate.Month < 10) { sEMonth = "0" + 
dtEndDate.Month.ToString(); } else { sEMonth = dtEndDate.Month.ToString(); }
  if (dtEndDate.Day < 10) { sEDay = "0" + dtEndDate.Day.ToString(); } 
else { sEDay = dtEndDate.Day.ToString(); }
  definition.selector.dateRange.min = dtStartDate.Year.ToString() + 
sVMonth + sVDay;
  definition.selector.dateRange.max = dtEndDate.Year.ToString() + 
sEMonth + sEDay;

  definition.includeZeroImpressions = true;

  string date1 = definition.selector.dateRange.min, date2 = 
definition.selector.dateRange.max;

  string von = date1.Substring(0, 4) + "_" + date1.Substring(4, 2) + 
"_" + date1.Substring(6, 2);
  string bis = date2.Substring(0, 4) + "_" + date2.Substring(4, 2) + 
"_" + date2.Substring(6, 2);

  string folder = "etc/reports/xml/" + von + "-" + bis;
  System.IO.Directory.CreateDirectory(folder);
  string filename = tmp[0] + ".xml";
  new ReportUtilities(AdUser).DownloadClientReport(definition, folder + 
"/" + filename);