Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am new to Crystal reports. This is my code I already use to open crystal report in a new window
C#
string url = " ./Reports/ReportQuotationDetails.aspx?ID=" + IndexID.ToString();
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "NewWindow", "window.open('" + url + "','_blank','height=600,width=900,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,titlebar=no' );", true);


SQL
But I want to know how to open Crystal Report in a new tab within the same browser. How can I do that?
Posted
Comments
KaushalJB 20-May-14 6:10am    
Where is your .rpt file displayed on ReportQuotationDetails.aspx page ??

I think you are displaying report in a WebPage and you need to open it in a new tab.

if so pls call this from which page you you need to open the report page.

XML
String  s= "<SCRIPT language='javascript'>" + " window.open('" + sPgName + "')</SCRIPT>";
            if(!this.Page.ClientScript.IsStartupScriptRegistered("OpenWindo"))
                this.RegisterStartupScript("OpenWindo", s);

sPgName is your repot page name
 
Share this answer
 
yes i'm displaying report in a Web Page and i want to open it in a new tab.thank you very much but it didn't working...
i think sadly it depends on the browser settings...
thank you again your time...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900