internal static IReportEngine Get(Utility.Ctx p_ctx, ProcessEngine.ProcessInfo _pi, out int totalRecords, bool IsArabicReportFromOutside)
        {
            IReportEngine re = null;

            Type type = null;

            try
            {
                Assembly asm = Assembly.Load("VARCOMSvc");
                type = asm.GetType("ViennaAdvantage.Classes.ReportFromatWrapper");
                ConstructorInfo cinfo = type.GetConstructor(new Type[] { typeof(Ctx), typeof(string), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int) });
                re = (IReportEngine)cinfo.Invoke(new object[] { p_ctx, _pi.GetTitle(), _pi.GetAD_Process_ID(), _pi.GetTable_ID(), _pi.GetRecord_ID(), 0, 0, _pi.GetAD_PInstance_ID() });



                MethodInfo mInfo = type.GetMethod("Init");
                totalRecords = Convert.ToInt32(mInfo.Invoke(re, new object[] { IsArabicReportFromOutside }));
            }
            catch
            {
                totalRecords = 0;
            }

            return(re);
        }
        /// <summary>
        /// Server Base Class
        /// </summary>
        /// <param name="model"></param>
        /// <param name="initialNap">delay time running in sec</param>
        protected ViennaServer(ViennaProcessor model, int initialNap)

        {
            log    = VLogger.GetVLogger(this.GetType().FullName);
            _model = model;
            _ctx   = new Ctx(model.GetCtx().GetMap());
            if (_system == null)
            {
                _system = MSystem.Get(_ctx);
            }
            _client = MClient.Get(_ctx);
            _ctx.SetContext("#AD_Client_ID", _client.GetAD_Client_ID());
            _initialNap = initialNap;
        }
        internal static IReportEngine Get(Utility.Ctx p_ctx, ProcessEngine.ProcessInfo _pi, bool IsArabicReportFromOutside)
        {
            int i = 0;

            return(Get(p_ctx, _pi, out i, IsArabicReportFromOutside));
        }