How to open a crystal report in a new window?
-
Hi, I would like to open a crystal report in a new window by passing two query strings. The code i am using as of now is as follows, protected void btnShowReport_Click(object sender, EventArgs e) { .. .. .. .. Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format); } Could anyone help me on this above issue. Many thanks in advance. Thanks and Regards, Hariharan C
-
Hi, I would like to open a crystal report in a new window by passing two query strings. The code i am using as of now is as follows, protected void btnShowReport_Click(object sender, EventArgs e) { .. .. .. .. Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format); } Could anyone help me on this above issue. Many thanks in advance. Thanks and Regards, Hariharan C
Hari_1010 wrote:
Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format);
This won't open in a new window. Try the following one
string url = "ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format;
ClientScript.RegisterClientScriptBlock(this.GetType(),"NewWindow",
string.Format("window.open (\"{0}\",\"mywindow\")",url),true);All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
Hari_1010 wrote:
Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format);
This won't open in a new window. Try the following one
string url = "ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format;
ClientScript.RegisterClientScriptBlock(this.GetType(),"NewWindow",
string.Format("window.open (\"{0}\",\"mywindow\")",url),true);All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions