/// <summary>
        /// Archieve Reports data
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="AD_Process_ID"></param>
        /// <param name="Name"></param>
        /// <param name="AD_Table_ID"></param>
        /// <param name="Record_ID"></param>
        /// <param name="C_BPartner_ID"></param>
        /// <param name="isReport"></param>
        /// <param name="binaryData"></param>
        /// <param name="reportPath"></param>
        /// <returns></returns>
        public static bool ArchiveDoc(Ctx ctx, int AD_Process_ID, string Name, int AD_Table_ID, int Record_ID, int C_BPartner_ID, bool isReport, byte[] binaryData, string reportPath)
        {
            MArchive archive = new MArchive(ctx, 0, null);

            archive.SetName(Name);
            archive.SetIsReport(isReport);
            archive.SetAD_Process_ID(AD_Process_ID);
            archive.SetAD_Table_ID(AD_Table_ID);
            archive.SetRecord_ID(Record_ID);
            archive.SetC_BPartner_ID(C_BPartner_ID);

            if (!string.IsNullOrEmpty(reportPath))
            {
                string path = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath + reportPath;
                if (File.Exists(path))
                {
                    binaryData = File.ReadAllBytes(path);
                    archive.SetBinaryData(binaryData);
                }
            }

            if (binaryData != null)
            {
                archive.SetBinaryData(binaryData);
            }

            bool res = archive.Save();

            return(res);
        }
        public static bool ArchiveDoc(Ctx ctx, int AD_Process_ID, string Name, int AD_Table_ID, int Record_ID, int C_BPartner_ID, bool isReport, byte[] binaryData)
        {
            MArchive archive = new MArchive(ctx, 0, null);

            archive.SetName(Name);
            archive.SetIsReport(isReport);
            archive.SetAD_Process_ID(AD_Process_ID);
            archive.SetAD_Table_ID(AD_Table_ID);
            archive.SetRecord_ID(Record_ID);
            archive.SetC_BPartner_ID(C_BPartner_ID);
            archive.SetBinaryData(binaryData);
            return(archive.Save());
        }