¿En qué podemos ayudarte?
< Todos los temas
Imprimir

Aliquo Report UFL

Se ha desarrollado una librería Aliquo Report UFL que permite incorporar funciones adicionales a Crystal Report, con el fin de facilitar y cubrir una serie de necesidades que resultaban complejas.

A veces, estas necesidades obligaban a los clientes a utilizar componentes de pago, como por ejemplo la generación de códigos de barras Code128 o QR Code. La librería dispone de las siguientes funciones adicionales:

        /// <summary>Get DLL version</summary>
        string Version();

        /// <summary>Get last exception message</summary>
        string LastExceptionMessage();

        /// <summary>Rounds the decimals of a number</summary>
        double RoundDecimals(double value, int decimals);

        /// <summary>Get the number of decimal places of a value</summary>
        int DecimalsNumber(double value, int maxDecimals = 7);

        /// <summary>Get the color integer value of a hexadecimal</summary>
        int ColorFromHex(string hex);
                      
        /// <summary>Change the size in pixels of the image contained in a file</summary>
        /// <returns>returns the file name of the new image</returns>
        string ImageResize(string fileName, int width, int height);

        /// <summary>
        /// Change the size in pixels, resolution and alignment of the image contained in a file.
        /// - Horizontal alignment: 0-left, 1-center, 2-right
        /// - Vertical alignment: 0-top, 1-center, 2-bottom
        /// </summary>
        /// <returns>returns the file name of the new image</returns>
        string ImageAdjust(string fileName, int width, int height, int horizontalAlignment, int verticalAlignment, float resolution);

        /// <summary>Generate a barcode 39 image</summary>
        /// <returns>returns the file name of barcode 39</returns>
        string ImageBarcode39(string value, int width, int height, bool showValue);

        /// <summary>Generate a barcode 128 image</summary>
        /// <returns>returns the file name of barcode 128</returns>
        string ImageBarcode128(string value, int width, int height, bool showValue);

        /// <summary>Generate a barcode 128 image with GS1 format</summary>
        /// <returns>returns the file name of barcode 128</returns>
        string ImageBarcode128GS1(string value, int width, int height, bool showValue);

        /// <summary>Generate a barcode Ean13 image</summary>
        /// <returns>returns the file name of barcode Ean13</returns>
        string ImageBarcodeEan13(string value, int width, int height, bool showValue);

        /// <summary>Generate a barcode QR image</summary>
        /// <returns>returns the file name of barcode QR</returns>
        string ImageBarcodeQR(string value, int width, int height);

Importante: para poder utilizar las funciones se requiere la instalación de la librería en el equipo de diseño y también en el servidor donde se vayan a utilizar.


Ejemplo de Código de barras QR

A continuación se detalla un ejemplo para la creación de un código de barras QR:

1. Insertar una imagen en el Crystal Report y pulsando con el botón derecho del ratón y elegir la opción de Dar formato al gráfico.

2. En la pestaña Imagen, Pulsando con el botón derecho del ratón y elegir la opción de Dar formato al gráfico.

3. En el Editor de fórmulas, se deberá escribir la fórmula para la generación de la imagen del código de barras QR. En la zona de las funciones, se debe desplegar la Funciones adicionales/UFL COM y .NET (u212com.dll) y elegir la función correspondiente.

4. Una vez realizada la fórmula, en la vista previa aparecerá el código de barras QR.

Tabla de contenidos