How to find orientation of  image displayed in a report region

Hello,
I have Apex 3.1 application showing an image in a report.
The images are held as files on the web server and filename and description held in a database table
I can use SQL to retrieve the data into report columns and then HTML expression to display the image as a fixed size as shown below. This works fine for landscape pictures but obviously distorts portrait ones.
I wanted to check the orientation of the image and adjust width and height if portrait. I was considering using javascript to get image.height and image.width but am not sure how to reference the column and feed back into the HTML expression.
Is this this the best approach and any help how to reference the column would be appreciated
Many thanks
Colin
The Report Region Source is -
select      "PHOTOFILE"."FNAME" as "FNAME" ,
"PHOTOFILE"."ID" as "ID",
"PHOTOFILE"."DESCRIPTION" as "DESCRIPTION",
"PHOTOFILE"."FNAME" as "IMG2"
from      "PHOTOFILE" "PHOTOFILE"
where id=:P4_IMAGE_IDColumn Attributes IMG2
Column Formatting
HTML Expression
<B><I><U><font face="verdana size="16"><center> #DESCRIPTION# </I></U>
<font face="verdana size="20">&P4_DESCRIPTION.
</B></center></font>
<br/>
<img src="#IMG2#" width=600 height=400  >

This example may help you, although a bit different from what you want to achieve:
http://apex.oracle.com/pls/otn/f?p=31517:212
The point was:
1. display image region should be fixed size (300px wide and 300px height)
2. if the image size is bigger than that, the region should expand automaticaly.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------

