Sign Up

Hey, Dev!
Are you looking for a forum full of active developers to help you?
So if you want to:
➡️ Get answers for your development issues
➡️ Help others
➡️ Write an article
➡️ Get rewarded for your active participation
Then this place is just for you and it is 100% FREE.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

OrclQA.Com

OrclQA.Com Logo OrclQA.Com Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Blog
  • New Questions
  • Tutorials
    • Oracle
    • Oracle Apex
    • Python
  • Tags
  • Users
  • Badges & Points
  • About
Home/Questions/Q 266
In Process
pavlos
pavlos

pavlos

  • 21 Questions
  • 71 Answers
  • 0 Best Answers
  • 205 Points
View Profile
  • 1
pavlosProfessional
Asked: August 25, 20202020-08-25T02:09:44+05:30 2020-08-25T02:09:44+05:30

Oracle Apex: Displaying Blob file in card report

  • 1

Hi! How to display image from table in card report. I created card report, but when I add blob file into sql query I get [datatype] instead of image. I tried to find solution, but I couldn't. Thanks in advance!

oracleoracle apexquestionsql
  • 11
  • 1k
  • 0
  • 0
  • Share
    • Share on Facebook
    • Share on Twitter
Answer

    11 Answers

    1. Vinish

      Vinish

      • 1 Question
      • 473 Answers
      • 46 Best Answers
      • 2k Points
      View Profile
      Vinish Legendary
      2020-08-25T06:35:48+05:30Added an answer on August 25, 2020 at 6:35 am
      This answer was edited.

      In Oracle Apex, take the BLOB column as length using the dbms_lob.getlength() function instead of directly picking the column for your report query. For example:

      Select product_id, sys.dbms_lob.getlength(product_image) product_image
          from demo_product_info;

      Now set the report column PRODUCT_IMAGE properties as shown in the below image: Oracle Apex: Interactive Report BLOB column property settings. The primary key column must be set.

      Instead of PRODUCT_IMAGE column name, maybe you have to set alias as CARD_TEXT or CARD_SUBTEXT. That you can check.

      Also, If you have the filename, mime type columns in your table, then you should specify it in the above settings, but they are optional.

      Let me know if still any issues.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
      • pavlos

        pavlos

        • 21 Questions
        • 71 Answers
        • 0 Best Answers
        • 205 Points
        View Profile
        pavlos Professional
        2020-08-25T14:33:06+05:30Replied to answer on August 25, 2020 at 2:33 pm
        This answer was edited.

        Thank you for response Vinish! Now, I get image like in screenshot below. 

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
        • Vinish

          Vinish

          • 1 Question
          • 473 Answers
          • 46 Best Answers
          • 2k Points
          View Profile
          Vinish Legendary
          2020-08-25T14:43:54+05:30Replied to answer on August 25, 2020 at 2:43 pm

          The method I suggested above is tested and works fine.

          Can you show me your query? Or tell me what alias you defined for the image column?

          • 0
          • Share
            Share
            • Share on Facebook
            • Share on Twitter
          • pavlos

            pavlos

            • 21 Questions
            • 71 Answers
            • 0 Best Answers
            • 205 Points
            View Profile
            pavlos Professional
            2020-08-25T15:01:32+05:30Replied to answer on August 25, 2020 at 3:01 pm
            This answer was edited.

            I use different table, but query is similar like Your, I use "CARD_TITILE" for image column .

            Select product_id, 
                   sys.dbms_lob.getlength(product_image) "CARD_TITLE"
            from demo_product_info;
            
            Why screenshot which I posted is low quality?
            • 0
            • Share
              Share
              • Share on Facebook
              • Share on Twitter
            • Vinish

              Vinish

              • 1 Question
              • 473 Answers
              • 46 Best Answers
              • 2k Points
              View Profile
              Vinish Legendary
              2020-08-25T15:20:16+05:30Replied to answer on August 25, 2020 at 3:20 pm

              Your SQL query seems ok, perhaps you should check if the BLOB data in the column is not empty.

              You can run this query into SQL developer or in any other tool to check if the length of the BLOB column is greater than 0.

              By looking at your image, it seems, that the BLOB data is not an image file, it is PDF or something, you have to confirm the BLOB data content by opening in any tools like Toad or SQL Developer.

              Also, check if you defined the BLOB attributes correctly as I shared in the above image.

              For the image quality, maybe you didn't define the size of the image that is why.

              I have also changed my query for CARD_TITLE and it shows the data image correctly.

              Oracle Apex: Display image in the CARD Layout report.

              • 0
              • Share
                Share
                • Share on Facebook
                • Share on Twitter
    2. pavlos

      pavlos

      • 21 Questions
      • 71 Answers
      • 0 Best Answers
      • 205 Points
      View Profile
      pavlos Professional
      2020-08-27T02:31:07+05:30Added an answer on August 27, 2020 at 2:31 am
      This answer was edited.

      Sorry for late answer.

      You are right, when I try with demo table it works.

      This application is on apex.oracle.com, and I think that I can't use SQL Developer for this app. Correct me if I am wrong.

      can I update table column with blob datatype through - SQL Workshop/SQL Commands on apex.oracle.com? I tried but it seems that column is empty.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
      • Vinish

        Vinish

        • 1 Question
        • 473 Answers
        • 46 Best Answers
        • 2k Points
        View Profile
        Vinish Legendary
        2020-08-27T06:10:16+05:30Replied to answer on August 27, 2020 at 6:10 am

        If apex.oracle.com hosting is paid, then you can access it using any other database tools by using the database credentials.

        But you can do one thing, create a temporary report and dialog form through the wizard for the table you want to update or add new blob data.

        Through wizard it will create blob item as file browse in the dialog form, there you would be able to upload new images easily.

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
    3. DAVIE

      DAVIE

      • 0 Questions
      • 2 Answers
      • 0 Best Answers
      • 30 Points
      View Profile
      DAVIE Contributor
      2021-01-16T12:30:38+05:30Added an answer on January 16, 2021 at 12:30 pm

      hello am, also having related issue
      my page displays no data

      here is my query

      select
      PROP_LOCATION_NM CARD_TEXT,
      PROP_LOCATION_CD CARD_SUBTITLE,
      PROP_LOCATION_REGION CARD_SUBTEXT,
      decode(nvl(dbms_lob.getlength(PROP_LOCATION_IMAGE),0),0,null,'') "CARD_TITLE"
      from WADOMASS_PROP_ADRESS;

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
      • DAVIE

        DAVIE

        • 0 Questions
        • 2 Answers
        • 0 Best Answers
        • 30 Points
        View Profile
        DAVIE Contributor
        2021-01-16T12:31:37+05:30Replied to answer on January 16, 2021 at 12:31 pm

        can anyone assist please

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
      • Vinish

        Vinish

        • 1 Question
        • 473 Answers
        • 46 Best Answers
        • 2k Points
        View Profile
        Vinish Legendary
        2021-01-16T15:51:44+05:30Replied to answer on January 16, 2021 at 3:51 pm

        First, run your query separately and check if it is returning records. If returning, then it should show in the card report. To test, you can remove the blob column for now and check with the following columns only:

        select
        PROP_LOCATION_NM CARD_TEXT,
        PROP_LOCATION_CD CARD_SUBTITLE,
        PROP_LOCATION_REGION CARD_SUBTEXT
        from WADOMASS_PROP_ADRESS;
        
        

        If the report shows the data, then it means somewhere problem with your blob data.

        • 0
        • Share
          Share
          • Share on Facebook
          • Share on Twitter
    4. Matt

      Matt

      • LJUBLJANA, Slovenia
      • 0 Questions
      • 1 Answer
      • 0 Best Answers
      • 27 Points
      View Profile
      Matt Contributor
      2021-02-21T19:00:14+05:30Added an answer on February 21, 2021 at 7:00 pm

      A little change in the last APEX:

      SELECT image image_1 /* just column name */

      ...

      and Media properties attributes.

       

      • 1
      • Share
        Share
        • Share on Facebook
        • Share on Twitter

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask Question
    Write a Post
    • Recent
    • Answers
    • Bheem

      How to deploy oracle apex app in oracle SaaS

      • 0 Answers
    • Rameez Tariq

      How to create View with Blob column through DBLINK

      • 0 Answers
    • Huy Nguyen

      Dynamic action on column on Interactive Grid

      • 3 Answers
    • GudDud

      Load PDF into APEX, Edit it and Print it.

      • 0 Answers
    • Huy Nguyen
      Huy Nguyen added an answer Thank you for your good idea. March 5, 2021 at 12:09 pm
    • Vinish
      Vinish added an answer Oh, this will work for only new rows. For existing… March 5, 2021 at 11:22 am
    • Vinish
      Vinish added an answer I think you do not need to create the dynamic… March 5, 2021 at 11:14 am
    • Vinish
      Vinish added an answer Are you converting your CLOB to varchar2 in the report?… March 5, 2021 at 6:56 am
    • Vinish
      Vinish added an answer You can reduce the number of column span for the… March 4, 2021 at 7:53 am

    Recent Blog Posts

    • Vinish

      Oracle Apex - Display External File in Region

    • Vinish

      Oracle PL/SQL Download BLOB File to Disk

    • Vinish

      Oracle Convert External File to BLOB

    • Vinish

      Oracle Apex Calendar Example

    • Vinish

      Oracle Apex - Open Modal Dialog Page Using JavaScript

    Explore

    • Home
    • Blog
    • New Questions
    • Tutorials
      • Oracle
      • Oracle Apex
      • Python
    • Tags
    • Users
    • Badges & Points
    • About

    © 2021 OrclQA.Com. All Rights Reserved. Privacy Policy