}   //  prepare

        /// <summary>
        /// doit
        /// </summary>
        /// <returns>info</returns>
        protected override string DoIt()
        {
            if (_AD_Table_ID != null && int.Parse(_AD_Table_ID.ToString()) > 0)
            {
                MPrintFormat pf = MPrintFormat.CreateFromTable(GetCtx(), int.Parse(_AD_Table_ID.ToString()), GetRecord_ID());
                AddLog(Utility.Util.GetValueOfInt(_AD_Table_ID.ToString()), null, pf.GetItemCount(), pf.GetName());
                return(pf.GetName() + " #" + pf.GetItemCount());
            }
            else if (_AD_PrintFormat_ID != null && _AD_PrintFormat_ID > 0)
            {
                MPrintFormat pf = MPrintFormat.Copy(GetCtx(), Utility.Util.GetValueOfInt(_AD_PrintFormat_ID.ToString()), GetRecord_ID());
                AddLog(Utility.Util.GetValueOfInt(_AD_PrintFormat_ID.ToString()), null, pf.GetItemCount(), pf.GetName());
                return(pf.GetName() + " #" + pf.GetItemCount());
            }
            else
            {
                throw new Exception(msgInvalidArguments);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Creates the new format
        /// </summary>
        /// <param name="AD_Table_ID">table id</param>
        private void CreateNewFormat(int AD_Table_ID)
        {
            MPrintFormat pf = MPrintFormat.CreateFromTable(Env.GetContext(), AD_Table_ID);

            LaunchReport(pf);
        }       //	createNewFormat