Similar Messages

  • How to find out the image size?

    How to find out the image size values(Width and height) in illustrator CS3 using any script. I tried but i got only the document height and width. I need to find out the image BoundingBox value of width and height. Kindly advice me.

    Try this.
    tell application "Adobe Illustrator"
    set heightImage to get height of raster item 1 of current layer of current document
    set widthImage to get width of raster item 1 of current layer of current document
    display dialog (heightImage & " X " & widthImage) as string
    end tell
    JaiMS

  • How to find out the image resolution in illustrator?

    How to find out the image resolution in illustrator cs through javascript or vbscript?
    Thanks,
    Prabudass

    Anyone please help me, how to find out the embedded image resolution in illustrator file through script.
    Thanks,
    Prabudass

  • How to find out the total, subtotal in alv report

    hi dears,
    how to find out the total, subtotal in alv report?
    pls tell me logic ,
    i will be waiting for eply
    regards
    eswar

    Hi,
    <b>ALV Grid List with sub-totals</b>
    REPORT z_demo_alv_sort.
    * This program lists orders (VBAK) with sort and sub-total for        *
    * 'sold-to-party' (KUNNR) and 'Sales organization' (VKORG)            *
    TABLES : vbak.
    TYPE-POOLS: slis.                      " ALV Global types
    SELECT-OPTIONS :
      s_vkorg FOR vbak-vkorg,              " Sales organization
      s_kunnr FOR vbak-kunnr,              " Sold-to party
      s_vbeln FOR vbak-vbeln.              " Sales document
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.
    PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    DATA:
      BEGIN OF gt_vbak OCCURS 0,
        vkorg LIKE vbak-vkorg,             " Sales organization
        kunnr LIKE vbak-kunnr,             " Sold-to party
        vbeln LIKE vbak-vbeln,             " Sales document
        netwr LIKE vbak-netwr,             " Net Value of the Sales Order
        waerk LIKE vbak-waerk,             " Document currency
      END OF gt_vbak.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
    START-OF-SELECTION.
      PERFORM f_read_data.
      PERFORM f_display_data.
    *      Form  f_read_data
    FORM f_read_data.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_vbak
               FROM vbak
                 UP TO p_max ROWS
              WHERE kunnr IN s_kunnr
                AND vbeln IN s_vbeln
                AND vkorg IN s_vkorg.
    ENDFORM.                               " F_READ_DATA
    *      Form  f_display_data
    FORM f_display_data.
      DEFINE m_fieldcat.
        add 1 to ls_fieldcat-col_pos.
        ls_fieldcat-fieldname   = &1.
        ls_fieldcat-ref_tabname = 'VBAK'.
        ls_fieldcat-do_sum      = &2.
        ls_fieldcat-cfieldname  = &3.
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      DEFINE m_sort.
        add 1 to ls_sort-spos.
        ls_sort-fieldname = &1.
        ls_sort-up        = 'X'.
        ls_sort-subtot    = &2.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA:
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv,
        lt_sort     TYPE slis_t_sortinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        ls_layout   TYPE slis_layout_alv.
      m_fieldcat 'VKORG' ''  ''.
      m_fieldcat 'KUNNR' ''  ''.
      m_fieldcat 'VBELN' ''  ''.
      m_fieldcat 'NETWR' 'X' 'WAERK'.
      m_fieldcat 'WAERK' ''  ''.
      m_sort 'VKORG' 'X'.                  " Sort by vkorg and subtotal
      m_sort 'KUNNR' 'X'.                  " Sort by kunnr and subtotal
      m_sort 'VBELN' ''.                   " Sort by vbeln
      ls_layout-cell_merge = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                is_layout   = ls_layout
                it_fieldcat = lt_fieldcat
                it_sort     = lt_sort
           TABLES
                t_outtab    = gt_vbak.
    ENDFORM.                               " F_DISPLAY_DATA
    ***************** END OF PROGRAM Z_DEMO_ALV_SORT **********************
    Regards
    Sudheer

  • Show Image in an SQL Report Region

    Hi,
    I'm having some trouble with showing an image in an sql report region.
    I used the Upload/Download Tutorial in the HTMLDB How-Tos and it worked well.
    Now, I have the following in the query region:
    select s.facilityid, s.id, s.name, s.subject,
    '<img src="#OWNER#.download_my_file?p_file=s.id" width="90" height="70">' image
    from file_subjects s
    where s.facilityid = :FACILITYID
    I get a red X in place of the picture. I know that the pictures are there and have been uploaded successfully. Can anybody tell what I am doing wrong?
    Thanks much,
    Nora

    Nevermind, I fixed it by changing the image line to
    '<img src="#OWNER#.download_my_file?p_file=' || s.id || '" width="90" height="70">' image
    Thanks
    Nora

  • How to find desktop background image file

    I am preparing an old PowerBook G4 laptop to be sold. I had previously lent it to a friend and I am selling it to another friend. The friend to whom I lent it asked me for the desktop image file so he can use it as his desktop on the Mac he owns.
    I shot that photo years ago and I can't find the original .jpg for it, so I am hoping that I can find the desktop version of it before I finish preparing my PowerBook for sale. I have searched everywhere, but that image file does not show up on the PowerBook.
    I figure that since I can see the photo when I am logged in, it must be somewhere, but where? I originally had it in iPhoto, but it was deleted from there at least two years ago. This PowerBook only has one account, so there's not a lot of places to look through.
    If anyone has any pointers on how to find an image file on a PowerBook running Mac OS X 10.4.11, please let me know.

    HI Stanely,
    Try going to System Preferences/Desktop&ScreenSaver. Click the Desktop tab. Now, go thru the folders listed there to see if the image shows up there. If it does, then go to Spotlight and type in the name of the folder where the image was. Spotlight will populate a list for you. At the top of the list click where it says: Show All. A pane will open. Look for the folder, then on the right click the little white circle with an "i" in it. That will give you the path to find the folder where the image resides.
    You can search Spotlight by typing in these extensions: jpg tiff png pict gif bmp psp that's another way to search for an image.
    Also, open a Finder window and look in the Sidebar on the left. Click where it says: Pictures. Might be in there also.
    Carolyn

  • How to programmatically control the Image display size

    I wonder if
    it is possible to let the Vi adapt the size of the VISION image display if the
    user zooms in the displayed picture (as can be done in other graphical software
    like Photoshop or ImageI). Is there something prepared?

    If you are using LV 7.1, there is a property node that let you define the size of the image display.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Image size.vi ‏64 KB

  • How can we split the grid display in alv reports.

    hi everyone.i am trying to get the display of two reports in a single one using split screens.i had written a report for vendor balance.one for open and one for cleared items.how can i combine these two reports.
    the field catalog was same for these two.
    can anyone suggest me suitable way to perform.

    HI,
           You can  also try ALV Blocked display.
    Pls Check following program
    BCALV_TEST_BLOCK_LIST.
    FM used are
    call function 'REUSE_ALV_BLOCK_LIST_INIT'
    exporting
    i_callback_program = sy-repid.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
    exporting
    is_layout = it_layout
    it_fieldcat = fc
    i_tabname = 'IT_VBRK1'
    it_events = it_event
    tables
    t_outtab = it_vbrk1.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
    exporting
    is_layout = it_layout
    it_fieldcat = fc1
    i_tabname = 'IT_VBRK2'
    it_events = it_event
    tables
    t_outtab = it_vbrk2.
    call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    form top_of_page1.
    format color col_positive.
    write: / 'FIRST BLOCK'.
    endform.

  • How to find out the Area Menu for a Report/ Table/Function Module

    Hi,
    Is there any procedure to find out the <b>"AREA MEANU"</b> for a Report/Table/Function Module...
    Or is there any Transaction code / Report is available to find out all the report for a particular "AREA MENU".
    Thank you for your quick response...
    Regards,
    Thiru
    <b></b>

    Hi,
    Check these below threads:
    user log in & log out time SAO
    How to find user log-out time ?
    Regards,
    Nitin

  • How to find Level 1, Leve 2, Level 3 reporting manager

    Hi Experts,
    How to find Level 1, Level2, Level 3 reporting manager for an employee.
    pernr--> leve1 manager --> leve2 manager --> leve3 manager .
    Thanks in Advance.
    Regards,
    IFF

    Hi,
    For fetching Level 1 manaer, there are 2 options:
    1.You can use FM RH_GET_LEADER for PERNR,Position or User
    2.Use FM RH_READ_INFTY with Subtype = A008.
    For Fetching level2 manager,
    1. fetch Level 1 manager.
    2. Get Level1 manager's Org.
    3. Get Level2 manager using FM RH_GET_LEADER.
    Thanks,
    Dharitree

  • How to find the last run date of the report..

    please any one one help me
    how to find last run date of the report...
    for example if my report is zgrir...if i am exuted in last week
    if want to find when it executed
    last run date is req
    please any one help me...

    The trasaction stat is limited because i want all the execution date even if it is 3 years ago.
    I have tryied the transaction st03 but it is limited to 3 months ago.
    check transaction STAT and it's report RSSTAT00.
    U can copy RSSTAT00 into ZRSSTAT00 and modify corresponding.
    *& Report ZDSAP *
    REPORT ZDSAP .
    DATA: d_ref TYPE REF TO data,
    d_ref2 TYPE REF TO data ,
    i_alv_cat TYPE TABLE OF lvc_s_fcat,
    ls_alv_cat LIKE LINE OF i_alv_cat.
    TYPES tabname LIKE dcobjdef-name .
    parameter: p_tablen type tabname.
    data: begin of itab occurs 0.
    INCLUDE STRUCTURE dntab.
    data: end of itab.
    FIELD-SYMBOLS : <F_FS> TYPE table,
    <F_FS1> TYPE TABLE,
    <F_FS2> TYPE ANY,
    <F_FS3> TYPE TABLE.
    REFRESH itab.
    CALL FUNCTION 'NAMETAB_GET'
    EXPORTING
    langu = sy-langu
    tabname = p_tablen
    TABLES
    nametab = itab
    EXCEPTIONS
    no_texts_found = 1.
    LOOP AT itab .
    ls_alv_cat-fieldname = itab-fieldname.
    ls_alv_cat-ref_table = p_tablen.
    ls_alv_cat-ref_field = itab-fieldname.
    APPEND ls_alv_cat TO i_alv_cat.
    ENDLOOP.
    internal table build
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING it_fieldcatalog = i_alv_cat
    IMPORTING ep_table = d_ref .
    ASSIGN d_ref->* TO <F_FS>.
    SELECT * FROM (p_tablen) INTO CORRESPONDING FIELDS OF TABLE <F_FS>.
    LOOP AT <F_FS> ASSIGNING <F_FS2>.
    *your code goes here.
    ENDLOOP.

  • Displaying AJAX refreshed report regions

    Hi,
    Following on from my GetAsync help yesterday I have another question. The next part of the puzzle is I have a tree on the left hand side of the page which, when a node is clicked, causes two reports on the right hand side of the page to refresh. If I use the method described in John's Pro Apex book that works fine.
    However what I would ideally like to be able to do is use the GetAsync method again to allow the browser to remain responsive when a node in the tree is clicked. So far I can either insert the whole page into the div - it works, but isn't exactly elegant, or get an XML document from an application process - but this only displays something like "object: [XML document]" (not exact, I don't have it to hand).
    I have a feeling I've been looking at this too long, I've looked at trying to insert XML with XSL for formatting but haven't yet got that working (again a complete newbie to XML/XSL pretty much which is probably why...), other options I can think of are traverse the XML document and, with javascript, create a table in the DIV (doesn't feel right), or somehow an adaptation of John's method whereby I somehow traverse the DOM grabbing the content between the BOX_BODY tags.
    Any suggestions/ideas gratefully received!
    Many thanks,
    Gareth.

    Ben,
    Haven't tried implementing this either but how about:
    - you have 5 regions on a page, 1 for each report
    - these regions each contain nothing but a div in each case
    - each div initially contains nothing but a "Loading..." animation/images/whatever
    - You have 5 other pages, each of which are based on a blank page template
    - each page contains one report region
    - when your original page loads, you kick off 5 asynchronous ajax requests to these other 5 pages
    - when the the asynch request completes (i.e. when each page has loaded) you replace the contents of the relevant div (the "loading..." animation) with the contents of the other apex page you have just retrieved with ajax.
    I think that should work.
    Or, for more flexibility, you could make Application Processes which generate the HTML for each of your required reports. You could then call these via the Ajax requests instead of calling the 5 new Apex pages. (This would mean that the reports are far less easily changeable, however.)
    Andy

  • How to get the number of rows in a report region

    Hi all,
    Is there a way to get the number of rows returned in a report region, without issuing an additional "select count(*) from some_table"?
    I mean something like the substitution string #ROW_NUM# but for the total rows.
    Thanks,
    Pedro.

    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/ui.htm#CHDDGGEG
    For classic report regions, the region footer supports the following substitution strings:#ROWS_FETCHED# shows the number of rows fetched by the Oracle Application Express reporting engine (the page size). You can use these substitution strings to display customized messages to the user. For example:
    Fetched #ROWS_FETCHED# rows in #TIMING# seconds.
    *#TOTAL_ROWS# displays the total number of rows that satisfy a SQL query used for a report.*
    #FIRST_ROW_FETCHED# and #LAST_ROW_FETCHED# display the range of rows displayed. For example:
    Row(s) #FIRST_ROW_FETCHED# through #LAST_ROW_FETCHED# of #ROWS_FETCHED# displayed>
    Ta,
    Trent

  • How to find which  Smartform it display

    Dear Experts,
    I display print preview in t-code VA23  to show my quotation report ,
    and  this report built by smartform ,
    How could I find which smartform form it use?
    Thanks a lot in advanced.
    Yacoa

    Transaction NACE -> Select Application V1 -> Click Output Type -> Select your output type from the list -> Click on Process routines, you will see the smartform that is assigned to your output type
    To see which output type is assigned to your Form, in VA23/VA22, click on Extras -> Output -> Header -> Edit. You will then see list of output types triggered, one of which will be for the printing through smartform

  • Help--how to find a deleted image

    Somewhere along the line I deleted a very precious master taken in August of 2007. When I look in my backup vault (on a Quadra external HD), I see a folder called "d2 Quadra deleted images." Inside are countless folders (and folders within folders within folders) often leading to a single image. I can open the image at the end with Preview but it would take me months to examine every image I've deleted looking for this one. Is there a shortcut? thanks, Mike

    welcome to the forum ...
    have you emptied your trash since you deleted it ??? if not, it could be right there ...
    else, use spotlight and search the deleted images folder for some specific criteria that image is known to have ... restrict the date to Aug of 2007 and you be able to narrow, then you can display in icon view and see the thumbnails ...

Maybe you are looking for