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

Similar Messages

  • SQL Report Region

    Hi,
    I am using apex 4.0.1 and I have a page with several SQL Report regions. The user can edit the data in the report regions by clicking a column that uses a href link to open a DML page in a modal window. The user can then amend some data in the modal window, press save which closes the modal window and uses the partial page refresh process to refresh the SQL report region. (Using apex.event.trigger('#SOME_REGION'),'apexrefresh')).
    If I navigate through the report to show rows 31-45 and then click on a href to edit a record. On pressing save, the report is refreshed but the rows displayed goes back to 1-15.
    How can I get the report to stay showing the rows 31-45?
    Cheers
    Paul.

    I believe this answers my question
    http://monkeyonoracle.blogspot.com/2010/11/refresh-report-region-and-pagination.html
    Edited by: pjturley on Jan 10, 2012 1:14 PM

  • Controlling the page of an SQL report region

    I have an SQL report region containing 70 rows. It shows the status of a bidding process that takes place in sequence, from the guy in the first row to the guy in the last. I use a "red light/green light" technique in each row to show who is currently eligible.
    Typically users will login and then hit the next button to get to where the action is once the first 15 folks are done (number of rows = 15). Is there some way to set which set of rows first appears?
    I looked at the URLs. When I first logged in I got:
    http://htmldb.ciscoinc.com/bill/f?p=173:3:15341208186623218430::NO:::
    After clicking "Next" I got:
    http://htmldb.ciscoinc.com/bill/f?p=173:3:15341208186623218430:pg_R_4821423314714801953:NO&pg_min_row=16&pg_max_rows=15&pg_rows_fetched=15
    How do I come up with:
    pg_R_4821423314714801953 ?
    Any thoughts? Thanks.
    Bill

    Bill,
    I would suggest using a dynamic query that’s referencing a page item to limit the result set so that the correct records are shown when the user branches to the report page. Manually modifying the pagination URL is not supported. The URL contains the internal region ID, and is setting some internal pagination variables. The internal workings of report pagination could change in future versions of HTML DB, so manually manipulating those values could cause your report to break duing a future upgrade.
    Regards,
    Marc

  • Hierarchy indentation problem in the sql report region

    I've the following sql statement in sql report region. it works fine by bringing the all the users reporting to a manager correctly. In the sample user table below manager/id are in parent/child relationship.
    select id from user_table start with upper(id)=upper(:p332_person_short_id) connect by prior id = manager
    user1
    user2
    user3
    where user2 and user3 are reporting to user1.
    But I want to give some indentation between the user levels to show the hierarchy clearly in the report as below
    user1
    user2
    user3
    I tried with the following statment. It does indent the users correctly but in hierarchy is reversed.
    select LPAD(' ',6*(Level-1))|| id "User" from user_table start with upper(id)=upper(:p332_person_short_id) connect by prior id = manager
    the output is
    user2
    user3
    user1
    Any help is appreciated.

    I think padding with blanks will not work in HTML. You will have to pad with " ".
    So, something like this should work:
    select replace(lpad('@',6*(level-1),'@'),'@','&amp;nbsp;')||id "User" from ....
    Hope that helps
    Jochen

  • Weird behavior: PLSQL-generated SQL Report Region

    I am trying to tune my PLSQL-generated SQL Report Region. I put in some code to write the resulting query to a table. I turn it on, run the page, and then turn it off and look at the SQL. Instead of getting one query for each time I load the page, I get five. Trying to find out a bit more about why, I concatenate :APP_USER and to_char(sysdate, 'hh:mi:ss') to the resulting SQL. What I find is that four of the entries in the table have my ApEx dev username, and all of these writes are 3 seconds before the SQL generated under the app username is written!
    It probably goes without saying, but in all of the writes under my dev username, there are no session values and so any PLSQL if statements that depend on a session value act as if the session values are null. Also, any place I have :APP_ID show up as 4000 in those writes instead of the app number that shows up under my app username.
    Do you follow this?
    Well, on a hunch I copied the whole region back on to the page and disabled the original. This time, no writes with the dev username, only one select statement as originally expected.
    Is that wierd or what?
    Bill

    Scott, Your last comment - that was it. I should've paid more attention to the time. The minutes must have been off. I made sure to log out of the dev environment before I ran the page, but the writes under my dev login were occurring when I saved the region. I still don't see why that process causes four identical writes, but it's not that important.
    Thanks! Now I can to working on the real problem - improving my SQL.
    Bill

  • Partially refresh the sql report region by clicking the region selector tab

    Hi,
    In my page i have a region display selector tab. This region selector tab contain show all,booking,service,.. etc. when i click the booking tab,sql report region will appear. My intention is when i click the booking tab i want to refresh that region partially to display the record according to sql query in that region source of report region.
    how to do this?
    skud.

    KevinFitz wrote:
    The report region being displayed is conditional on P2_QUERY item being NOT NULL. I assume the region not appearing is because the Action for the Select List Item is set to None and so P2_QUERY is always NULL.
    No, the region is not appearing because it is conditional on P2_QUERY being NOT NULL. This means that the report region never exists on the page shown in the browser, so it can't be dynamically refreshed. (Dynamic refresh doesn't evaluate region conditions, and it only re-renders the report content, not the entire region.)
    Remove the condition on the report region, check the refresh is working, then reconsider exactly what the requirements here are. If you want the region to appear only when P2_QUERY has a value, and you want it to be refreshed without submitting and re-rendering the page, then the region needs to be hidden rather than conditionally rendered, and shown via a dynamic action when P2_QUERY gets a value.
    I tried adding an additional Set Value True Action for the DA event but got an error as listed above,
    All irrelevant if Page Items to Submit on the region is used properly.

  • SQL Report Region Refresh

    Application Express 4.0.2.00.09
    Oracle 11 XE
    How do I setup a Dynamic Action to refresh my region every X number of seconds? I can refresh the region easy enough on events, but I can't seem to figure out the timing thing. Maybe I just need some sleep...
    Austin

    Joe -
    Interestingly enough, I have not yet found a good way to alter the Report Region title with the last update time. I would think there is a way to do it, but I do not currenlty have that knowledge, nor the time to thoroughly investigate how to do it. I do have a bit to share about the mechanics of the refresh discussed earlier in this thread.
    Consider this code, place in the footer of a SQL Report Region:
    <script type="text/javascript">
    <!--
      var d = new Date();
      document.write("Last Updated: " + d);
      setInterval("jQuery('#INTRADAY_IRR').trigger('apexrefresh');", 2000);
    -->This will place the date as a footer to the SQL report. The javascript will then refresh the report every two seconds. (or whatever timeframe you specify) Now, in my SQL for my report, I added an additional column that is the current time. My SQL would look something like:
    SELECT foo,
            bar,
            to_char(sysdate, 'HH24:MI:SS') update_time
    FROM dualThis SQL will show when the data was last fetched from the database, while the footer of the region shows the time when the region was loaded by the browser.
    If you run the page with these, or similar, parameters, you will notice that the update_time column in the report changes with each refresh, however, the region footer does not change. This is because the script isn't called everytime the data is refreshed. This would indicate that using the methodology mentioned previously in this thread, the entire region is not refreshed but simply the dataset and the report itself. This would mean that you would have a quite difficult time updating the region title from the SQL code alone... I'm not saying it is impossible, I just don't know how to do it...
    Having said that- I do have a work around.
    Consider this as the region title:
    <div id="MyUpdatedReport" ></div>Now consider this code in the region header:
    <script type="text/javascript">
    function getUpdatedDate() {
      var d = new Date();
      document.getElementById('MyUpdatedReport').innerHTML="Region Title - Last Updated: " + d;
      t=setTimeout('getUpdatedDate()',2000);
    </script>And this in the region footer:
    <script type="text/javascript">
    <!--
      setInterval("jQuery('#INTRADAY_IRR').trigger('apexrefresh');", 2000);
      getUpdatedDate();
    -->
    </script>We create a DIV tag as our header. Then we have a function in the header that updates our div tag every two seconds. In the footer, we tell APEX to refresh the data every two seconds, and we tell our function to begin working. Effectively, you have a timestamp indicating when, theoretically, the data should have been refreshed. Now, this timestamp in the Region Title is NOT the true update time, but, theoretically it should be close. You should probably test this to see if you want to use it. Personally, I don't like this solution and I don't think I would ever implement it in any sort of production application. However, in an application that is just for me, I might hack something like this up.
    The key part of this work around would be to keep your times synchronized. It would be of no benefit if APEX was refreshing the data every 60 seconds but the title was refreshing every 6 seconds. Yikes, that could confuse a few people.
    I hope this has been a help.
    Austin

  • Items is a region displayed after a sql report region!

    Hello everybody!
    I have 3 regions :
    1/ HTML text region with some items : sequence 10, column1
    2/ SQL report region : sequence 20, column1
    3/ HTML text region with some items : sequence 30, column1
    I have many problems and errors when submitting the page and saving data into tables, I think that htmldb is not getting the correct values corresponding to the correct items.
    If I change the column diplay of the sql report region to "2", or if I change the sequence of the SQL report region to 40, all is ok!!!
    (I am using wwv_flow.g_f10(i) to retreive data from the report).
    Any idea ?

    Hello Raju,
    Ok, My example is more complexe, but I have succed to reproduce the error in a sample example in my oracle htmldb workspace,
    My access info have bee sect to : [email protected]
    You will find the example in application 21275_TEST page 2.
    I have 3 regions, the second is a report sql region in witch I have a popkeyfrom query item.
    My submit button, update a table with a text field (item P2_IT, region1) and a date(item P2_MONTH ,region3).
    You will see that when submitting, you will get an error : not a valid month....
    I have not understand what is being done at save, but I am sure that the value of P2_MONTH is not correctly setted when updating the table!
    Just, changing the sequence of the report region from 10 to 30 resolve the problem,
    but I must have this region between the two others!!!
    Thanks for the help!

  • Cell Padding in SQL Report Region

    I have what I hope is a simple question.
    I have a SQL Report region and I want to add more padding to the left and right sides of the table cell.  I don't want to change the style sheet because I don't want to affect other pages.  But I tried adding style attributes on the "Region HTML table cell attributes" field but I still can't get it to work.
    Can anyone give me an example of how I can do this?

    95665 wrote:
    Please update your forum profile with a real handle instead of "95665". And always specify your APEX version. What is it?
    I have what I hope is a simple question.
    I have a SQL Report region and I want to add more padding to the left and right sides of the table cell.
    "The table cell"? A single, specific cell within the report? All cells in a specific column or row? All cells in this report? Or do you mean padding around the entire report table?
    I don't want to change the style sheet because I don't want to affect other pages. 
    Create a page-specific style sheet using the Inline page CSS attribute (in 4.2) or a style element in the page HTML Header (previous versions).

  • Clear data in sql report region on page load....

    I have a sql report region.when i run the page the data getting populate on the screen because of the sql query. On page load i dont want to populate the data in screen.
    i have created the page process to clear cahe the page. but the data is not clearing from the screen.
    How to resolve this?
    Thanks & regards,
    Skud.

    Skud,
    you can create condition in report region query e.g. where 1 = :PXX_ITEM, and populate that item on click and then refresh report.
    Bt,
    Marko

  • Refreshing sql report region based on values from another region - 4.0

    Greetings All,
    I have a page with two regions, say region 1 and region 2. I have a before header process that fetches values from db based on criteria entered from another page. Region 2 is a sql report region with bind variables from region 1. When this page is rendered region 1 renders properly however sql report region always returns no records. What am i missing here?
    I would like to have the region 2 render a report based on the values from region 1. Region 2 has a sql query that looks something like
    select
    colum 1,
    column 2,
    column 3
    from table t1
    where t1.c1 = :p10_item1
    and t1.c2 = :p10_item2Using apex 4.0
    thanks
    Seetharaman

    If these items hidden, try making them display only .
    Also what happens when you move the items from region 1 to region 2.
    From my experience items do not have much of a dependency on the region they are attached to other than cases when the region is not rendered(when its condition fails) and then the item values become null(bcoz they themselves are not rendered).

  • Converting SQL Report Region to PLSQL Function Body Returning SQL Query

    All:
    I want to convert my SQL Report Region to a PLSQL-generated SQL Report Region so that I can eliminate where clauses dynamically and speed up my app, and also so that I can provide additional sorting options.
    <br><br>
    My problem is that I have lots of embedded single quotes that already are coded as 3 single quotes in the SQL Report Region. I am not sure at all how to code them within the PLSQL.
    <br><br>
    As example, here is one column from my query:
    <br><br>
    select decode(nvl(g.date_sub_1,g.date_rec_1), null, decode(g.article, 0, 'E', 1, 'U'), '< a href="javascript:unElevate( ' ' ' || g.grid || ' ' ',' ' ' || g.natca || ' ' ')">' || decode(g.article, 0, 'E', 1, 'U') || '< /a>') "Reverse" from g_table g
    <br><br>
    (Note that I added spaces within the code so it would display properly in the browser.)
    <br><br>
    To clarify, that's a double quote before javascript, and then 3 single quotes before the first concatenation group, then 3 single quotes after the second concatenation group, then 3 single quotes before the third, 3 single quotes after the fourth followed by an end-paren followed by a double quote etc.
    <br><br>
    My question is, what do I do with these triple-single quotes within PLSQL? Probably a no-brainer for the experienced folks, but I am thinking like a mobius strip at this point.
    <br><br>
    Bill
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

    Scott,
    I think that feature was made for my situation! I keep getting
    Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the generic columns checkbox below the region source to proceed without parsing.
    (ORA-20001: Unable to bind :43 verify length of item is 30 bytes or less. Use v() syntax to reference items longer than 30 bytes. ORA-01006: bind variable does not exist)
    I did chop the query up into little bits, i.e.
    p_sql := p_sql || q'! ... !';
    p_sql := p_sql || q'! ... !';
    p_sql := p_sql || q'! ... !';
    return p_sql;
    But I'm not sure what I'm supposed to do here.
    Thank you.
    Bill

  • 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
    -------------------------------------------------------------------

  • Version 3.1 fault - ORA-06502 error when creating SQL Report Region/Page

    I usually perfect my query in SQL*PLUS before I create a new report region.
    Consequently, I copy the code into the region wizard to create the new page. However, since we have upgraded to Version 3.1, virtually every report I have tried to create has created the following error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    It would appear that a maximum of 960 characters can be used to create the region/page. Perversely, once the page/region has been created, I can then edit the source and include as much code as I want (so far I've not run up against a limit)
    As it's just annoying, but not stopping me doing what I wanted to do, I've not got around to mentioning this error previously, but it occurred to me that I should (so I am!)
    David

    Hi David,
    Thank you for reporting this. Unfortunately, this was a regression introduced in Application Express 3.1. The workaround is to edit the region, as you suggested. This has been filed as Bug 6956070 and will be corrected in the forthcoming Application Express 3.1.1 patch set.
    Joel

  • Urgent : Deleting a row in a sql report region

    Hi
    I have an SQL report, i must have an icon "delete row", when clicing this icon the row must be deleted from the report,
    what I have do but not sure of this :
    in my query I am containing some html in witch I have an icon, when the user click on this icon, I have to delete the currect row of the record
    How can I reference the currect row, and how can I clear the currect row of a report ?
    thank you

    Off course not.
    You will refer only those primary key column or composite column in your where clause. So, no matter if your table has 15 or 90 columns. All, you need to refer only those key columns in your where clause of your main query and also use them in the sub-query which is connected with IN clause.
    But, i think another approach is showing the use of exists operator. You can check that, too.
    And, in the last post Karthik has shown you the analytic approach which i prefer.
    I gave you my solution without modifying your existing sql. So, that you can understand it without a lot of hard-work and reading. ;)
    I would also request you to check the performance issue on all the solutions which have provided to you by all of us. And, you can choose the best from it after going through the explain plan details.
    So, final ball is in your court. ;)
    Take some breath - and make your wise judgment on it. :)
    Best Of Luck.
    Regards.
    Satyaki De.

Maybe you are looking for

  • Using iMac G5 as a display?

    can i use my imac to screen share with my macbook?

  • How do you change the color of the navigation bar text  in iWeb?

    I have created buttons to set in the nav bar but the type color needs to be white to show up against the button background. How can I change the nav bar text colors? Thanks G

  • The dropdown menu in the banner should be behind the text fields.

    Hi Andy, In our Application we have three Menus...The problem we are facing in that when ever we move the cursor, a drop down list will appear.. which is covering the text fields... The dropdown menu in the banner should be behind the text fields. Ca

  • KPI -How does the periodicity works in SM

    Periodicity is @ Context level only? That means we have to define different contexts for weekly &monthly? That doesnu2019t fly good How does the periodicity works in SM..data entry as well as frontend display?

  • NIB file doesn't load

    Hi, I had created a new project with the Tab Bar Application Template in XCode. I did not ever touch the AppDelegate classes. Everything used to work perfectly. I must have done something, but now my main view does not load when I Build & Go. Instead