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

Similar Messages

  • Hide button if no data found in report

    Hello,
    I am using oracle 10g apex 3.2
    I am displaying a report with print button.
    What i want is if the report doesn't show any data i.e. no data found then i want to hide print button.
    How to do this.
    thanks
    Swapna

    Hi Swapna,
    In the print button's Condition, select condition type as 'EXISTS (SQL Query returns atleast one row)' and in expression1 copy and paste the report SQL.
    Regards,
    Sagay

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

  • How to pop up if no data found in Crystal Reports XI

    Hi,
    Can you please suggest me how to alert message if no data found?
    Thanks and regards,
    Manjunath N. Jogin
    Edited by: Manjunath N Jogin on Jan 21, 2010 2:53 PM

    To Create a alert the following things has to done
    Goto Report menu --> Alerts --> Create or Modify Alerts --> Click on New button.
    Give the Name as No Records Found and then click on the Condition button and give the condition as
    count({field}) = 0 // Where {field} is any DB field used in the report
    This will create the alert. At each refresh it will alert you.
    Write a formula in the report  as  ie.,Alert Message and give the condition as
    If IsAlertTriggered ("No Records Found") Then
    " No Records Found "
    You can use this formula field in the report to show No Records Found when there is no records available.
    Hope it might help you!

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

  • How to Hide/show the columns data while doing Drill down or drill up

    Hi ,
    How to Hide/show the columns data while doing Drill down or drill up in webi report .
    Does it possible BO 3.1 version ?
    Please suggest me on this.
    Thanks & Regards
    Venkat

    While that is not there yet, you can make use of the show when empty yes/no in combination with alerters.
    So I have an alerter applied to every cell of the table.
    When a condition is true (say I drilled down) I just put = "" in every cell, emptying the table,
    because its now empty and doesn't need to show, it wont.
    For the detail table I use the opposite, so when you drilled down it becomes visible...
    Hope this helps all that do not have 40 yet
    Good luck,
    Marianne

  • How to change the default "no data found"

    Hi,
    Is there a way to change the default "no data found" message of the "When No Data Found Message" in the Report Attributes?
    I would like to change that message for a French message. I know that I can change it manually in every section, but I would like another default messages appearing when i create a Report Section.
    Thanks

    Can you point me to a tutorial?Sure, Users Guide > Managing...Globalization (Chapter 15?)
    Is this not happening at run-time?Yes. What happens at runtime is the selection of the application to run. If you run a page in the Application Builder (app 4000) and that application had not been translated or your browser language were set to some flavor (flavour) of English, you get 4000. If app 4000 had been translated to French, say, and you request a page in 4000 and have your browser language set to French, then you'll really run the requested page from app 4002 which is a copy of 4000 translated to French long before your request came along.
    If you look at our distribution, you'll find 9 (or more) versions of each of the internal applications in the builder directory.
    Scott

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

  • How to get group when the data source from system instead of UME database

    Hig guys,
    How to get group when the data source comes from backend system instead of UME database?
    I tried to use
    IUMPrincipal RefGroup = WPUMFactory.getGroupFactory().getGroup(groupName);
    But I was not able to get the group. But in "UserAdministrator", I can find this groupName.
    Which kind of API can I use?
    Thanks in advance!
    Regards,
    Liying
    Message was edited by:
            Liying Wang

    Ok,
    try this:
    com.sapportals.portal.security.usermanagement.IGroupFactory ep5GroupFactory = userManagementService.getGroupFactory();
    IGroupFactory groupFactory = UMFactory.getGroupFactory();
    com.sap.security.api.IGroup group = groupFactory.getGroupByUniqueName(groupName);
    IUMPrincipal ep5Principal = ep5GroupFactory.getEP5Group(group);
    This should do the trick,
    Romano
    PS: and thanks for the stars!

  • 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

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

  • LOV cancel button displays 'No Data Found'

    I have 5 fields on a form where the users can search different information based on what they type into the search fields. Once they have their search criteria they hit a 'Search' button, I have a when_button_pressed button trigger on the search button. On this trigger I have logic to build a record group dynamically, after the RG gets populated dynamically I am using the SHOW_LOV bulit-in to present my LOV to the end user. All this works well, however, there is a new requirement in where the client wants a 'no data found' message displayed on the screen when users type arbitrary/invalid information on any of the search fields. I was able to accomplish this by simply putting the following code in the ELSE part of my main IF statement for my LOV.
    ELSE
         IF NOT SHOW_LOV('LIAB_LST_LOV')THEN
              display_message('No Data Found');
              END IF;
    END;
    The code above displays the message they want to see when search users search on invalid criteria. So finally, here is the issue, when they search on VALID criteria the LOV obviously pops up without any issues but if users click the 'Cancel' button in the LOV window they get the 'No Data Found' message above too. They only want to see the message if there is invalid data searched.
    How can I make sure that after the LOV gets populated my code doesn't return the No Data Found message when they press Cancel on the LOV?
    Thanks,
    Adrian

    Hi Francois,
    I used the get_group_row_count you suggested and I was able to incorporate it into my code without any issues and more importantly it is working now! This is what I did, after populating the record group, I checked to see if the row count was greater than 0 for the RG if it was not then I’m displaying the message. It is working correctly.
    Thank you!
    Adrian

  • How to hide button in fb60 by transaction variant.

    Hi experters,
    I want to hide button some buttons in transaction code: fb60 by transaction variant(SHD0)
    transaction code: fb60, input some date,
    and then  click simulation button,
    then go to the simulation screen,
    I want to hide some button on this screen,
    but I find it is impossible to hide it.
    because  when I click enter button, there is no response ,
    there is no screen popup, so I cann't  hide any field or button with transaction variant.
    Please help me...
    Regards,

    Thanks .
    I want to use transaction variant to  hide that button,
    I tried using transaction variant, I have created transaction variant on initial screen's variant of fb60,
    but I found I can't recored that screen of simulation screen.
    can any one have any idear??
    Thanks.
    Edited by: harry wang on Jan 7, 2009 5:43 AM

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to pop up alert "No Data found" if there are no values in database

    Hi All,
    Please tell me how to pop up alert if there is no data found and all fields are null in report for given parameter value. or else is there any way to trigger user while entering parameter value that wrong parameter value. (I dnt want to use drop down) in my report.
    Please help me. Any help will be valuable.
    Thanks.

    There's no way that I know of to do this as a "Pop-up", but providing a "no records returned" warning still easy enough to do.
    Just insert a new Report Header section...
    Add a text box that has whatever message you'd like to display.
    Right click the new header section and choose Selection Expert
    Click the X-2 button next to Suppress (No Drill-Down)
    Enter a formula similar to this...
    IF COUNT({TableName.FieldName}) < 1 THEN FALSE ELSE TRUE
    This will suppress the warning if records are present and display it if there are none.
    HTH,
    Jason

Maybe you are looking for