sanjeev roy

sanjeev roy

  • NA
  • 155
  • 9.4k

RDLC error

Jul 27 2022 5:17 AM

Hello, I have a grid view i had viewed grid data on modal pop up . I want get print after click on button in modal popup gridview row details . but i faced this error on rdlc 

  • An error has occurred during report processing.
    • Cannot create a connection to data source 'DataSet2'.
      • The Select operation is not supported by ObjectDataSource 'ObjectDataSource1' unless the SelectMethod is specified
      • Envent on click button ( Print ) 
      • if (RadioButton1.Checked)
                        {

                          
                            //Session["dt1"] = DropDownList1.SelectedItem.Value;
                            Session["dt1"] = lblID.Text.ToString();
                            //Session["dt2"] = TextBox2.Text.ToString();


                            string url = "deliveryCard.aspx";

                            ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "NewWindow", "window.open('" + url + "','_blank','height=760,width=800,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,titlebar=no' );", true); ;

                        }

    • Print >>>

    • private DataSet GetData(object id)
              {
                  String dt1 = Request.QueryString["id"];
                 
                  //String dt1 = Request.QueryString["CreateDate"];
                  //String dt2 = Request.QueryString["CreateDate"];

                  conn.Open();
                  SqlCommand cmd = new SqlCommand("select * from Dyeing.dbo.ViewDeliveryCard WHERE id = '" + dt1 + "'");
                  using (conn)
                  {
                      using (SqlDataAdapter da = new SqlDataAdapter())
                      {
                          cmd.Connection = conn;
                          da.SelectCommand = cmd;
                          DataSet ds = new DataSet();
                          da.Fill(ds);
                          return (ds);
                      }
                  }
              }


Answers (1)