diff --git a/src/org/openbravo/erpCommon/utility/Utility.java b/src/org/openbravo/erpCommon/utility/Utility.java
--- a/src/org/openbravo/erpCommon/utility/Utility.java
+++ b/src/org/openbravo/erpCommon/utility/Utility.java
@@ -1997,13 +1997,25 @@
    * @param id
    *          The id of the image to display
    * @return The image requested
-   * @see #getImage(String)
    */
   public static byte[] getImage(String id) {
+    return getImage(id, false);
+  }
 
+  /**
+   * Provides the image as a byte array. These images are stored in the table AD_IMAGES as a BLOB
+   * field.
+   * 
+   * @param id
+   *          The id of the image to display
+   * @param doCommit
+   *          A flag to force the commit of the DAL connection which is used to retrieve the image
+   * @return The image requested
+   */
+  private static byte[] getImage(String id, boolean doCommit) {
     byte[] imageByte;
     try {
-      Image img = getImageObject(id);
+      Image img = getImageObject(id, doCommit);
       if (img == null) {
         imageByte = getBlankImage();
       } else {
@@ -2029,9 +2041,22 @@
    * @param id
    *          The id of the image to display
    * @return The image requested
-   * @see #getImage(String)
    */
   public static Image getImageObject(String id) {
+    return getImageObject(id, false);
+  }
+
+  /**
+   * Provides the image as an image object. These images are stored in the table AD_IMAGES as a BLOB
+   * field.
+   * 
+   * @param id
+   *          The id of the image to display
+   * @param doCommit
+   *          A flag to force the commit of the DAL connection which is used to retrieve the image
+   * @return The image requested
+   */
+  private static Image getImageObject(String id, boolean doCommit) {
     Image img = null;
     OBContext.setAdminMode();
     try {
@@ -2040,6 +2065,9 @@
       log4j.error("Could not load image from database: " + id, e);
     } finally {
       OBContext.restorePreviousMode();
+      if (doCommit) {
+        OBDal.getInstance().commitAndClose();
+      }
     }
     return img;
   }
@@ -2054,7 +2082,10 @@
    * @see #getImage(String)
    */
   public static BufferedImage showImage(String id) throws IOException {
-    return ImageIO.read(new ByteArrayInputStream(getImage(id)));
+    // Use getImage(id, true) to close the DAL connection once the image has been retrieved.
+    // This is required to avoid connection leaks when invoking this method from a sub-report.
+    // This is needed until issue https://issues.openbravo.com/view.php?id=30182 is fixed.
+    return ImageIO.read(new ByteArrayInputStream(getImage(id, true)));
   }
 
   /**
