2 messages in com.googlegroups.adwords-apiCustomReportJob problem
FromSent OnAttachments
POCEH28 Jun 2006 10:00 
Richard Jones03 Jul 2006 12:54 
Subject:CustomReportJob problem
From:POCEH (Tes@clickforward.com)
Date:06/28/2006 10:00:29 AM
List:com.googlegroups.adwords-api

I try to read my Report using CustomReportJob but I always receive an empty one. Could anyone help me please?

Here you are my source:

public class DailySpent {

GoooogleReport.ReportService _Rservice;

CustomReportJob _reportjob = new CustomReportJob();

private long _lReportID = 0;

public DailySpent() { _Rservice = _communicator.GetReportService();

DateTime dtYesterDay = DateTime.Now.AddDays(-1);

_dtDay = PackDateTime(dtYesterDay); }

public void Pickup() {

SqlTransaction transaction = null;

try { _reportjob.name = REPORT_NAME;

_reportjob.startDay = _dtDay;

_reportjob.endDay = _dtDay;

_reportjob.aggregationType = AggregationType.Daily;

_reportjob.aggregationTypeSpecified = true;

GoooogleReport.CustomReportOption[] options = new CustomReportOption[] { GoooogleReport.CustomReportOption.Campaign, GoooogleReport.CustomReportOption.Impressions, GoooogleReport.CustomReportOption.Clicks, GoooogleReport.CustomReportOption.Cost, GoooogleReport.CustomReportOption.CampaignStatus, GoooogleReport.CustomReportOption.DailyBudget, GoooogleReport.CustomReportOption.CampaignEndDate, GoooogleReport.CustomReportOption.AveragePosition };

_reportjob.customOptions = options;

_lReportID = _Rservice.scheduleReportJob(_reportjob);

ReportJobStatus oStatus = _Rservice.getReportJobStatus(_lReportID);

while (oStatus != ReportJobStatus.Completed&& oStatus != ReportJobStatus.Failed ) { oStatus = _Rservice.getReportJobStatus(_lReportID); } if(oStatus==ReportJobStatus.Failed) throw new Exception("Google Report Failed!");

string stDownloadUrl = _Rservice.getReportDownloadUrl(_lReportID);

SheduledReportDS dset = GoogleDA.ReadFromXml(stDownloadUrl);

...