I'm trying to run a keyword report with the code below (production,
not sandbox). The report runs and finishes, but the url it returns
points to an xml file with headers, zero totals and no data. It also
shows up as a completed report in the report center, but, again, it's
empty in the viewer.
If I run the same report through the report center it works fine.
What am I missing?
thanks
----------------------------------------------------------------------------------------------
// Get the service.
ReportService service =
(ReportService) user.getService("ReportService");
// Create the report job.
KeywordReportJob reportJob = new KeywordReportJob();
// Set the aggregation period.
reportJob.aggregationType = AggregationType.Daily;
reportJob.aggregationTypeSpecified = true;
// Set the start and end dates for this report.
reportJob.endDay = DateTime.Today; // defaults to today
reportJob.startDay = new DateTime(2007, 1, 1);
// Name this report job.
reportJob.name = "Keyword Report";
// Submit the request for the report
long jobId = service.scheduleReportJob(reportJob);
----------------------------------------------------------------------------------------------