private void LoadReportBodyTables()
        {
            XmlNodeList xmlItems = GetCustomNodeList("DataSetName");

            foreach (XmlNode nod in xmlItems)
            {
                if (!BodyTablesName.Contains(nod.InnerText))
                {
                    BodyTablesName.Add(nod.InnerText);
                }
            }
        }
        private void LoadReportDataSet()
        {
            try
            {
                DsReport.Tables.Clear();
                Fields.Clear();
                XmlNodeList  xmlDataSet   = GetCustomNodeList("DataSet");
                XmlNodeList  ndSearchList = null;
                RDLTable     rtTable      = null;
                RDLParameter sqlParam     = null;
                RDLColumn    ReportColumn = null;

                foreach (XmlNode xmlTable in xmlDataSet)
                {
                    rtTable           = new RDLTable();
                    rtTable.TableName = xmlTable.Attributes["Name"].InnerText;
                    try
                    {
                        rtTable.CommandType = (CommandType)ExtensionMethods.GetEnumValue(typeof(CommandType), xmlTable["Query"]["CommandType"].InnerText);
                    }
                    catch { rtTable.CommandType = CommandType.Text; }
                    //
                    rtTable.CommandText = xmlTable["Query"]["CommandText"].InnerText;
                    //For Parameters
                    try
                    {
                        ndSearchList = xmlTable["Query"]["QueryParameters"].ChildNodes;
                    }
                    catch { ndSearchList = null; }
                    if (ndSearchList != null)
                    {
                        foreach (XmlNode xmlParam in ndSearchList)
                        {
                            sqlParam        = new RDLParameter();
                            sqlParam.Name   = xmlParam.Attributes["Name"].InnerText;
                            sqlParam.Prompt = GetSQLParamField(xmlParam["Value"].InnerText).ToString();
                            rtTable.Parameters.Add(sqlParam);
                        }
                    }
                    //
                    //For Fields
                    try
                    {
                        ndSearchList = xmlTable["Fields"].ChildNodes;
                    }
                    catch { ndSearchList = null; }

                    if (ndSearchList != null)
                    {
                        foreach (XmlNode xmlColumn in ndSearchList)
                        {
                            ReportColumn           = new RDLColumn();
                            ReportColumn.TableName = rtTable.TableName;
                            ReportColumn.Name      = xmlColumn.Attributes["Name"].Value;
                            try
                            {
                                ReportColumn.DataType = xmlColumn["rd:TypeName"].InnerText;
                            }
                            catch
                            {
                                ReportColumn.DataType = "System.Calculate";
                            }
                            //
                            rtTable.Columns.Add(ReportColumn);
                            if (BodyTablesName.Contains(rtTable.TableName))
                            {
                                Fields.Add(ReportColumn);
                            }
                        }
                    }

                    DsReport.Tables.Add(rtTable);
                }
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }