Collapsed Tabular Form Heading when "No data found".

The ' Collapsed Tabular Form Heading when "No data found" ' problem (speculated to be bug 9893564) is discussed here: {message:id=4419231}. Warning link is out of date. I'm still seeing it in APEX 4.2.
I support Kelly's comments "looks like something is broken" and "Now this header (which is sized smaller before data is retrieved) comes between the search items and the help message and looks clumsy.".{message:id=9185914}.
Any suggestion to get around it when no data is found?
1) Is there a way to hide the header when there is no data? Or,
2) Is there a way to adjust the width of the columns if the header must display? I'd like them to be about what they are when data is displayed. I know those lengths but not how to affect the header width for a tabular report with no data.
Example:
WS APEX_EXAMPLES_01
demo
demo
Appl 78329 Tabular Form - page 1. (I forced query not to find any data for demo purposes.)
Thanks,
Howard

Howard (... in Training) wrote:
Paul --
Great! So many new techniques here -- new to me. Generally, I much prefer positive logic as well. But this solution seems to have more pieces than the other.There is method in that.
Firstly, with Aljaz's approach you can see a flicker as the tabular form is actually rendered and then hidden when the script in the footer is eventually run. This will be more apparent with a longer or more complicated page where it takes longer to reach the script and more content needs to be adjusted following removal of the form. Reversing the logic and hiding the form using CSS in the page header prevents this as the form elements are initially created as hidden nodes in the DOM before any of the page is rendered.
More important is that this approach applies the principles of the separation of concerns and unobtrusive JavaScript. At some point when developing in APEX you're going to find yourself seriously losing your cool in a situation where you know the app is executing some JavaScript, but you can't find where that script is defined (maybe you've already been there). Look at the page 2 definition using the tree view: where's the JavaScript that is going to run? Now look at page 1: ah, there are a couple of dynamic actions...
APEX now includes a lot of containers specifically for JavaScript: File URLs, Function and Global Variable Declaration and Execute when Page Loads in page templates and page headers, and declarative and custom Execute JS Code Dynamic Actions. These provide for good separation of concerns: we should use these locations for JS code, and avoid the exasperation of hunting through templates, page/region headers/footers, page 0 regions, pre-/post-element text or wherever to find the script we can see in the page source or JS debugger.
Aljaz's solution also depends on detecting the presence of the No Data Found message with class <tt>nodatafound</tt>, and on modifying the Add Row button.
What if someone changes the class of the No Data Found message in the report attributes? The Exists... condition on the dynamic action performs this check in a more direct way (although it's not ideal: DRY is violated by having both 2 copies and 2 executions of the report SQL; nor is it reusable on other form regions).
Modifying the Add Row button JavaScript directly is intrusive. Like footers and templates, it's another non-obvious location for JS customisation. By using a dynamic action to bind another click handler to the button we're making the modification more obvious, and more importantly we don't have to modify what it's already doing&mdash;or in this instance, even care what that is (in other circumstances we might need to change the order or propagation of events, or suppress the original behaviour).
As for reusability, my original solution didn't really consider this (as it wasn't mentioned in the OP). Since the subject has been raised, and in accordance with my comments above, I'd approach it in a different way.
As discussed, I suggest not squirrelling JavaScript away in region templates. I'd create a reusable report template for tabular forms rather than a region one. A <tt>class</tt> defined on the report container there will provide a more direct selector for hide/show behaviour. I'd stick to initially hiding this report via CSS, and use dynamic actions defined on the global page to conditionally show it on page load and bind show behaviour to the Add Row button click. To make these DAs reusable I'd remove the Exists... condition from the first one and replace it with a JS condition that checks to see if the tabular form report contains any visible data rows (the class on the report template will help there as well). Binding the show behaviour to the Add Row button would use the <tt>onclick</tt> attribute as a selector (rather than an ID selector that requires an intrusive edit of the button) so that all Add Row buttons would be affected: <tt>$('button[onclick^="apex.widget.tabular.addRow"]')</tt>.
And about the style code:
#report_tabular-form,
#report_tabular-form .report-standard {
min-width: 90%;
} That is an improvement. I had read about it but not considered it for this. I tried the technique used to adjust column width on other reports but when I use "div," it makes the data in that column display only. I really want to adjust the width of the individual column header. Is there a way to do that?I'm not really clear what you're asking here. (Use "div"? Where? How?)
To control the width of individual report column headers, use the following CSS:
th#COLUMN_ALIAS {
  width: 10em;
}Where <tt>COLUMN_ALIAS</tt> is the alias of the column in the query: APEX uses this as the HTML <tt>id</tt> attribute for the column table header element. (Note that <tt>id</tt> attributes must be unique within a document, so it the same column appears in multiple reports/forms, ensure each column alias is unique.)

