public static IReport createReport(IEnvironment pEnv, ISettings pSettings, string pName, IRowSource pRowSource)
        {
            string sqlNode = pSettings.getStringAttr(pName, attrSql);
            string repNode = pSettings.getStringAttr(pName, attrRep);

            if (sqlNode != string.Empty && repNode != string.Empty)
            {
                string sqlText = pSettings.getString(sqlNode);
                string sqlVars = pSettings.getStringAttr(sqlNode, attrVars);
                if (sqlVars == string.Empty)
                {
                    sqlVars = ToolString.joinList(new string[] { "@lref", TableDUMMY.LOGICALREF });
                }
                string      sqlName = pSettings.getStringAttr(sqlNode, attrName);
                ISqlBuilder builder = new ImplSqlBuilder(pEnv, sqlText, sqlName);
                IDictionary <string, string> dic    = ToolString.explodeForParameters(sqlVars);
                IEnumerator <string>         enumer = dic.Keys.GetEnumerator();
                enumer.Reset();
                while (enumer.MoveNext())
                {
                    builder.addPereparer(
                        new SqlBuilderPreparerObjectSourceFreePar(
                            enumer.Current,
                            new ImplObjectSourceRowCell(pRowSource, dic[enumer.Current])
                            )
                        );
                }
                IPagedSource ps = new ImplPagedSource(pEnv, builder);



                string  repObj = pSettings.getString(repNode);
                IReport xmlRep = new ImplXmlReport(repObj, pEnv);

                xmlRep.setDataSource(ps);


                return(xmlRep);
            }
            return(null);
        }