I created an application that will run sql scripts based on user selection in C#. When a user user gets to the page they see the chart as the "new state"(please see attached photo). After they make a selection the cells in columns Dataset 1 and Dataset 2 are filled with averages. When I hit my print button, instead of the print out showing the page in its "current state" (see second attached photo) it instead prints it out as though the user has made no selections, however the .net page retains the information that the user selected. How do I print out the page in its current state.
EditedHere is my code for print
System.Web.HttpResponse Response = System.Web.HttpContext.Current.Response;
try
{
// create an API client instance
pdfcrowd.Client client = new pdfcrowd.Client("userid", "appID");
// convert a web page and write the generated PDF to a memory stream
MemoryStream Stream = new MemoryStream();
client.convertURI("http://www.somelinksomewhere.com", Stream);
client.setPageWidth("8.5in");
// set HTTP response headers
Response.Clear();
Response.AddHeader("Content-Type", "application/pdf");
Response.AddHeader("Cache-Control", "max-age=0");
Response.AddHeader("Accept-Ranges", "none");
Response.AddHeader("Content-Disposition", "attachment; filename=my_nonworking.pdf");
// send the generated PDF
Stream.WriteTo(Response.OutputStream);
Stream.Close();
Response.Flush();
Response.End();
}
catch (pdfcrowd.Error idunno)
{
Response.Write(idunno.ToString());
}