Similar Messages

  • ApEx 4: after upgrade, "when no data found" message on report not shown

    I have a page that displays a tabular form. Initially, the table is empty, and so I have text in the "when no data found" block of the report attributes.
    After upgrading to ApEx 4, this text is no longer shown when no results are returned. It displays the table header, but no rows. So for some reason, it thinks data is being returned -- even though the table is completely empty. I've tried several permutations, but have not been able to find a workaround.
    I'll try to set up a standalone page, but I can provide a pointer to the existing page on apex.oraclecorp.com on request.
    UPDATE: I think this may be related to the bug I reported on tabular forms.
    Is it possible that the empty, hidden row we are adding now counts as a returned row, even though the SELECT statement returned nothing? And thus the report never thinks that there is no data found? This would also explain why it's displaying the table headers, even though no rows are visible.
    Edited by: kswartz on Jul 8, 2010 12:18 AM

    Interesting. I didn't see anything about this change in behavior in the Release Notes. Did I miss something? It definitely didn't do this in 3.2.
    Overall, I think that's actually a very non-obvious change. Seeing a set of table headers with nothing below it looks to me like a mistake. Why would you ever show headers for something when you have no rows? In fact, I thought that was a bug the minute I saw it. With due respect, I don't think the new design is less desirable from a usability perspective than the old one.
    It also doesn't work as you described regarding the proportions: in my case, the columns in the header row did not match the sizes of the columns as I defined them. Although I didn't place anything beside the tabular form, if I had, it would still alter the layout when "Add Rows" is clicked. If you know what the size of those columns is supposed to be (because they are text fields of size xyz, for instance), why wouldn't you define the header cells to use that information? You won't get it exact most of the time, but you can get close, if they're all text fields of specific width.
    Plus, there's nothing on the Report Attributes tab that indicates the "When No Data Found" option won't apply if you are using a tabular form. The textareas should be disabled -- and at the very least, the on-line help should be mentioning this. It doesn't mention anything about this only applying to standard reports.
    Finally, I think you should also put this in the Release Notes, because this requires changes to any application where someone with a tabular form required this. In one case, that was where I provided instructions to users entering data for the first time. Now I have to move it. (Not a big deal, but it would have been nice to know that in advance.) On another page, I put a JavaScript block in there to submit and automatically add a row, because I wanted there to always be a blank row if nothing had been entered -- and that was the easiest way. Okay, granted, that's probably not something you intended to support, but there was nothing wrong with it, technically. And, again, it's fixed by moving that block to the header instead and testing for the number of rows in the table -- easy, now that you provide JQuery for us -- but still manual migration work.
    Thanks for the explanation.

  • Suppress the enter-query mode when no-data-found after execute a query.

    HI,
    Greetings of the day, Can any one suggest me that how to Suppress the enter-query mode when no-data-found after execute a query on the form by a button.
    whenever i execute query on form and result is no data found then form :system.mode is still in enter-query mode.
    i want that if result is no data found then form comes back it initial state.
    i will thank full of him who will help me..
    Thanks in Advance..

    Put this in your Key-ExeQry trigger:Execute_Query;
    If Get_block_property(:System.current_block,query_hits)=0 then
      Exit_form; --this cancels the Enter-Query mode; Does not exit the form.
    End if;You may want to trap and prevent the "FRM-40353: Query cancelled" message, and change the "FRM-40301: Query caused no records to be retrieved. Re-Enter" message. To do that, you need an On-Message form-level trigger:Declare
      Msg_Code Number        := MESSAGE_CODE;
      MSG      Varchar2(150) := SUBSTR('   '||MESSAGE_TYPE||'-'
                             ||TO_CHAR(Msg_Code)||': '||MESSAGE_TEXT,1,150);
    BEGIN
      If Msg_Code=40301 then
           -- 40301: Query caused no records to be retrieved. Re-Enter
        Message('  NO RECORDS FOUND',No_acknowledge);
      Elsif Msg_Code=40353 then -- Query cancelled.
        null;
      Else
        MESSAGE(MSG,NO_ACKNOWLEDGE);
      End if;
    End;

  • You are not authorized to open the form ORA-01403: no data found

    Hi,
    I have created a new Oracle 10g forms. It compiles sucessfully but when it is opened it gives a error message : You are not authorized to open the form ORA-01403: no data found.
    I am already connected to database. Can anyone please help what is the reason for this issue and any possible resolution?

    Sounds like you have some kind of security enabled.  However, because you didn't share the details about your environment or what you are doing there isn't much we can do is guess.
    Exactly which Forms version are you using?
    Exactly which database version are you using?
    Are you using anything like Oracle E-Business (e.g. template.fmb)?
    Did you create the form with Oracle Designer?
    If you create a simple form using only the DataBlock and Layout Wizards against the Oracle demo schema (SCOTT), does this form run?
    Any additional details outlining what you are doing or have already done might be helpful.

  • How to display a message when no data found in report

    Hi all
    i have report with few user parameters
    when i run the report and no data found then i want a message
    Please Guide
    thanks And Reagds
    Vikas Singhal

    Hi,
    one solution is to
    1) create a summary column CS_COUNT where you count the number of records returned by your query (Function: count, Source:any field of your dataset Reset at:Report)
    2) create a text area where you say for example "No records found...", and enclosing it in a frame.
    3) Create format trigger for the frame like
    IF :CS_COUNT = 0 THEN
    return (TRUE);
    ELSE
         RETURN (FALSE);
    END IF;
    OR, if you launch your report from a form and you want a popup message, you can create a before report trigger like:
    if :CS_count = 0 then
    srw.message(1000, 'your message');
    raise srw.program_abort;
    return(false);
    else
    return(true);     
    end if;

  • Error in standard SIT form : ORA-01403: no data found

    Hi
    I have created a custom responsibility and menu.
    And attached the single seeded function "Enter Person Special Information" to the menu.
    Whenever I try to access the function it opens the FORMS and gives the error.
    ORA-01403: no data found
    FRM-40735: WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA-06502.
    Any ideas?

    Did you do as follows?
    Create a Menu ‘SIT_MENU’:
    Name: SIT_MENU
    User Menu Name: Enter Person Special Information
    Menu Type: Standard
    Desc: (optional)
    Seq: 1
    Prompt: Special Info Types
    Function: Enter Person Special Information
    2. Create Responsibility and attach the Menu as follows:
    Rsponsibility Name: SIT Responsibility
    Application: Human Resources
    Resp. Key: SIT
    Available From: Oracle Applications
    Data Group: Standard
    Application: Human Resources
    Menu: Enter Person Special Information
    Now you can attach this responsibility to a user and test.

  • Unable to open SO Form - ORA-01403: No data found error

    Hi All,
    I have created a new OU, a new INV org & sub-inventories under it in the Vision Instance 11.5.10.2. I have linked this OU to the existing LE - Vision Operation & SOB - Vision Operations.
    Then, I have created a new OM responsibility just like OM SuperUser responsibility & have set the MO: Operating Unit profile option to the newly created OU at the responsibility level & finally ran the Replicate Seed Data program for this OU as the parameter.
    When I navigate to the new responsibility & try to open on the Sales Order form, i'm getting an error as "ORA-01403 : no data found in the Package OE_Order_Cache Procedure Load_Set_Of_Books" & the SO form doesn't open at all.
    Can anyone please guide me how to resolve this issue or is there any set-up that I'm missing? The package & package body OE_ORDER_CACHE is 'VALID' in the database.
    Regards,
    Hemanth

    Hi Hemanth,
    Hope by now ur issue is resolved.
    If not pls check the following.
    Pls check all the profile options
    GL set of books
    Mo operating unit
    These are mandatory.
    Apart from that check whether u have set the system parameters in OM and AR.
    If these parameters are not set u cannot open the sales order form.
    Pls check this.
    Regards,
    Madhu

  • Message when no data found in set block property

    hi,
    ı use oracle forms 10.1. when ı use the code below
    SET_BLOCK_PROPERTY('MY_BLOCK', DEFAULT_WHERE,     'YEAR=2012') ;
    EXECUTE QUERY;
    if there is records for year 2012 it works fine. Bu if there exists no record ı get message saying no data found. And then it clears the block. I want to clear block with no messages.
    is it possible? thanks...

    Yes. you can add your own message on form level. User ON-MESSAGE trigger and write down the given code :-
    DECLARE
      msgnum NUMBER       := MESSAGE_CODE;
      msgtxt VARCHAR2(80) := MESSAGE_TEXT;
      msgtyp VARCHAR2(3)  := MESSAGE_TYPE;
      ALERT_BUTTON Number;
    BEGIN
      IF msgnum = 40301 then
    --HERE YOU CAN WRITE ONLY NULL-------
    /* SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,'There are No records available for the Query selected by you  !!! ');
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE; */
    null;
    Elsif msgnum = 40355 then
              SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,msgtxt);
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE;
    Elsif msgnum = 40657 then
              SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,msgtxt);
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE;
    elsif msgnum = 40400 then
              message('Operation completed Successfully');
      END IF;
    END;

  • Report headings are displayed when no data found

    Hi folks,
    Apex version:4.0.1
    Recently upgraded from 3.x to 4.0.1. The tabular form headings are being displayed in 4.0.1 when no data to display. Where as in 3.x it wasn't the case. Any ideas on how to supress the headings or is that way 4.x is enhanced?
    Thanks in advance
    movva
    Edited by: cmovva on Jan 27, 2011 12:31 PM

    Hi Chandra,
    Perhaps this is connected to: "Ghost row" in 4.0 Tabular forms has id pattern f0x_0000 A hidden row is generated to allow speedy Add Row functionality so, presumably, the headers must be there at all times to be able to append the new row underneath
    Andy

  • Can not view/export a report which has 2 group by field when no data found

    Recently I developed a report, which contains 2 group by fields. it runs successfully when the report displays some data.
    but when there is no data, i cann't view/export this report.
    It shows nothing by html format and shows "this file cannot be opened because it has no pages" message by pdf format.
    even there is no records for this report, i still want to see the template file and show some basic information.
    please help me.
    Daniel

    I've found that, just like I used to do in Oracle Reports, if you put in a COUNT column to count your returning rows, you can put 'No Data Found' when there's no data. That way, your report will return and not error out.
    For .pdfs, this is the code I use; COUNT with code of <?if:count(field_name)=0?>.
    In the .rtf..
    COUNT
         No Data Found     
    END COUNT
    Put this in the .rtf before your data should appear or else it won't work.
    Hope this helps!
    Kris

  • Cancelling a report when no data found

    Hi All!
    I have a report that prints directly to the printer. But if the report query fetches no data then a blank page is printed.
    How should I raise a customized message and stop the report execution if there is no data found?
    Thanks in advance

    Hello,
    Another way is this: Put a report level summary in the data model that counts the rows in the query (use as the summary count source one of the columns of the main query).
    Then create an after report trigger that looks something like this:
    function AfterReport return boolean is
    begin
    if (:cs_count = 0) then
    raise srw.program_abort;
    end if;
    return (TRUE);
    end;This will cause the report to stop execution. It'll show an error like this in the report server log:
    REP-1419: 'afterreport': PL/SQL program aborted.
    You'll have to warn people about this particular error log entry as this may look like abnormal termination, when in fact it is a deliberate termination of the report. But at least you won't get a blank page.
    Regards,
    The Oracle Reports Team --skw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Oracle report , when no data found in query then ptint zero in text how

    hi ,
    i have use oracle report in one query if no data found then i have return O but no row select is there
    query is
    select sum(nvl(a.pitm_matl_cost,0)),
    decode(b.pm_assy_type,'B','B','Z')
    from pumpitems a, pumpmast b
    where a.pitm_proj_code like 'KAWASII' and
    a.pitm_pump_type = b.pm_pump_type and
    a.pitm_comp_type = b.pm_comp_type and
    a.pitm_sr_no = b.pm_sr_no and
    substr(a.pitm_matl_code,1,1) = 'X' and
    pitm_itm_cal = 'N'
    group by decode(b.pm_assy_type,'B','B','Z')
    order by decode(b.pm_assy_type,'B','B','Z')
    no data then it return no row select but
    i have return 0 how is possible , in report i have check cf, and cs to total , and no data then print 0 in text box so.
    sol1:
    select count(*), sum(nvl(a.pitm_matl_cost,0)),
    decode(b.pm_assy_type,'B','B','Z')
    from pumpitems a, pumpmast b
    where a.pitm_proj_code like 'KAWASII' and
    a.pitm_pump_type = b.pm_pump_type and
    a.pitm_comp_type = b.pm_comp_type and
    a.pitm_sr_no = b.pm_sr_no and
    substr(a.pitm_matl_code,1,1) = 'X' and
    pitm_itm_cal = 'N'
    /*and
    substr(a.pitm_matl_code,1,1) != 'C' and
    substr(a.pitm_matl_code,1,1) != 'F' and
    substr(a.pitm_matl_code,1,1) != 'S'*/
    group by decode(b.pm_assy_type,'B','B','Z')
    order by decode(b.pm_assy_type,'B','B','Z')
    count(*) is return 0 but it's notworking in this query why i dont no
    another soluction than help

    This sounds like it's similar to another recent post
    Re: How do I print some value when there is no record against field

  • IR Search bar display on the right when no data found

    How do I get the Interactive Search bar to be left justified when no data is found. I'm using Sand 10 Theme, and the region my interactive report is in is Page Template Region Position 3
    Does anyone have a suggestion on this?
    Edited by: deandyno on Aug 22, 2011 12:31 PM

    deandyno wrote:
    How do I get the Interactive Search bar to be left justified when no data is found. I'm using Sand 10 Theme, and the region my interactive report is in is Page Template Region Position 3
    Does anyone have a suggestion on this?Have you actually considered where Region Position 3 is located on the page? Content in regions that are located on the right tends to be displayed on the right.
    From the dimensions specified in the page templates it's also clear that region position 3 is intended to be used for narrower content than the average interactive report.
    Consider using either a more appropriate region position or a different theme (theme 10 is ugly as sin anyway).

  • How to hide buttons when no data found!!

    Hi All,
    I have created two regions
    1. Serach region
    2. Results region.
    Initally when the page loads by using hidden vaiable i am bale to hide the "results regions" once they clik on that serach button i am displaying the region of results region along with teo more buttons as "export" and "print" buttons.
    It is showing fine when data exists under Reulst region.
    But when no data is return i am displaying the message as "No data found" but along with this it is displaying "export" and "print" buutons.
    This buttons needs to display only when the data exists under Results region.
    Thanks,
    Anoo..

    abhishek8299 wrote:
    Use SQL (Exists) in the condition and write an sql statement there.use this
    SELECT
    1
    FROM form1 MF,bench1 BM,
    participant1 PP,key1 KT
    WHERE MF.ENGAGEMENT_ID=BM.ENGAGEMENT_ID
    AND BM.ENGAGEMENT_ID =PP.ENGAGEMENT_ID
    AND PP.ENGAGEMENT_ID =KT.ENGAGEMENT_ID

  • SQL statement - when no data found

    I have this SQL statement as follows:
    SELECT (Case When tar_customer_id <> 0 Then tar_customer_id Else 0 End) INTO l_balance_customerID FROM sh_ba_balance WHERE tar_customer_id = p.customer_id;    However, when I tried run it, I have this error:
    ORA-01403: no data foundHow do set l_balance_customerID as 0 when no data is found?

    [url http://forums.oracle.com/forums/thread.jspa?messageID=2754839&#2754839]duplicate thread

Maybe you are looking for

  • I have to upload a folder to the server

    Hi all, My requirement is i have to upload a folder through jsp page to the tomcat server, but i am not aware of that, i know only file uploading using html tal type=file, so can any one please send me the code to upload a folder to the server(specif

  • What happened to highlighting full paragraphs when you double click on a piece of text?

    When ever I double click I cannot highlight the entire text for some strange reason. And this happened all of a sudden. Because I was having no trouble about a few days ago but all of a sudden now when I double click on one word it only highlights th

  • Wonder if anyone can help me out here... (Updating Music on ipod)

    Ever since I bought my iPod, about three weeks ago, I've had a really bad problem: Each time I try to update my iPod with new music (either manually or automatically), the music in my computer will begin to transfer, but at any given point, the updat

  • ENTER instead of pressing a JButton

    Currently I add text from a JTextField into a JTextArea when I press a JButton. Now I want this also when I press the ENTER-button instead of clicking on the JButton. How does this work?

  • Regarding SQL Database Initialization

    Hello All, I had an existing working version of LiveCycle on Server A which had two drives; A.1 and A.2. Do to space constraints we decided to move the Adobe LiveCycle ES2 folder from drive A.1 to A.2. We had not created anything so we werent worried