cURL / Mailing Lists / curl-users / Single Mail

curl-users

Downloading a report from reporting services using curl

From: Amit Valia <amitvalia_at_yahoo.com>
Date: Wed, 23 Feb 2011 14:26:57 -0800 (PST)

I'm trying to use CURL download reports from the reporting services URL.

I can pass all the parameters of the report directly in the URL such
that I can download that report into a PDF doc
(...&rs:Format=PDF&Manager=XXX&Portfolio=XXXX&CurrentReportDate=12/31/2010).
When I type that URL straight into the browser, it immediately prompts
me to open or save the PDF file.

But when I pass this URL through cURL, it gives me an error.

My output file shows me the following.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request</h2>
<hr><p>HTTP Error 400. The request is badly formed.</p>
</BODY></HTML>

Is CURL not suitable for such requests?

I've been using wget but it is not working with the SQL server 2008
R2. Hence I was testing to see if cURL will.

Here's the command.

I:\Reports>curl -u user:pwd -o "test.pdf" "http://xxxx/reportserver?/folder/xxxxxxxxStatement&rs:Format=PDF&Manager=XXX&Portfolio=1111&CurrentReportDate=12/31/2010 12:00:00 AM&PreviousReportDate=12/31/2009 12:00:00 AM"

I'd really appreciate if you could help me.

Thank you.
Amit Valia

      
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-24