Hi there,

I'm attempting to generate a report using the sandbox but the job
status seems to be stuck at Pending and not progressing any further.

Please see below for sample code:

        Dim oReportService As New ReportService.ReportService

        'Set up report headers.
        With oReportService
            .emailValue = New email
            .emailValue.Text = New String() {"[email protected]"}
            .passwordValue = New password
            .passwordValue.Text = New String() {"test"}
            .useragentValue = New useragent
            .useragentValue.Text = New String() {"Test"}
            .developerTokenValue = New developerToken
            .developerTokenValue.Text = New String()
{"[email protected]++gbp"}
            .applicationTokenValue = New applicationToken
            .applicationTokenValue.Text = New String() {"TEST"}
        End With

        Dim oDefinedReportJob As New DefinedReportJob

        'Set up defined report job.
        With oDefinedReportJob
            .selectedReportType = "Keyword"
            .name = "Keyword Report"
            .aggregationTypes = New String() {"Daily"}
            .adWordsType = AdWordsType.SearchOnly
            .adWordsTypeSpecified = True
            .keywordType = KeywordType.Exact
            .keywordTypeSpecified = True
            .startDay = New DateTime(2009, 1, 1)
            .endDay = New DateTime(2009, 1, 2)
            .selectedColumns = New String() {"Keyword", "KeywordId",
"KeywordTypeDisplay", "Clicks"}
        End With

        'Validate report. Validating a report job costs only 1 API
unit, whereas a failed call to scheduleReportJob will cost 500 API
units.
        oReportService.validateReportJob(oDefinedReportJob)

        'Schedule report.
        Dim lJobId As Long = oReportService.scheduleReportJob
(oDefinedReportJob)

        'Wait for report to finish.
        Dim oStatus As ReportService.ReportJobStatus =
oReportService.getReportJobStatus(lJobId)
        While oStatus <> ReportJobStatus.Completed And oStatus <>
ReportJobStatus.Failed
            Console.WriteLine("Report job status is " & oStatus & ".")
            Thread.Sleep(30000)
        End While

        If oStatus = ReportJobStatus.Failed Then
            Console.WriteLine("Report job generation failed.")
        Else
            'Download report.
            Dim sUrl As String =
oReportService.getGzipReportDownloadUrl(lJobId)
            Console.WriteLine("Report is available at " & sUrl & ".")
        End If


Am I doing something wrong? Any pointers would be much appreciated.

Many thanks,
Susie
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to