Display button CREATE only if SQL Report (form report) contains no data.

Hello

I have a created a form with report (page 1 & 2). By default, APEX creates all the buttons.
I want to display the button CREATE in the SQL report (page1) only if there is no data, if the report shows a line, I'm not display button to CREATE.

Is there any way I can store (returns the value of the report) *... no data found... * as flag '0' to a certain place and then use the CONDITIONAL DISPLAY for the button CREATE based on this indicator.

Thank you
Deepak

Hi Dan,.

I think that these substitution strings are there to custom paging purposes - but this particular one (#TOTAL_ROWS #) is useful for this sort of thing.

Dembélé - Sorry, just reread your post and saw that you only want to display the button when there is no line!

Button attributes to the button, put:

ID="P137_TEST_BUTTON" style="visibility:hidden"

and in area foot region, put:

<script type="text/javascript">
if (#TOTAL_ROWS# == 0)
{
 $x('P137_TEST_BUTTON').style.visibility = "visible";
}
</script>

OTN workspaces are down now (again!), so I can't update my example page - but, I hope, you should get the idea of this

Andy

Tags: Database

Similar Questions

  • want to create Searchbar on SQL report

    Hi evryone...
    I had created SQL report in my application... But I coould nt find option of bar of serch who create generally with interactive report... so if I want to create serchbar in my SQL report so how could I able to do this thing?

    Thanks in advance

    Rommy

    Hi Rommy,

    Take a look at my first post in this thread: Re: option search for a page of REPORT FORM AND.

    Concerning

    Andy

  • Problem with SQL report to modify data

    Hi all

    I don't know that I'm writing this question in the right page or not. But my question is: I have a column in my table which is of type varchar. Data in this column are as Fallows:

    257414/45y
    194662223445 8877/j7tg
    .....
    I wanted to know, is anyway I can show this data in my report without any / or - fallow:

    25741445y
    1946622234458877j7tg

    Just for your information, this is a sql report.

    Thank you

    I read your question because how do you remove both the ' / ' and '-' characters. If true do as follows:

    Select REPLACE(REPLACE('194662223445-8877/j7tg','/'),'-','') from DUAL
    

    At the end of the statement where ") of the DOUBLE appears, these two single quote characters have no space between them. That means replace NULL for the characters you want to replace.

    You can test the statement leaving from DOUBLE. Once satisfied, change it to 'from MyTable '.

    I don't know what to tell you on the TTITLE. It of what I used and always works to print a title.

  • Change the template to display the columns as a SQL report

    Hi all

    Really urgent. We have a process and we use a pl/sql block to get the query. The page layout is not pleasant so they want to watch me model and change it if the result looks like a sql query.

    Thank you.

    Hello

    OK - I just wanted to check that I was getting a bit confused!

    Change the header of the region setting to:

    <style type="text/css">
    #myreport table {border: 1px solid #CCCC99; border-collapse:collapse; empty-cells:show;}
    #myreport th {background-color:#CCCC99; border-color:#FFFFFF; border-style:solid solid none; border-width:1px 1px medium; padding:2px 8px; white-space:nowrap; border-collapse:collapse; color:#336699;}
    #myreport td {background-color:#F7F7E7; border-color:#CCCC99; border-style:none solid solid none; border-width:medium 1px 1px medium; border-top:none; padding:2px 8px; white-space:nowrap; border-collapse:collapse;}
    </style>
    <div id="myreport">
    

    Andy

  • Display buttons in a region report only if there is data in the report

    Hi friends,

    I have a region of report in which there is a report, 2 buttons and a text field. I want to show these buttons and

    text field only if there is data in the report. How can I do this? Help, please


    Thank you

    TJ

    Hello

    Define buttons conditionally as Exists (SQL query returns at least one row). The same use and the WHERE clause as your report, but change the SELECT part

    SELECT 1 
    

    BR, Jari

  • How to create 2 buttons for printing on a sql report?

    Hello
    I'm working on the apex 4 and 11 GR 2 database, I set up bipublisher for advanced printing.
    On a sql report I want to have excel button and a Pdf with the redirect URL button.
    I don't know how to specify the output format in the URL.
    I see in the help
    "use the output format derived from the option element and include the name of the element and the value in the URL of your impression."
    but I'm looking for an example of a URL.

    Best regards
    Jean-Marc

    So, you must specify a hidden item that contains the value, then specify the name of the item in print attributes (mine is P5000_TYPE)

    Then you'd have button redirect URL:

    JavaScript:Redirect('f?p=&APP_ID.:&APP_PAGE_ID.:&session.:FLOW_XMLP_OUTPUT_R1483125430108678:::P5000_TYPE:PDF'); and
    JavaScript:Redirect('f?p=&APP_ID.:&APP_PAGE_ID.:&session.:FLOW_XMLP_OUTPUT_R1483125430108678:::P5000_TYPE:XLS')

    to print in pdf and xls respectively.

    Van
    Trent

    Published by: trent on December 10, 2010 23:29

  • How to create a button to download files in the form?

    How to create a button to download files in the form?

    Hello

    Please refer to the link below with a similar discussion.

    Download file button

    Kind regards

    Vivek

  • Buttons created in InDesign does not display correctly in Acrobat ms

    I have problems with show it buttons created in InDesign CC (2014) and exported to interactive PDF on Acrobat DC. These keys are used layer effects such as drop shadow and transparent. The large buttons displayed in Acrobat XI.

    Acrobat XI:

    acrobat xi.jpg

    Acrobat cc:

    acrobat dc.jpg

    The buttons used a transparent white layer to simulate glare. As you can see, it comes out black in DC! Shadow added white coloring knocking out the buttons on the background instead of mix well. I can avoid using these methods of styling in the future projects, but this project has used these buttons for several years, and now several years worth of PDF files displayed correctly for anyone who updates for DC!

    Finally! Adobe has released an update Acrobat today that solves the problem! (Version 2015.008.20082)

  • How to convert sql report interactive report

    Hi all

    I have a Sql report and I want to convert in interactive report. I found the option at the top to the right side "Interactive report migrate" but only 3 option to pass parameters.

    In my SQL report (Edit button) is here and I'm passing 6 values through this button change, how can I migrate my SQL report interactive report? Please suggest me...

    Thank you

    Xandot wrote:

    In the report links SQL query looks like:

    1. case Type
    2. When 3 then
    3. (select the T_STYLE Style where STYLEID =?)
    4. When 1 then
    5. 'Edit'.
    6. else '||','|| ||','|| ||','|| ||',30>Edit'
    7. end
    8. When 2 then '| «, » || ||','|| ||','|| ||',30>Edit'
    9. When 1 then '| «, » || ||','|| ||','|| ||',30>Edit'
    10. end as change

    How to implement above interactive links, until now that I created the link on interactive using links like report:

    But here its me allow only a single URL, how to put different URLS of in accordance with the condition, please suggest me.

    There is no declarative support for generating links conditionally to line level in interactive reports (or indeed in the standard reports). Set the IR link column property to exclude the link columnand generate the link in the request in the original report. Set the Type of display attribute for the column Edit to report Standard column.

  • 4.2 - column link works only with interactive report (IR)

    Greetings-

    I have a screen with an interactive report (IR) and a tabular report on it. There is a radio button used to switch between them, of course, both of them have conditional logic based on this button. If the tabular report is the default value, everything works fine. If the interactive report is the default, then the 'link' on the IR used to display single details comes in white.

    Note that if the IR is by default, but you switch to tabular and then back to IR before trying to put in place the single record view, fine. It's almost as if something is not be instantiated unless the table view is loaded.

    The option button and the two reports are in the same region.

    Anyone has any idea on this?

    Thank you
    Scott

    Published by: DenverScott on April 30, 2013 09:14

    Published by: DenverScott on May 2, 2013 05:31

    OK, I looked inside. It is a common problem, but you have reached a particular example of this, because it seems that you need not the value of P2_REPORT_SELECTOR in your SQL for IR.
    BUT do you it because you have on your health.

    So, there are two simple ways to solve this problem. As I mentioned previously.
    1. you must fill in the field "Page elements must send" in the IR with P2_REPORT_SELECTOR
    I did it.
    What it does it does the value of P2_REPORT_SELECTOR available in persistent session state so that the AJAX call can seen that the condition is met and that the report should be displayed/rendering.

    2. the other option is a calculation on P2_REPORT_SELECTOR who rule on 1 when P2_REPORT_SELECTOR is set to null. I left this calculation, but it set to never right now. It's the same effect net because calculations save values to persistent session state.

    Without the value of P2_REPORT_SELECTOR to persistent session state, the value is only in memory during rendering. That's why the page renders correctly. BUT so that the report to switch to the display of the page one needs to know the value of P2_REPORT_SELECTOR and the value was NOT in permanent session state, therefore not available for the AJAX call, which updates the State.
    Same thing when VC has been sent, it saves the value of P2_REPORT_SELECTOR in persistent session state. Same as switching the button radio.

    I hope this help out you.
    -Jorge

  • Need advice on SQL report base to APEX or jasper

    Hi all

    I need some advice on how to approach the question under the requirement of report. It was me mad for almost 2 weeks now, and my time is running out.
    Here is a simplified version of the database

    Four paintings: event, Service, commitment, defendant.
    A defendant may have more than 1 commitment, but they only open at a time commitment.
    For each commitment, they will have services and events.
    These events may be just general events or related to the service.
    Here's the script for tables and sample data
    CREATE TABLE "DEFENDANT" 
       ("DEF_ID" NUMBER, 
         "FIRST_NAME" VARCHAR2(50 BYTE), 
         "LAST_NAME" VARCHAR2(50 BYTE), 
         "ACTIVE" NUMBER DEFAULT 1
       ) ;
    Insert into DEFENDANT (DEF_ID,FIRST_NAME,LAST_NAME,ACTIVE) values (1,'Joe','Bloggs',1);
    Insert into DEFENDANT (DEF_ID,FIRST_NAME,LAST_NAME,ACTIVE) values (2,'John','Doe',1);
    --------------------
     CREATE TABLE "ENGAGEMENT" 
       ("ENG_ID" NUMBER, 
         "DEF_ID" NUMBER, 
         "COURT_NAME" VARCHAR2(20 BYTE), 
         "DATE_JOINED" DATE, 
         "DATE_TERMINATED" DATE, 
         "ETHNICITY" VARCHAR2(50 BYTE), 
         "ACTIVE" VARCHAR2(20 BYTE)
       ) ;
    /
    
    Insert into ENGAGEMENT (ENG_ID,DEF_ID,COURT_NAME,DATE_JOINED,DATE_TERMINATED,ETHNICITY,ACTIVE) values (1,1,'AAA',to_date('01/09/12','DD/MM/RR'),to_date('20/09/12','DD/MM/RR'),'European','1');
    Insert into ENGAGEMENT (ENG_ID,DEF_ID,COURT_NAME,DATE_JOINED,DATE_TERMINATED,ETHNICITY,ACTIVE) values (2,2,'BBB',to_date('01/10/12','DD/MM/RR'),null,'Asian','1');
    Insert into ENGAGEMENT (ENG_ID,DEF_ID,COURT_NAME,DATE_JOINED,DATE_TERMINATED,ETHNICITY,ACTIVE) values (3,1,'AAA',to_date('22/09/12','DD/MM/RR'),null,'European','1');
    -------------------------------------------------------- 
     CREATE TABLE "EVENT" 
       ("EVENT_ID" NUMBER, 
         "ENG_ID" NUMBER, 
         "NOTES" VARCHAR2(20 BYTE), 
         "RELATED_SERVICE_ID" NUMBER, 
         "START_DATE" DATE, 
         "END_DATE" DATE, 
         "ACTIVE" NUMBER DEFAULT 1
       ) ;
    /
    --------------------------------------------------------
    Insert into EVENT (EVENT_ID,ENG_ID,NOTES,RELATED_SERVICE_ID,START_DATE,END_DATE,ACTIVE) values (1,1,null,1,to_date('01/09/12','DD/MM/RR'),to_date('02/09/12','DD/MM/RR'),1);
    Insert into EVENT (EVENT_ID,ENG_ID,NOTES,RELATED_SERVICE_ID,START_DATE,END_DATE,ACTIVE) values (2,1,null,1,to_date('23/09/12','DD/MM/RR'),null,1);
    Insert into EVENT (EVENT_ID,ENG_ID,NOTES,RELATED_SERVICE_ID,START_DATE,END_DATE,ACTIVE) values (3,1,null,2,to_date('15/10/12','DD/MM/RR'),to_date('16/10/12','DD/MM/RR'),1);
    Insert into EVENT (EVENT_ID,ENG_ID,NOTES,RELATED_SERVICE_ID,START_DATE,END_DATE,ACTIVE) values (4,2,null,null,to_date('02/10/12','DD/MM/RR'),null,1);
    Insert into EVENT (EVENT_ID,ENG_ID,NOTES,RELATED_SERVICE_ID,START_DATE,END_DATE,ACTIVE) values (5,2,null,2,to_date('03/10/12','DD/MM/RR'),null,1);
    Insert into EVENT (EVENT_ID,ENG_ID,NOTES,RELATED_SERVICE_ID,START_DATE,END_DATE,ACTIVE) values (6,3,null,null,to_date('22/09/12','DD/MM/RR'),to_date('23/09/12','DD/MM/RR'),1);
    Insert into EVENT (EVENT_ID,ENG_ID,NOTES,RELATED_SERVICE_ID,START_DATE,END_DATE,ACTIVE) values (7,3,null,4,to_date('23/09/12','DD/MM/RR'),null,1);
    Insert into EVENT (EVENT_ID,ENG_ID,NOTES,RELATED_SERVICE_ID,START_DATE,END_DATE,ACTIVE) values (8,2,null,null,to_date('12/10/12','DD/MM/RR'),null,1);
    --------------------------------------------------------
     CREATE TABLE "SERVICE" 
       (     "SERVICE_ID" NUMBER, 
         "ENG_ID" NUMBER, 
         "DESCRIPTION" VARCHAR2(200 BYTE), 
         "DATE_STARTED" DATE, 
         "DATE_TERMINATED" DATE, 
         "ACTIVE" NUMBER DEFAULT 1
       );
    /
    
    Insert into SERVICE (SERVICE_ID,ENG_ID,DESCRIPTION,DATE_STARTED,DATE_TERMINATED,ACTIVE) values (1,1,'Counselling',to_date('15/09/12','DD/MM/RR'),to_date('18/09/12','DD/MM/RR'),1);
    Insert into SERVICE (SERVICE_ID,ENG_ID,DESCRIPTION,DATE_STARTED,DATE_TERMINATED,ACTIVE) values (2,1,'Housing',to_date('20/09/12','DD/MM/RR'),null,1);
    Insert into SERVICE (SERVICE_ID,ENG_ID,DESCRIPTION,DATE_STARTED,DATE_TERMINATED,ACTIVE) values (3,2,'Treatment',to_date('01/10/12','DD/MM/RR'),to_date('15/10/12','DD/MM/RR'),1);
    Insert into SERVICE (SERVICE_ID,ENG_ID,DESCRIPTION,DATE_STARTED,DATE_TERMINATED,ACTIVE) values (4,3,'Housing',null,null,1);
    Insert into SERVICE (SERVICE_ID,ENG_ID,DESCRIPTION,DATE_STARTED,DATE_TERMINATED,ACTIVE) values (5,1,'Other',to_date('05/10/12','DD/MM/RR'),null,0);
    Insert into SERVICE (SERVICE_ID,ENG_ID,DESCRIPTION,DATE_STARTED,DATE_TERMINATED,ACTIVE) values (6,2,'Treatment',to_date('16/10/12','DD/MM/RR'),null,1);
    ****
    And that's the perspective I think to use as a basis for the report
    CREATE OR REPLACE FORCE VIEW "BASE_VW" 
     
    AS
      SELECT Def.Def_Id,
        Def.First_Name,
        Def.Last_Name,
        Eng.Eng_Id,
        Eng.Court_Name,
        Eng.Date_Joined,
        Eng.Date_Terminated,
        Eng.Ethnicity,
        Ser.Service_Id,
        Ser.Description,
        Ser.Date_Started    AS Service_Start_Date,
        Ser.Date_Terminated AS Service_Date_Terminated,
        Ser.Active          AS Service_Active,
        Ev.Event_Id,
        Ev.Related_Service_Id,
        Ev.Start_Date,
        Ev.End_Date,
        Ev.Notes,
        ev.active AS event_active
      FROM Defendant Def
      LEFT OUTER JOIN Engagement Eng
      ON Def.Def_Id = Eng.Def_Id
      LEFT OUTER JOIN Service Ser
      ON Eng.Eng_Id = Ser.Eng_Id
      LEFT OUTER JOIN Event Ev
      ON Ev.Eng_Id = Eng.Eng_Id;
    ****
    Requirement:
    Report parameter: Start Date, end Date, Court_name
    Of selected Court_name, list of defendants who are currently participating in the Court.
    For each display of the defendant
    Section 1: Identification of the details: first name, surname, ethnicity, Date of arrival in the Court
    Section 2: All currently active Services that the defendant attend
    Section 3: All the events related to the service attending the defendant
    Section 4: All other events (don't have IDS Service related)

    The user must be able to download the full report in the spreadsheet or in PDF format.
    I tried to create a set of Union chooses (but the format is not that good, when no data return show nothing, I would like to show rather some messages as "There is no associated event, rather than nothing")
    and he produced a report for 1 defendant at the same time.

    We use Oracle APEX, so only select statement or statement select return PL/SQL Code is valid for the report source.
    At our place, we use Jasper adjacent report at the APEX, but I have very little experience with report of Jasper.
    The developer who knows a lot about the report of jasper is too busy to help me.

    Currently I use the union chooses as below:
    With Current_Engagement As
    ( Select Eng_Id From Engagement
      Where Def_Id =2
      And Date_Joined Is Not Null
      And ( Date_Terminated Is Null Or Date_Terminated > Sysdate)
      And Rownum =1
    )
    Select '1.Defendant ID' as col1, 'First Name' as col2, 'Last Name' as col3, 'Court Name' as col4, 'Ethnicity' as col5, 'Date Joined' as col6, 'Date Terminated' as col7
    From Dual
    
    Union All
    
    Select Distinct to_char(Def_Id), First_Name, Last_Name, Court_Name, Ethnicity, to_char(Date_Joined), to_char(Date_Terminated)
    From Base_Vw Inner Join Current_Engagement Ce On Base_Vw.Eng_Id = Ce.Eng_Id
    
    Union All 
    select '2.Service ID', 'Service Description', 'Start Date', 'End Date', Null, Null, Null
    from dual
    
    Union All
    
    Select distinct to_char(service_id), description, to_char(service_start_date), to_char(service_date_terminated), null, null, null
    From Base_Vw Inner Join Current_Engagement Ce On Base_Vw.Eng_Id = Ce.Eng_Id
    where service_active =1
    
    Union All
    Select '3.Event ID', 'Related Service ID', 'Start Date', 'End date', 'Notes', null, null
    From Dual
    
    Union All
    Select distinct to_char(event_id), to_char(related_service_id), to_char(start_date), to_char(end_date), notes, null, null
    from Base_Vw Inner Join Current_Engagement Ce On Base_Vw.Eng_Id = Ce.Eng_Id
    Where Event_Active = 1
    and related_service_id is not null
    
    Union All
    
    Select '4.Event ID', 'Start Date', 'End date', 'Notes', null, null, null
    From Dual
    
    Union All
    
    Select distinct to_char(event_id), to_char(start_date), to_char(end_date), notes, null, null, null
    From Base_Vw Inner Join Current_Engagement Ce On Base_Vw.Eng_Id = Ce.Eng_Id
    Where Event_Active = 1
    and related_service_id is null
    and the result is a bit what I try to achieve (except that I need to work on the screen a message "No data found" rather than anything), but it seems that my code works for one respondent.
    COL1                           COL2                           COL3                           COL4                 COL5                 COL6        COL7          
    ------------------------------ ------------------------------ ------------------------------ -------------------- -------------------- ----------- ---------------
    1.Defendant ID                 First Name                     Last Name                      Court Name           Ethnicity            Date Joined Date Terminated 
    2                              John                           Doe                            BBB                  Asian                01/10/12                    
    2.Service ID                   Service Description            Start Date                     End Date                                                              
    3                              Treatment                      01/10/12                       15/10/12                                                              
    6                              Treatment                      16/10/12                                                                                             
    3.Event ID                     Related Service ID             Start Date                     End date             Notes                                            
    5                              2                              03/10/12                                                                                             
    4.Event ID                     Start Date                     End date                       Notes                                                                 
    4                              02/10/12                                                                                                                            
    8                              12/10/12                                                                                                                            
    
     10 rows selected 
         
    However, I struggle to find a way to apply this to more than 1 defendant and always keep the format.
    Defendant 1
    All details related to defendant 1 
    Defendant 2
    All details relayed to defendant 2
    ...
    Defendant n
    All details relayed to defendant n
    Is it possible to view a report as above using only the SQL script?


    Thank you very much in advance. I'm ready to financially compensate someone who can give me a solution.

    Edited by: Ann586341. Base_vw SQL view script is fixed.

    Hi, Ann.

    The query I posted earlier can be simplified a bit. You need not partitioned outer joins, which means that you don't need d_num.

    WITH     current_engagement     AS
    (
         SELECT  Def.Def_Id
         ,     Def.First_Name
         ,         Def.Last_Name
         ,         Eng.Eng_Id
         ,         Eng.Court_Name
         ,         Eng.Date_Joined
         ,         Eng.Date_Terminated
         ,         Eng.Ethnicity
         ,     ROW_NUMBER () OVER ( PARTITION BY  def.def_id
                                   ORDER BY          eng.date_joined
                             ,                eng.eng_id
                           )      AS e_num
         FROM      Defendant   Def
           JOIN       Engagement  Eng  ON   Def.Def_Id = Eng.Def_Id
         WHERE     (   Eng.Date_Terminated  IS NULL
              OR  Eng.Date_Terminated      >= TO_DATE (:p_start_date, 'DD/MM/YYYY')
              )
         AND     Eng.Date_Joined           <= TO_DATE (:p_end_date,   'DD/MM/YYYY')
         AND     Eng.court_name           = :p_court_name
    )
    ,     event_types          AS
    (
         SELECT  3.2 AS event_type     FROM dual     UNION ALL
         SELECT     4.2                   FROM dual
    )
    ,     union_results          AS
    (               -- Section 1 Header: 1 row per defendant
         SELECT  '1.Defendant ID'     AS col1
         ,     'First Name'           AS col2
         ,     'Last Name'          AS col3
         ,     'Court Name'           AS col4
    --     ,      'Ethnicity'           AS col5 ...
         ,     def_id
         ,     1.1               AS section_num
         ,     0               AS r_num
         FROM     current_engagement
         WHERE     e_num     = 1
        UNION ALL          -- Section 1 Data: 1 row per defendant
             SELECT     TO_CHAR (def_id)        AS col1
         ,     first_name             AS col2
         ,     last_name             AS col3
         ,     court_name             AS col4
         ,     def_id
         ,     1.2               AS section_num
         ,     1               AS r_num
         FROM     current_engagement
         WHERE     e_num     = 1
        UNION ALL          -- Section 2 Header: 1 row per defendant
           SELECT  '2.Service ID'             AS col1
           ,       'Service Description'     AS col2
           ,       'Start Date'          AS col3
           ,       'End Date'          AS col4
           ,       def_id
           ,       2.1               AS section_num
           ,       0               AS r_num
           FROM    current_engagement
        UNION ALL          -- Section 2 Data: 1 row per service (at least 1 per defendant)
           SELECT DISTINCT
                       NVL ( TO_CHAR (s.service_id),  'No Data')      AS col1
           ,       NVL (s.description,            'No Data')      AS col2
           ,       NVL ( TO_CHAR (s.date_started, 'DD/MM/YYYY')
                               ,                           'No Data')        AS col3
           ,       NVL ( TO_CHAR (s.date_terminated, 'DD/MM/YYYY')
                               ,                           'No Data')      AS col4
           ,       ce2.def_id
           ,       2.2                               AS section_num
           ,       s.service_id                AS r_num
           FROM              current_engagement  ce2
           LEFT OUTER JOIN     service              s      ON   s.eng_id  = ce2.eng_id
                                       AND      s.active  = 1
        UNION ALL          -- Section 3 Header: 1 row per defendant
           SELECT  '3.Event ID'               AS col1
           ,       'Related Service ID'     AS col2
           ,       'Start Date'          AS col3
           ,       'End date'          AS col4
           ,       def_id
           ,       3.1               AS section_num
           ,       0               AS r_num
           FROM    current_engagement
        UNION ALL          -- Section 4 Header: 1 row per defendant
           SELECT  '4.Event ID'               AS col1
           ,       'Start Date'          AS col2
           ,       'End date'          AS col3
           ,       'Notes'               AS col4
           ,       def_id
           ,       4.1               AS section_num
           ,       0               AS r_num
           FROM    current_engagement
        UNION ALL          -- Section 3+4 Data: 1 row per event (at least 2 per defendant)
           SELECT DISTINCT
                       NVL ( TO_CHAR (e.event_id),    'No Data')      AS col1
           ,       NVL ( CASE  et.event_type
                                     WHEN  3.2
                    THEN  TO_CHAR (e.related_service_id)
                    ELSE  TO_CHAR (e.start_date, 'DD/MM/YYYY')
                   END
                               ,                     'No Data')      AS col2
           ,       NVL ( CASE  et.event_type
                                     WHEN  3.2
                    THEN  TO_CHAR (e.start_date, 'DD/MM/YYYY')
                    ELSE  TO_CHAR (e.end_date,   'DD/MM/YYYY')
                   END
                               ,                           'No Data')        AS col3
           ,       NVL ( CASE  et.event_type
                                     WHEN  3.2
                    THEN  TO_CHAR (e.end_date  , 'DD/MM/YYYY')
                    ELSE  e.notes
                   END
                               ,                           'No Data')      AS col4
           ,       ce34.def_id
           ,       et.event_type                          AS section_num
           ,       e.event_id                           AS r_num
           FROM              current_engagement  ce34
           CROSS JOIN     event_types         et
           LEFT OUTER JOIN     event              e      ON   e.eng_id  = ce34.eng_id
                                       AND  e.active  = 1
                                       AND  NVL2 ( e.related_service_id
                                                    , 3.2
                                                , 4.2
                                                )    = et.event_type
    )
    SELECT       col1, col2, col3, col4
    FROM       union_results
    ORDER BY  def_id
    ,            section_num
    ,       r_num
    ;
    
  • Display a personal message for a report when the number of records returned.

    Our application has a page that displays the results of several SQL statements which are defined as reports. A report should in particular only to display a custom message when the County of invoices with status individual > 0 and not the exact time charged count himself. I got the layout to not display the meter, but I have to be able to display a personalized message that says ' problem invoices exist.» See report of bills, for more information please". I looked on the report attributes definition page but I can't find how to show this custom message. Any tips?

    Simply create a text on the page element. Make read only and put your message in the default value.
    Now put a condition on this point, to display only when required.

    Gus

  • Dynamic SQL report on Oracle apex4.0

    Hello world

    I have two reports on a single page. One is the Interactive and another report. Sql based on the selection of the line (using the check box) in the interactive report, sql report should display the selected columns.

    Note: the report must be loaded every time that a line is selected and without subjecting it to a button

    Can someone please suggest?

    I'm using oracle Apex4.0

    Concerning
    REDA

    I think that you are storing the values in the boxes. For example, your interactive report query looks like:

    SELECT '"AS CHECKBOX, T.*.
    OF UNE_TABLE T

    and in 'Attributes of report', the CHECKBOX is displayed under "Standard report column.

    * 1 a control list hidden input champ.*
    It will store a selected values of list of checkboxes. If it is long enough, for example. 1000.
    Let's say that the entry name is: P000_X_CHECK_LIST

    * 2. Create a dynamic Action *.
    This dynamic action is supposed to fill the P000_X_CHECK_LIST with a list of values, separated by ': ' character.
    These values will be an entry for the SQL report.

    Name: updated checklist
    Event: change
    Selection type: jQuery Selector
    jQuery Selector: input: checkbox

    Action: Set

    Set type: Expression JavaScript

    function check_list() {}
    var n = "";
    $(":checked").each (function () {}
    n = n + (n === « » ? ("': ': ') + $(this) .val ();
    })
    return n;
    }
    check_list();

    Selection type: item (s) - P000_X_CHECK_LIST

    * 3. Set the query "SQL report" with this magic formula *.

    AND SEARCHED_ITEM IN)
    SELECT the item
    FROM (SELECT REGEXP_SUBSTR (str, ' [^:] +', 1, LEVEL) point)
    FROM (SELECT: P000_X_CHECK_LIST str)
    THE DOUBLE)
    CONNECT BY LEVEL<= length="" (regexp_replace="" (str,="" '[^:]+'))="" +="">
    )

    for example:

    SELECT O.*
    OF SOME_OTHER_TABLE O
    WHERE SEARCHED_ITEM IN)
    SELECT the item
    FROM (SELECT REGEXP_SUBSTR (str, ' [^:] +', 1, LEVEL) point)
    FROM (SELECT *: P000_X_CHECK_LIST * str)
    THE DOUBLE)
    CONNECT BY LEVEL<= length="" (regexp_replace="" (str,="" '[^:]+'))="" +="">
    )

    * 4. Adjust the dynamic Action: *.

    Advanced: Event scope: 'live '.

    * 5. Add real action more dynamic Action: *.
    Action: update
    Selection type: region
    Region: The region of the "SQL report.

    Volia!

    Best regards
    Krzysztof

  • How to create a menu of reports in APEX

    Dear Sir
    I want to create a menu of reports, so that the user click on the report name to view the report. I save all the reports in a database table and display interactive report on the home page.
    How can I bind the relevant reports to each row of the table
    kindly help me to achieve the functionality

    Hello

    Process of creation of list as follows *.

    You must follow these steps in the wizard to create a list,

    1. go in the shared components of your application.
    2. by navigation, click on the menu lists.
    3. click the Create button which would be available in this page.
    4. Select the Option 'From Scratch' and click Next.
    5. enter a name for the list, select dynamic as the type of list, you can choose any list template and compiler options too. Click Next.
    6. write the SQL query to dynamically generate the list, you can look in my example to get more clarity on the same with denunciations of target too. Click Next.
    7. click the Create button to complete creation of list.

    Now, the list has been created in the components of shred.

    Then you create a page from scratch in your application, this can be done by clicking on the button to create in your application and choose the type of page to Page zero. You think about the functionality of zero order page, otherwise please try to go through some documents and learn it.

    In the zero page, please follow the steps below.

    1. create a new region.
    2. choose the type of region as a list.
    3 give the title to the region and click Next.
    4. in the list, the above created list name will be available, choose and click on create the region from the list.

    As we have created it in the page from scratch, it will be available in the full application.

    Go to the Pages of the report,

    Page 5 - used

    Change the region of interactive to display in the column 2 reports.

    Page 6 - Department

    Change the region of interactive to display in the column 2 reports.

    Now run the application. It works very well.

    Kind regards
    Santini.

  • Please help - value of the long column of SQL report required in a separate cell

    Hello.

    I need to create a SQL report with the structure as below:

    Country city vertical Business details for the State (detail desc)
    MY Quincy Healthcare US
    It is a detailed desc value that is displayed in a different cell.
    It is a detailed desc value that is displayed in a different cell.
    It is a detailed desc value that is displayed in a different cell.
    It is a detailed desc value that is displayed in a different cell.
    US MY Braintree, HE
    It is a detailed desc value that is displayed in a different cell.
    It is a detailed desc value that is displayed in a different cell.
    It is a detailed desc value that is displayed in a different cell.

    I came across a solution where you can hide/show the column value in another cell. But my requirement is that it should be displayed when the page opens, and the user will not have to click a button to see the value. This is mainly for their presentations, and printing. so its very annoying for them to click on the buttons so much to see the value of desc of detail for each record. I'm new to Java script, please help

    I'm not sure to understand your needs - you are showing us 2 data lines, lines 7 or 9? You want the long description of detail on the same line, or below?

    I'll go on the assumption that you are showing us two rows, and long descriptions in this example are found along 3 to 4 lines, and you want long descriptions under the details. In this case, I suggest using "column name" models They are much easier to use as they appear when you look at everything first, so bear with me.

    Under 'shared components', select 'Models' and click then on create yellow > button. You create a report model, from scratch. On the last page of the wizard, select "Named column (model line)" for the type of model. This will create a model rather generic (and useless), which you'll have to edit; I don't know why they chose to not send you directly in the editor. When you change it, you will see that the single field whose value is 'Model line 1', and it is set to:

    #1##2##3##4##5#
    

    To meet your needs with basic features, change it to something in the sense of:

    #COUNTRY##STATE##CITY##VERT#
    #DETAILS#
    

    Then, you probably want to put something in the position of the column model, such as:

    CountryStateCityVertical Business
    Details
    

    Applies to whatever you want, of course the CSS styles.

    Using the model is simple: If your report, select the model and make sure that your SQL returns values using the column names specified in your model. Otherwise, you will see "#COUNTRY #" literal text in your report.

    You can get fancy with these, of course, as the application of different styles for alternating rows, but I'll leave that as pretty good to help you get started (I hope).

    -David

