private void f_ReportLoad()
        {
            try
            {
                string p           = Server.MapPath("rdlcreport");
                string strccontact = "";
                objAsset.nid        = getchkval(dropAsset);
                objAsset.CategoryID = getchkval(dropCategory);
                objAsset.department = getchkval(dropDepartment);
                objAsset.companyId  = Session["companyid"].ToString();
                objAsset.action     = "select";
                ds = objAsset.ReportAsset();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    divnodata.Visible = false;
                    divreport.Visible = true;
                    ReportViewer1.LocalReport.ReportPath = p + "\\Asset\\rpt_AssetByDepartment.rdlc";
                    ReportParameter[] param = new ReportParameter[3];
                    param[0] = new ReportParameter("companyname", Session["companyname"].ToString(), true);
                    param[1] = new ReportParameter("companyaddress", Session["companyaddress"].ToString(), true);
                    if (ds.Tables[1].Rows.Count > 0)
                    {
                        if (ds.Tables[1].Rows[0]["phone"].ToString() != "")
                        {
                            strccontact += "Tel: " + ds.Tables[1].Rows[0]["phone"].ToString() + " ";
                        }
                        if (ds.Tables[1].Rows[0]["fax"].ToString() != "")
                        {
                            strccontact += "Fax: " + ds.Tables[1].Rows[0]["fax"].ToString() + " ";
                        }
                        if (ds.Tables[1].Rows[0]["email"].ToString() != "")
                        {
                            strccontact += "<br/>" + ds.Tables[1].Rows[0]["email"].ToString() + " ";
                        }
                        if (ds.Tables[1].Rows[0]["website"].ToString() != "")
                        {
                            strccontact += "<br/>" + ds.Tables[1].Rows[0]["website"].ToString() + " ";
                        }
                    }
                    //string strvalue = "";
                    //strvalue = "taskCode,taskname,description,costrate,isbillable,isReimb,MuRate,tax,";
                    param[2] = new ReportParameter("companyphone", strccontact, true);
                    //param[3] = new ReportParameter("SelectColumn", strvalue, true);


                    ReportDataSource rds1 = new ReportDataSource("DataSet1", ds.Tables[0]);
                    this.ReportViewer1.LocalReport.DataSources.Clear();
                    this.ReportViewer1.LocalReport.EnableExternalImages = true;
                    this.ReportViewer1.LocalReport.DataSources.Add(rds1);
                    this.ReportViewer1.LocalReport.SetParameters(param);
                    this.ReportViewer1.LocalReport.Refresh();
                    ReportViewer1.LocalReport.DisplayName = "Asset Report";
                    divreport.Visible = true;
                    divnodata.Visible = false;
                }
                else
                {
                    divreport.Visible = false;
                    divnodata.Visible = true;
                }
            }
            catch (Exception ex)
            {
            }
        }
 private void f_ReportLoad()
 {
     try
     {
         string p           = Server.MapPath("rdlcreport");
         string strccontact = "";
         objAsset.department = getchkval(dropDepartment);
         objAsset.companyId  = Session["companyid"].ToString();
         objAsset.CategoryID = getchkval(dropAssetsCategory);
         objAsset.nid        = getchkval(dropAssets);
         //objAsset.currentLocation = getchkval(dropLocation);
         objAsset.action = "select";
         ds = objAsset.ReportAsset();
         if (ds.Tables[0].Rows.Count > 0)
         {
             divnodata.Visible = false;
             divreport.Visible = true;
             ReportViewer1.LocalReport.ReportPath = p + "\\Asset\\AssetManagement.rdlc";
             ReportParameter[] param = new ReportParameter[3];
             param[0] = new ReportParameter("companyname", Session["companyname"].ToString(), true);
             param[1] = new ReportParameter("companyaddress", Session["companyaddress"].ToString(), true);
             if (ds.Tables[1].Rows.Count > 0)
             {
                 if (ds.Tables[1].Rows[0]["phone"].ToString() != "")
                 {
                     strccontact += "Tel: " + ds.Tables[1].Rows[0]["phone"].ToString() + " ";
                 }
                 if (ds.Tables[1].Rows[0]["fax"].ToString() != "")
                 {
                     strccontact += "Fax: " + ds.Tables[1].Rows[0]["fax"].ToString() + " ";
                 }
                 if (ds.Tables[1].Rows[0]["email"].ToString() != "")
                 {
                     strccontact += "<br/>" + ds.Tables[1].Rows[0]["email"].ToString() + " ";
                 }
                 if (ds.Tables[1].Rows[0]["website"].ToString() != "")
                 {
                     strccontact += "<br/>" + ds.Tables[1].Rows[0]["website"].ToString() + " ";
                 }
             }
             param[2] = new ReportParameter("companyphone", strccontact, true);
             ReportDataSource rds1 = new ReportDataSource("DataSet1", ds.Tables[0]);
             this.ReportViewer1.LocalReport.DataSources.Clear();
             this.ReportViewer1.LocalReport.EnableExternalImages = true;
             this.ReportViewer1.LocalReport.DataSources.Add(rds1);
             this.ReportViewer1.LocalReport.SetParameters(param);
             this.ReportViewer1.LocalReport.Refresh();
             ReportViewer1.LocalReport.DisplayName = "Client Master File";
             divreport.Visible = true;
             divnodata.Visible = false;
         }
         else
         {
             divreport.Visible = false;
             divnodata.Visible = true;
         }
     }
     catch (Exception ex)
     {
     }
 }