} // 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); } }