Maybe you are looking for

  • Firefox expects more (circle spinning shown) when AJAX post to CGI completed. How can I tell Firefox that is obtaining?

    After posting a simple form to insulin nph CGI using AJAX, Firefox seems to expect more and shows the circle of rotation when the request is completed and returned content is displayed in the browser window. The javascript works well with Internet Ex

  • Recovery disk is deletes the data at the 2nd disk on Satellite A300?

    HelloI use a laptop Toshiba A300, which has 2 hard drives (250GB). The laptop has Windows Vista Home Edition 32-bit installed, but I want to change for Windows Vista 64-bit, which comes with the recovery disk, in order to use all 4 GB of RAM. I have

  • Satellite L40 18 p unbootable

    Hello people, My Satellite L40 18 p no longer starts. All I get is the power of go green LED. The DVD ROM drive flashes and I can open and close - but that's all. Nothing else happens. Any idea on the forum that I can do to get the laptop again start

  • K1 (HD) video playback

    I got my K1 for a few days and I really like it. I changed the launcher and had upgraded the keyboard but otherwise, I'm happy. I tried to play an HD video on the video player to the gallery today and he kept late (as well as the arcsoft). Y at - it

  • Want to m6-1205dx: update the BIOS Hp envy

    Does anyone know what is the last update of the BIOS for Hp Envy M6-1205dx? I looked, but there seems to be no new updates. I'm not no more updates for my drivers. Win10 64Bitt A10-4600APU AMD 6GBRAM