none
how to call rdl from report viewer C# 2.0 RRS feed

  • Question

  • Hi all,

    I done with UserInterface that inclue "ViewReport" button. At ViewReport event I call reportviewer. The problem is that I dont know how to call my rdl files via reportviewer in localmode.

      public void Gen_Report()
      {
        Hashtable ht = new Hashtable();
          System.Collections.Specialized.NameValueCollection objQS = new System.Collections.Specialized.NameValueCollection();
          objQS = Request.QueryString;
          for (int i = 0; i <= objQS.Count - 1; i++)
          {        
            ht.Add(objQS.GetKey(i).ToString(), objQS.Get(i).ToString());        
          }
        
    
        //-------------------------------------------------------------------------------
    
        try
        {  
          RpVier_.ProcessingMode = ProcessingMode.Remote;
          RpVier_.ServerReport.ReportServerUrl = new System.Uri("http://121.0.0.1/reportserver");
          RpVier_.ServerReport.ReportPath = "/Reports/" + Request.QueryString["rp"];
    
    
          //-------------------------------------------------------------------------------------
    
          string Cocode = "";
          string Database = "";
          int a = 2;
    
          Cocode = Session["sComCode"].ToString();
          Database = Get_base_name();
    
          if (Cocode.Trim() == "" || Cocode == null)
          {
            Cocode = Request.QueryString["sComCode"].Trim();
            a--;
          }
    
    
    Upper code doesnot work. is there any simple and best way to do that. I m new to ssrs and report viewer. Any suggestion would be appeciated. Thanks.

    Monday, July 25, 2011 3:34 AM

All replies