Vista previa formato entrega desde SDK

Estimados colegas
Les comparto la solución que encontré después de muchas pruebas.

  1. En el OnCustomInitialize asigno el ReportType al formulario, con base al tipo de transacción donde necesito visualizar el crystal. Los valores están almacenados en la tabla RTYP, donde puedo crear nuevos tipos mediante el objeto ReportTypesService y ReportLayoutsService
SAPbouiCOM.Form formActual = (SAPbouiCOM.Form)this.UIAPIRawForm;
formActual.ReportType = "PKG1";
  1. Habilito el evento LayoutKeyBefore para enviar el DocEntry al formato de crystal
        private void Form_LayoutKeyBefore(ref SAPbouiCOM.LayoutKeyInfo eventInfo, out bool BubbleEvent)
        {
            BubbleEvent = true;
            try
            {
                eventInfo.LayoutKey = ((SAPbouiCOM.EditText)this.GetItem("txtEntrega").Specific).Value;
            }
            catch (Exception ex)
            {
                BubbleEvent = false;
                StackTrace stackTrace = new StackTrace();
                gestionarExcepcion(ex, stackTrace);
            }
            
        }

Saludos,
Andres Ramirez Jaramillo :colombia:

5 Me gusta