Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using HttpWebRequest to view reports

Status
Not open for further replies.

fegdvbna22

Programmer
Aug 9, 2006
52
GB
I am using HttpWebRequest to view my reports (see code below). However, I need to be able to pass parameters to the report in the code, and if possible show graphs as well. Does anybody know how to do this?



protected void Page_Load(object sender, EventArgs e)

{

// Create a request for the URL.

WebRequest request = WebRequest.Create("
// If required by the server, set the credentials.

request.Credentials = CredentialCache.DefaultCredentials;

// Get the response.

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

// Display the status.

//Console.WriteLine(response.StatusDescription);

// Get the stream containing content returned by the server.

Stream dataStream = response.GetResponseStream();

// Open the stream using a StreamReader for easy access.

StreamReader reader = new StreamReader(dataStream);

// Read the content.

string responseFromServer = reader.ReadToEnd();

// Display the content.

Response.Write(responseFromServer);

// Cleanup the streams and the response.

reader.Close();

dataStream.Close();

response.Close();

}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top