M
Magnus
I want to generate a report and display it as a pdf in a WebForm
(RptForm). To generate the report I need to pass some (sometimes a lot
of) parameters from a WebForm (WebForm1).
The report looks fine when I use Response.BinaryWrite to create it:
oStream = (MemoryStream)oRpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(oStream.ToArray());
Response.End();
The problem I have is that once I have created the pdf with
BinaryWrite I want the back button in the browser to send me back to
WebForm1. But the back button will send me back to the page that
called WebForm1. If I view the report without creating a pdf the back
button works fine.
Since the parameter string is sometimes too long for a
Request.QueryString I use Server.Transfer() to pass the parameters to
the ReportForm:
//ReportForm
WebForm1 sourcePage = (WebForm1)Context.Handler;
string param = sourcePage.param;
It's OK to open the RptForm in a new browser window. But how can I get
my paramer string passed to that new window when I can't use
Request.QueryString?
/Magnus
(RptForm). To generate the report I need to pass some (sometimes a lot
of) parameters from a WebForm (WebForm1).
The report looks fine when I use Response.BinaryWrite to create it:
oStream = (MemoryStream)oRpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(oStream.ToArray());
Response.End();
The problem I have is that once I have created the pdf with
BinaryWrite I want the back button in the browser to send me back to
WebForm1. But the back button will send me back to the page that
called WebForm1. If I view the report without creating a pdf the back
button works fine.
Since the parameter string is sometimes too long for a
Request.QueryString I use Server.Transfer() to pass the parameters to
the ReportForm:
//ReportForm
WebForm1 sourcePage = (WebForm1)Context.Handler;
string param = sourcePage.param;
It's OK to open the RptForm in a new browser window. But how can I get
my paramer string passed to that new window when I can't use
Request.QueryString?
/Magnus