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

Similar Messages

  • 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

  • No data found in report csv or pdf output on first page load

    No data found in report csv output on first page load. Report shows up on page, but no data found in csv or pdf output. I always need to submit the page and then it shows data in downloads. The page contains a form (read-only) with a report that references 4 page items by using something like the following:
    and b.employee_no = v('P5_EMPLOYEE_NO')
    and c.fisc_year_pk = v('P5_FISC_YEAR_PK')
    and b.job_class = v('P5_JOB_CLASS')
    and b.organization = v('P5_ORGANIZATION')
    Again, report in the page shows up except there is no data in downloads. Can anyone help me solve this problem? I'm running Oracle APEX 4.2.1 in Oracle database 11gR2.
    Thanks.

    Sounds like a classic session state issue.
    You need to populate you page items using page rendering computations to ensure they're set to session state.
    Or if the download is triggered from a button press, you need to ensure those page items are submitted to session state, perhaps via a PL/SQL action.
    Scott

  • Report export to csv - no data found in report

    Hi all,
    I've followed the steps to export my report to a csv file. In the Report Attributes, Report Export section I have:
    Enable CSV output: Yes           Separator: ,           Enclosed By:
    Link Label: Export
    Filename: Changes.xls
    But when I open it in excel, no data found is the only test showing in cell A1.
    Is there something else I need to do? I don't understand why it's not exporting my report - there is data on my screen in the report.
    Thanks,
    Dave

    Dave,
    Have a look in my blog:
    http://deneskubicek.blogspot.com/2007/03/csv-export-problem.html
    There is an explanation on how to avoid that.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • No data found for Report

    Hi, I am new to Apex so please be clear with your answers.  We use a report based on a view when I access the report in the application I receive "no  data found" error.  If test the query in SQL commands it works fine.  If I check the view in object browser I see data.  I am perplexed as to why I receive a no data found error on the front end.  Any suggestions will be greatly appreciated.  Thank you in advance.
    Apex Version:   4.1.0.00.32
    Newbie tryin to learn(Texas twang)

    Thank you for your quick response!  Sometimes as a tech we look for the hard answer vs the easy one.   One of the binding variables(P0:PLANS) was misspelled after correcting the issue we were able to see the report.

  • No data found on Report based on a collection

    Hi all,
    I got a page with this 'after-header' process :
    begin
      if(apex_collection.collection_exists(p_collection_name => 'users')) then
        apex_collection.delete_collection(p_collection_name => 'users');
      end if;
      apex_collection.create_collection_from_query(
        p_collection_name => 'users',
        p_query => 'select user_name from demo_users');
    end;And then, I try to display the collection data in a report, like with this SQL statement.
    select *
    from apex_collections
    where collection_name='users'I got a 'No data found' for this report... I try this very basic example to understand collections, and I don't know what I'm missing...
    Thanks a lot
    Dovik

    Hi,
    No problem
    Check collection naming
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/advnc.htm#CIHHCGGD
    Have nice day
    Br,Jari

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

  • Strange problem: ORA-01403: no data found when report has a sort

    Hi,
    I have a report which behaves very strangely but only for one particular user. The report runs fine when no columns are set as sort-by in the report attributes. As soon as I try and set a column to sort (any column, it doesn't matter) this user gets the error message:
    failed to parse SQL query:
    ORA-01403: no data found
    appear where the report should be on the page. The rest of the page displays OK. No other users are affected. If I remove the sort then the report is OK for this user (unsorted though!)
    The report is a structured query with custom column headings, nothing unusual, quite basic. I have tried exporting and reimporting the page but it doesn't fix it. Same behaviour for this particular page in our test system as well.
    I could rebuild the page but I'd rather know what is wrong in case it happens to some other region.
    Thanks,
    Steve

    Steve,
    The reports engine stores the sort settings in the user preferences. This is done so that when you return to a report, it maintains the earlier sort settings. Like in your response to the HTML DB studio posting, you would keep your report sorted by "Created On" descending or ascending even when you come back another time. It's save to remove those preferences; all that's going to happen is that your users will see the report using the report's default settings the next time they go to that page. I will try to investigate this problem further, whatever additional information you can provide, will be helpful,
    Marc

  • 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

  • Show "No Applicable Data Found" for Report 0SD_C01_Q22

    Hi Gurus,
    I just activated BI Content Report, 0SD_C01_Q22 and it's relevant InfoSource,  DataSource and so on. The data from R3 were loaded into the infoCube successfully.
    However, it shows "No Applicable Data Found" when I executed the query.
    I have tried to create a new query based on the same InfoCube but has NO limitation parameter. However the result was the same.
    Can anyone consult out?
    Cheers

    Hi my friends,
    I have tested it with a really simple report that has no selection condition. But the result is the same.
    Also, I have checked the data in infoprovider with LISTCUBE but the data are definitely available.
    By the way, I test it with an account hazing profiles as SAP_ALL and S_A.SYSTEM. The super user account should have enough authorization.
    So my friends, anymore ideas? Pls help out....
    Cheers.

  • Hide region if no data found in another region

    I have 2 regions on a page.. I'd like to hide the second region if no data is returned by the SQL query in the first region.
    I know that the obivious way to do this is to use the same SQL in the second region and make it conditionally display. But I don't want to run the SQL twice against the database for performance reasons.
    Is there any (preferably easy) way to check the contents of Region 1 from Region 2 and hide Region 2 if Region 1 has no data in?

    Hello,
    You can write a javascript function, that will check whether you report has any rows, if not will some APEX flag item.
    For example, after the report will be fetched you can write something like this:
    <script type="text/javascript">
    var els = document.getElementById('R1708927825979432').rows;
    if (els==0){document.getElementById('P1_FLAG').value=0;}
    </script>
    I'm not exactly sure that it will work, but you can try....
    Best Regards, Kostya Proskudin.

  • Hide 'No data found' msg in report region  when you 1st click search page

    Hi,
    (sorry if it's confusing but my APEX is in FRENCH and I tried to translate)
    I created a search page in my application.
    1- I have an HTML region, with a search box and I search button
    2- I've got a report region (PL/SQL source) which sometimes returns no data, giving a 'No Data Found.' message.
    When I click on the search page for the 1st time (on my navigation bar), I would like to HIDE the report region so I don't have the " No Data Found" message.
    Only Once we click on the search button and there is no result, I want to have the message "No Data FOund"
    How can I achieve this?
    thanks
    Roseline

    1. create a hidden element on your page (P1_HIDDEN_ELEMENT)
    2. put your No Data Found message in a span tag
    <span id="no_data_found">No Data Found</span>3. create an on load computation to set your P1_HIDDEN_ELEMENT to 'no_data_found' if it is NULL and to set it to ' ' if it is NOT NULL - type PL/SQL Function Body
    BEGIN
       IF :p1_hidden_element IS NULL
       THEN
          RETURN '<script>html_HideElement(''no_data_found'');</script>';
       ELSIF :p1_hidden_element IS NOT NULL
       THEN
          RETURN ' ';
       END IF;
    END;4. Put this into the page footer:
    &P1_HIDDEN_ELEMENT.The other solution would be to create a display region - pure HTML and to display that first. Once the search is started that region would remain hidden and only the report would show up.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Listview Report: how to hide "no data found" message

    Good evening everybody,
    I use the "jquery mobile theme 50" and the "listview report" of it. The report always shows "no data found"-entry  if the source query doesn't return any row.
    Is there a way to suppress this entry in Apex? I can hide "no data found"-entry in html using CSS, but I don't want to have it in the html at all.
    Has someone an idea?
    Thanks a lot!
    Jewgenij

    Thank you very much for the answer!
    Unfortunately it works only for desktop themes but doesn't for jquery mobile Theme 50 :-)
    The help text for the listview's (jquery mobile Theme 50) property "No Data Found Message" is
    Defines the text message that displays when the query does not return any rows. If no value is specified the text of the system message APEX.REGION.NO_DATA_FOUND_MESSAGE is used.
    BR
    JeMo

  • "no data found" run-time error masking SQL/report mismatch

    Hi all,
    At last, figured out a vexing problem and wondering if anyone else either:
    a) has also hit the problem, and hopefully
    b) has figured out a clever way around it.
    Namely, in our AppEx apps, we rely on SQL query generation from PL/SQL packaged functions. This "best practice" promotes reuse, automated testing, etc. Great idea - works great.
    However, we've repeatedly come across a situation where we go to run a page with a report on it only to get a "report error: ORA-01403: no data found" message where the report should be. Not much to go on. After trial and error, it turns out that simply going to the Region Definition page (where the PL/SQL function call is defined) and clicking the "Apply Changes" button cleared the problem up.
    Mystifying because the actual SQL query generated by the PL/SQL is valid (we've got a nightly testing job that pulls the PL/SQL function calls out of the AppEx metadata tables, executes them to get back the SQL and then validates the SQL).
    Turns out this problem looks to be a result of columns changing in the actual SQL itself, and hence not matching up to the Region Attributes (column names, one assumes) that AppEx knows about. Simply clicking Apply Changes causes AppEx to validate the returned query and then it adjusts the column attributes (one assumes) so that things match up.
    So - the $64,000 question(s):
    1) Are there any cool AppEx APIs to be able to try and detect this situation? Given an app of middling complexity (50-100 pages, each with various queries/reports), this is not an attractive issue to deal with manually.
    2) Any cool AppEx APIs to fix, or auto-sync these situations? (Essentially programmatically calling the "Apply Changes" button if you will).
    At a minimum, it would be great if AppEx could be updated to put out some kind of more informative error message when this occurs - maybe something along the lines of "Region Attributes Do Not Match Data Returned from Query", or something like that at least.
    Thanks for any input/ideas,
    Jim C.

    Thanks to all for your prompt responses.
    Vikas actually did me the favor of pretty much clarifying my info for me (tks Vikas). Yes, to all the above. It's PL/SQL code generating a SQL query, so 1 is (a); we want to use query-specific columns so it is (2a). And yes, the whole problem is that the something does change to cause the SELECT statement column list to change...nature of the beast, so "don't do that" doesn't really help here.
    Scott - sorry, should have been more explicit. Basically, we have a PL/SQL function behind a report that returns a SQL statement for the report. If that PL/SQL code changes to add a new column to the report (without going to the corresponding Report Attributes page and clicking the "Apply Changes" button to get AppEx to revalidate the query), then you wind up with this "no data found" error msg, which doesn't exactly point you to the root of the problem.
    It seems as though the "parse at compile-time" is really what's going on here. There must be some kind of "run-time" check going on as well, that is resulting in the "no data found" message. Seems as though it ought to be fairly straightforward to add some kind of check at run-time to handle that exception a little cleaner. Is there an official process to register a "Request for Process Enhancement" for AppEx to do this?
    In the meantime, thank you Vikas for the pointer to the APEX_APPLICATION_PAGE_RPT_COLS view - that looks like it will do the trick nicely. Given that, we can now add logic to our nightly "app tester" job that can compare what columns AppEx expects to find in a given report (for a given page) with the actual SQL (coming back from the PL/SQL function call) to essentially "validate" the AppEx meta data and at least let us know when these things get out of sync.
    BTW - if anyone would be interested in the actual contents of that "app tester" logic, I'd be happy to post it (someplace...here? Studio site?). It's basically just a PL/SQL block of code that currently runs in cron that just validates any SQL embedded in our app. (I suppose it is a little "hard-coded" since it does use our naming conventions for packages/functions to parse the PL/SQL calls from the Meta Data but it might still serve as a usefull starting point...) Since our AppEx app(s) sit on top of a database schema that is in fairly constant flux, we need the ability to know when somebody has changed something in the schema that needs to be accounted for in AppEx. The job primarily just parses the AppEx meta data to find PL/SQL function calls that return SQL, executes that PL/SQL to get the generated SQL, then just validates that SQL and reports back any invalid SQL calls. Perhaps we're in some unusual development environment (15-20 people working on a database schema with 700-800 tables/views) but it seems as though it would be fairly easy, for anybody using PL/SQL to generate SQL (which is a GREAT and powerful thing, by the way - thanks to whoever thought that up in AppEx land) to run into this issue.
    Jim C.

  • Change the 'No data found.' message in a report region

    I've got a report region (PL/SQL source) which sometimes returns no data, giving a 'No Data Found.' message.
    I couild have sworn there was an option to choose a custom message in the region definition when no data is returned - but I can't see that option. I guess it must have been in another region type.
    Is there some other way of setting the No Data Returned message?

    Hi,
    Check out this post:
    Hide the 'no data found' message
    I hope that helps.
    -Marc

Maybe you are looking for

  • Training and Event Management (PE) - What does PE stand for?

    Hi Re: Training and Event Management (PE) Can someone tell me what (PE) stands for? I have had a look at the documentation on SAP Help but cannot see what this stands for.  I want to use this in the naming convention in my role stategy but need to un

  • HD to Pal SD 16:9 DVD issues

    Hi all, I have searched the forums for days and can't find the best solution; I'm having trouble creating a Good PAL 16:9 SD DVD from a HD Source. The issues I'm having is the DVD looks washed out and very soft, also the graphics look bad with lines

  • How to access SQL server in oracle running in aix unix?

    Hi all, I have oracle database running in IBM AIX OS, and I need to query data in SQL SERVER 2000. How to do that? Is there free Sqlserver ODBC drivers for unix? Thanks

  • How do I find-out what version OS I'm running?

    New Apple user - how do I find out what OS I'm running on my Macbook Pro?

  • Text effects bridge to AE CS3

    HI, I'm using AE CS3 and I've imported some text from photoshop, place it in the timeline,select it, go to Adobe Bridge, select the typewriter fade in effect, double click that and I get: "can't import file: unsupported filetype or extension" when I