title: How to print multiple reports using ASP.NET GridView, RDLC?
body: <p>I want to print reports based on GridView checkbox. If 3 rows have been chosen, there should be 3 reports. My code is like this...</p>
  
  <pre><code>protected void btn_Print_Click(object sender, EventArgs e)
      {
          if (IsPostBack)
          {
              try
              {
                  foreach (GridViewRow gvr in grdRV.Rows)
                  {
                      RadioButton rbID = (RadioButton)gvr.FindControl("rbID") as RadioButton;
  
                      if (rbID != null &amp;&amp; rbID.Checked)
                      {
                          string sID = grdRV.DataKeys[gvr.RowIndex].Value.ToString().Trim();
  
                          if (rbl_Print.SelectedValue == "0")
                          {
                              SMTP(sID);
                          }
                          else if (rbl_Print.SelectedValue == "1")
                          {
                              Material(sID);
                          }
                      }
                   }
              }
              catch (Exception ex)
              {
                  Session["error"] = ex.Message;
                  Response.Redirect("MessageBoard.aspx");
              }
          }
      }
  
  private void Material(string sID)
      {            
  
          string querystring = "../pmis/Reports/RptRFQMatV.aspx?RFQNo=" + lblRFQNo.Text.ToString() + "&amp;ID=" + sID;
  
          Random r = new Random();            
          string Script = "";
          Script += "&lt;script language=JavaScript id='PopupWindow'&gt;";
          Script += "confirmWin = window.open(' " + querystring + "','" + r.Next() + "','scrollbars=yes,resizable=1, width=960,height=500,left=50,top=130,status');";
          Script += "confirmWin.Setfocus()&lt;/script&gt;";
  
          //ClientScript.RegisterStartupScript(typeof(string), "PopupScript", "PopupWindow");
          if (!ClientScript.IsClientScriptBlockRegistered("PopupWindow"))
              ClientScript.RegisterClientScriptBlock(typeof(string), "PopupWindow", Script);
      }
  </code></pre>
  
  <p>...but currently this code can print report the last row only.</p>