Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to open a crystal report in a new window?

How to open a crystal report in a new window?

Scheduled Pinned Locked Moved ASP.NET
helpdatabasesysadmintutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hari_1010
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • H Hari_1010

      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

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      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

      H 1 Reply Last reply
      0
      • N N a v a n e e t h

        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

        H Offline
        H Offline
        Hari_1010
        wrote on last edited by
        #3

        Hi Navaneeth, Thanks a lot for your kindly help. It's working fine now. Regards, Hariharan C

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups