protected void chb_chnage(object sender, EventArgs e)
        {
            CheckBox chb  = (CheckBox)sender;
            string   js   = "";
            string   cols = "";

            if (chb.Checked)
            {
                List <USP_getallcolumnsResult> obj = Reportgenrator.Getallcolumns(chb.ToolTip);
                for (int i = 0; i < obj.Count; i++)
                {
                    cols += obj[i].COLUMN_NAME + "~" + obj[i].DATA_TYPE + "~" + obj[i].CHARACTER_MAXIMUM_LENGTH.ToString() + "^";
                }
                if (cols.Length > 0)
                {
                    cols = cols.Substring(0, cols.Length - 1);
                }

                js = "createtable('" + chb.ToolTip + "','" + cols + "');";
                ddlmtables.Items.Add(new ListItem(chb.ToolTip));
            }
            else
            {
                js = "removetable('" + chb.ToolTip + "');";
                ddlmtables.Items.Remove(ddlmtables.Items.FindByText(chb.ToolTip));
            }
            ScriptManager.RegisterStartupScript(Page, GetType(), "js", js, true);
        }
 protected void ddlviews_changed(object sender, EventArgs e)
 {
     ddlselectcolmns.DataSource     = Reportgenrator.Getallcolumns(ddlviews.SelectedItem.Text);
     ddlselectcolmns.DataTextField  = "COLUMN_NAME";
     ddlselectcolmns.DataValueField = "COLUMN_NAME";
     ddlselectcolmns.DataBind();
     ddlcols_change(null, null);
 }