Monthly Archives: September 2011

Checkboxes in Apex Sql Reports. Alternative to adding checkboxes to reports

A solution to adding checkboxes to reports was presented in the The Complete Guide: Checkboxes in APEX Interactive Reports article. Now, in the current article we present another way that checkboxes can be added in a report. This solution however does not work for an interactive report, so if you need a checkbox in an interactive report then the solution to use is the one in the article mentioned above.

This solution is fairly simple and we would recommended it if you need a report with a checkbox and want to process multiple records of the report at the same time. For example, let's consider that there is a list of comments that need to be moderated, and we want to be able to select multiple records at the same time and set them a certain value: published, deleted, draft, etc. Like we've said before, the solution to do this can become simple. Use the tabular form properties, an "instead of" trigger and context calls to set parameter values. A little blurry? Let us explain ourselves:

Continue reading

Uploading and displaying images in APEX

Uploading images as BLOB columns

To upload an image in a table, first make sure you have created a BLOB column. For example, the table that would store the images could look like this:

CREATE TABLE  "IMAGES"

   ( "ID" NUMBER NOT NULL ENABLE,

   "IMAGE_NAME" VARCHAR2(90) NOT NULL ENABLE,

   "FILENAME" VARCHAR2(400),

   "MIME_TYPE" VARCHAR2(48),

   "DOC_SIZE" NUMBER,

   "CONTENT_TYPE" VARCHAR2(128),

   "CONTENT" BLOB,

    CONSTRAINT "IMAGE_PK" PRIMARY KEY ("ID") ENABLE)

The image will be stored in the CONTENT column of type BLOB. The other columns will be necessary for identifying the image and the MIME type. Multipurpose Internet Mail Extensions (MIME) is an Internet standard that extends the format of email to support Non-text attachments, Message bodies with multiple parts, Text in character sets other than ASCII and Header information in non-ASCII character sets. The MIME type will instruct the web browser how to handle the uploaded image file.

Continue reading