Hi all,

There is no data present in the report download url . We are using the
following code:

namespace GoogleAPI
{
    public class ScheduleReport
    {
        // Provide AdWords login information.
        private static String email = "login email";
        private static String password = "password";
        private static String clientEmail = "xxxxxxxx";
        private static String useragent =
            "Channel Clarity: AdWords API DotNet Sample Code";
        private static String developerToken = "xxxxxxxxxxxxx";
        private static String applicationToken =
            "xxxxxxxxxxxxxxxxxxxxxx";

        public static void Main()
        {
            try
            {
                // Set up service connection.
                ReportService service = new ReportService();

                // Define SOAP headers.
                service.emailValue = new email();
                service.emailValue.Text = new String[] { email };
                service.passwordValue = new password();
                service.passwordValue.Text = new String[]
{ password };
                service.clientCustomerIdValue = new
clientCustomerId();
                service.clientCustomerIdValue.Text = new String[]
{ clientEmail };
                service.useragentValue = new useragent();
                service.useragentValue.Text = new String[]
{ useragent };
                service.developerTokenValue = new developerToken();
                service.developerTokenValue.Text = new String[]
{ developerToken };
                service.applicationTokenValue = new
applicationToken();
                service.applicationTokenValue.Text = new String[]
{ applicationToken };

                // Create report job structure.
                DefinedReportJob job = new DefinedReportJob();
                job.selectedReportType = "Url";
                job.name = "Sample Keyword Report";
                job.aggregationTypes = new String[] { "Daily" };
                //job.adWordsType = AdWordsType.SearchOnly;
                //job.keywordType = KeywordType.
                job.startDay = new DateTime(2010, 3, 7);
                job.endDay = new DateTime(2010, 3, 8);
            //    job.selectedColumns = new String[] {"Campaign",
"AdGroup", "Keyword",
            //"KeywordStatus", "KeywordMinCPC",
            //"KeywordDestUrlDisplay", "Impressions", "Clicks", "CTR",
            //"AveragePosition"};
                job.selectedColumns = new String[] { "Keyword",
"KeywordTypeDisplay", "Clicks", "DestinationURL", "Cost" };

                // Validate report.
                try
                {
                    service.validateReportJob(job);

                    // Schedule report.
                    long jobId = service.scheduleReportJob(job);

                    // Wait for report to finish.
                    ReportJobStatus status =
service.getReportJobStatus(jobId);
                    while (status != ReportJobStatus.Completed &&
                        status != ReportJobStatus.Failed)
                    {
                        Console.WriteLine(
                            "Report job status is \"" + status +
"\".");
                        Thread.Sleep(30000);
                        status = service.getReportJobStatus(jobId);
                    }

                    if (status == ReportJobStatus.Failed)
                    {
                        Console.WriteLine("Report job generation
failed.");
                        System.Environment.Exit(0);
                    }

                    // Download report.
                    String url = service.getReportDownloadUrl(jobId);
                    Console.WriteLine("Report is available at \"" +
url + "\".");
                }
                catch (SoapException e)
                {
                    Console.WriteLine(
                        "Report job failed validation due to the
following error: \""
                        + e.Message + "\".");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

Can any one please let me know where I am doing wrong?
Thanks in advance...

Vishnu

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Have you migrated to v200909 yet?
The v13 sunset is on April 22, 2010.

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

To unsubscribe from this group, send email to 
adwords-api+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to