Deben existir diferentes formas de manejar el ancho de columnas en los informes en Oracle APEX 5.1.

En este artículo voy a mostrar dos de ellas. Por ejemplo, tenemos un informe interactivo de la tabla Empleados (EMP):

Y queremos modificar el ancho de la columna Job.

Desde el diseñador de páginas:

  • Seleccionamos la columna JOB
  • En la sección Column Formatting, escribimos el siguiente código HTML en el recuadro de HTML expression:
<span style='width:500px;display:inline-block;'>#JOB#</span>
 
 
 

Consideración: las columnas de tipo link no tienen esa sección en el panel de propiedades, sin embargo, podemos colocar en atributos del link el ancho de la columna que necesitamos:

style='width:300px;display:inline-block;'

La otra forma de controlar el ancho de las columnas es usando un identificador estático de la región del informe interactivo y un identificador estático de columna.

Por ejemplo, coloquemos el identificador estático COLENAMEen la columna ENAME:

 

Lo mismo hacemos en el informe interactivo, seleccionamos Empleados e ingresamos el Static ID como EMP.

Luego hacemos clic en el título de la página e ingresamos en CSS inline la siguiente regla:

#EMP th#COLENAME, #EMP td[headers=COLENAME]{min-width:250px}

 

Ejecutamos la página y podemos ver que la columna de ename se ha modificado por el ancho que le pusimos, además de ver la columna JOB modificada, al punto que ahora se visualiza la barra horizontal de desplazamiento porque las columnas superan el ancho de la región.

Hasta la próxima!

About the Author

Clarisa Maman Orfali

Clarisa is a System Engineer with more than 24 years of experience as a developer, teacher, and consultant in Information Technology. She was a Founder and CEO between 2013 to 2020 at ClarTech Solutions, Inc., a consulting firm specializing in Oracle APEX and Open Source technologies. Clarisa entered the world of Oracle technologies in 2009. After a few years, she discovered the power of application development with Oracle Application Express (APEX) and specialized in that area. Clarisa is from Argentina, and she is living and working in Irvine, California, in the United States. She's also a Co-Founder of the Argentina Oracle User Group (AROUG). In addition, she had actively participated in large and popular events such as the OTN Tour Argentina and Oracle APEX Tour Latin America after called Oracle Developer Tour. She's also authored the first three Spanish books about Oracle Application Express and recorded and published several Online Video Courses. She has a great passion for Oracle technologies and wants to expand that passion and influence, transferring her knowledge and experience to the entire Latin American and worldwide Oracle communities. You can always contact her through her Twitter account (@Clari707). Clarisa loves spending time with her family by enjoying outdoor activities with her two adored children, Melanie and Nicolas, as well as hanging out with her friends. Also, she loves traveling with her husband Julio worldwide and to takes new challenges at every moment of her life.

Start the discussion at forums.toadworld.com