Master / detail REPORT (FORM no)

I use 4 APEX and want to create a master / detail REPORT (not a FORM) and can't seem to format as I want. For each record in my MASTER table that I want to print a few fields of her on the first line, followed by one or more records in the SECONDARY table on the following lines. It is easy to do as a form, but I want it on a web page as text only report. Any suggestions would be appreciated, other that "read the manual". Already tried.

So my desired output would look like this:

MASTER NAME: XXXXXX MASTER ADDRESS: CITY OF MASTER XXXXXX: XXXXXX

RETAIL RETAIL QTY. ONLINE RETAIL PRODUCT
1 XYZ 10
2 ABC 20

NAME OF THE MASTER: YYYYYY MASTER ADDRESS: YYYYYY MASTER CITY: YYYYY

RETAIL RETAIL QTY. ONLINE RETAIL PRODUCT
3 DEF 30
4 GHI 40

It is an area of APEX where a few feature improvements would make the very nice end statement. In the meantime, you can write your own reporting process in a region of PL/SQL easily, consisting of two loops: one for master records and one for children. You will have to expose the area using HTML, but since control you it can look as you wish. I did something similar with this code:

create or replace PROCEDURE PROC_TONMILERPT(dt1 DATE, dt2 DATE, c NUMBER)
as
  dt_from    DATE           := dt1;
  dt_to      DATE           := dt2;
  cust       NUMBER         := c;
  ttl_dys    NUMBER;
  cursor c_proj is select ORG_ID, ORG_NM from ORG_ENTITIES
                    where CUSTOMER_ID = cust
                      and ORG_ID NOT IN (200,300,400,500,600,700,800,900);
  v_org      NUMBER;
  v_orgnm    VARCHAR2(47);
  cursor c_rpt is select STN, MILES, SUM(TTL_WT)
            from (select s.SHORT_NM||'-'||j.PILE_CODE_ALT_FLAG as STN, r.CYCLE_MILES/2 as MILES,
                         SUM(CASE WHEN w.SPOT_WEIGHT = 0 THEN NVL(j.MAN_SPOT_WT,0)
                                  ELSE w.SPOT_WEIGHT
                                  END) as TTL_WT
                    from TC c, TC_LOAD_JOBS j, STATIONS s, LOAD_RATES r, SPOT_WEIGHTS w
                   where c.TC_ID = j.TC_ID and j.LOAD_RATE_ID = w.LOAD_RATE_ID
                     and w.DATE_INDEX = c.DATE_INDEX
                     and j.LOAD_RATE_ID = r.LOAD_RATE_ID
                     and FN_STN_KEY(j.FACTORY_ID,j.STATION_ID) = s.KEY_ID
                     and c.DATE_INDEX BETWEEN dt1 and dt2
                     and j.FACTORY_ID = v_org
                   group by s.SHORT_NM||'-'||j.PILE_CODE_ALT_FLAG, r.CYCLE_MILES
                   union
                   select s.SHORT_NM||'-'||j.ALT_FLAG as STN, r.CYCLE_MILES/2 as MILES,
                          SUM(DECODE(j.AVG_SPOT_WEIGHT,0,j.ACT_SPOT_WEIGHT,j.AVG_SPOT_WEIGHT)) as TTL_WT
                    from TC_3RDPARTY c, TC_3RDPARTY_JOBS j, STATIONS s, LOAD_RATES r
                   where c.TC_ID = j.TC_ID and j.LOAD_RATE_ID = r.LOAD_RATE_ID
                     and FN_STN_KEY(j.FACTORY_ID,j.STATION) = s.KEY_ID
                     and c.DATE_INDEX BETWEEN dt1 and dt2
                     and j.FACTORY_ID = v_org
                   group by s.SHORT_NM||'-'||j.ALT_FLAG, r.CYCLE_MILES)
            group by STN, MILES
            order by STN;
  x_fact     NUMBER;
  x_stn      NUMBER;
  x_stn_nm   VARCHAR2(47);
  x_alt      VARCHAR2(7);
  x_rt       NUMBER;
  x_mls      NUMBER;
  x_tons     NUMBER;
  x_lds      NUMBER;
  x_tnmls    NUMBER;
  z_tnmls    NUMBER      := 0;
BEGIN
  ttl_dys    := dt_to - dt_from;
  htp.p('');
      htp.p('');
          htp.p('');
      htp.p('');
      htp.p('');
  htp.p('
Ton Mile ReportTransystems
From '||to_char(dt_from,'MM/DD/YYYY')); htp.p(' To '||to_char(dt_to,'MM/DD/YYYY')||'
'||ttl_dys||' day period
'); OPEN c_proj; LOOP FETCH c_proj into v_org, v_orgnm; EXIT WHEN c_proj%NOTFOUND; htp.p('

'||UPPER(v_orgnm)||'

'); --Project Work htp.p(''); htp.p(''); htp.p(''); htp.p(''); htp.p(''); x_tnmls := 0; OPEN c_rpt; LOOP FETCH c_rpt into x_stn_nm, x_mls, x_tons; EXIT WHEN c_rpt%NOTFOUND; z_tnmls := z_tnmls + x_mls*x_tons; x_tnmls := x_tnmls + x_mls*x_tons; htp.p(''); htp.p(''); htp.p(''); htp.p(''); END LOOP; CLOSE c_rpt; htp.p('
PileTon MilesTonsLoaded Miles
'||x_stn_nm||''||to_char(ROUND(x_mls*x_tons,0),'999G999G999')||' '||to_char(ROUND(x_tons,2),'999G999G999D99')||' '||x_mls||'
'); htp.p('

Total for '||v_orgnm||' - '||to_char(ROUND(x_tnmls,0),'999G999G999')); htp.p(' Ton Miles and '); htp.p(to_char(ROUND(x_tnmls/ttl_dys,0),'999G999G999')||' Average Ton Miles per Day

'); END LOOP; CLOSE c_proj; htp.p('

Customer Totals - '||to_char(ROUND(z_tnmls,0),'999G999G999')); htp.p(' Ton Miles and '); htp.p(to_char(ROUND(z_tnmls/ttl_dys,0),'999G999G999')||' Average Ton Miles per Day

'); END;

I created it as a procedure because the APEX limits you to only 32K of a character value in a region. If you do a lot of formatting, it can eat up hastily. Of more, that way I don't have to change the procedure to change the output, not the page APEX itself.

Oh, and here's the code for the region of PL/SQL:

begin
  PROC_TONMILERPT(to_date(:P1345_DATE_FROM,'MM/DD/YYYY'), to_date(:P1345_DATE_TO,'MM/DD/YYYY'), :P1345_CUSTOMER);
end;

You will notice that it accepts parameters from a region of "filters" to determine the results.

Tags: Database

Similar Questions

  • master detail report

    I want to create a master detail report using CF 10 generator, but I can't find the option.

    I would like to know do I insert a sup in detail band report to generate the master details report.

    If this is not the case, can you please indicate what is the procedure to build the master details report by using CF 10 generator.

    Your information and help is much appreciated,

    Kind regards

    iccsi,

    iccsi wrote:

    I would like to know do I insert a sup in detail band report to generate the master details report.

    Yes.

  • Difference between Master detail report and Drill Down

    Hello

    I want to know the difference between Master detail report and Drill Down. I'm confused about their use. Can inform you when to use what?

    Help appreciated

    Pradeep

    You must first help yourself by searching instead of these initial questions.

    Master in detail:
    As a condition of purchase order. The master is arrested in detail, and the details are elements...

    Dril Down:
    As the opening of report the report as hyperlink for more details...

    -Clément

  • Master - detail reports

    Hi, Im currently produces a report of which the data are obtained from 2 views I created on the database. We can look at this as a relationship master detail. Basically I have a view with details of staf and views with all the details of the client. 1 staff member can have many clients asociated with them. This is related to a reservation id. If the staff and clients have the same reservation id they are so related.

    I have implemented this in the reports in the following way:


    I have a nonrepeating framework encapsulating everything. then this frame is divided into a left and right, the left side is an extensible framework with the details of the staff and the right side is an extensible framework with the details of the client.

    I want to be able to see is the details of staff then beside that the details of the customer like this:

    (.' are spaces - just used to show the layout)

    staff ID | staff name. staff * | staff * client id | name of the customer. customer * | customer *.
    .............................................customer id | name of the customer. customer * | customer *.
    .............................................customer id | name of the customer. customer * | customer *.

    But as I have at the minute im just get:

    staff ID | staff name. staff * | staff * client id | name of the customer. customer * | customer *.
    staff ID | staff name. staff * | staff * client id | name of the customer. customer * | customer *.
    staff ID | staff name. staff * | staff * client id | name of the customer. customer * | customer *.

    They do not seem to be linked is there a way to link the master details? I have already created the relationship in the querys etc. my problem, I feel lies in the way I set up the report, its basically just go to each view and bring back the reguardless of the relationship data.

    Any help would be much appreciated.

    Thank you.

    Published by: user13390506 on March 7, 2011 04:23

    Published by: user13390506 on March 7, 2011 04:24

    Have you tried simply to encapsulate the retail block in the extensible framework of the master block?

  • Search in master-detail reports

    Hello

    I created master/detail pages in an application. The captain produced from the report model is not the online search feature that is there in the pages of standard report. Can someone tell me how a) produce master/detail with the included search feature or b pages) add the search functionality in the Master page of report post?

    Thank you!

    Tom

    Tom,

    To simplify things, change your 'Master report', change the report type "SQL query" and click on "Apply Changes". Now, if you change the report again, you can edit the SQL code directly in the region of origin.

    Now, to create point text say P1_FILTER and the button to apply the filter. Change your SQL query similar to the

    SELECT num_col1, char_col2, char_col3
    FROM tbl_tmp
    WHERE TO_CHAR(num_col1) = NVL(:P_FILTER, num_col1)
    OR char_col2 = NVL(:P_FILTER, char_col2)
    OR char_col3 = NVL(:P_FILTER, char_col3)
    

    You can see this at [http://apex.oracle.com/pls/otn/f?p=38121:17]

    See you soon,.
    Hari

  • master detail in obiee 11g report

    Hello

    I create report master detail in obiee 11g (11.1.1.6.5). I want to use it to navigate from one report when you click on the chart to another report that has tables and graphs in the same dashboard too.

    Can you please how can I do

    Hello!

    You have two options:

    First: Apply channel Interaction. You can click in your master detail report and automatically your second report will change.

    Second: Use action links.

    Look at this link: OBIEE 11 G - master detail | GerardNico.com (BI, OBIEE, data warehouse and OWB)

    Pls mark so useful

  • Report master-detail or list popup selection on LOV

    Master/detail report
    Using Popup LOV of a column in DETAIL. Why the RETURN_VAUE displays rather than the DISPLAY_VALUE? I need to display ITEMNO. It sounds like a problem with a tabular presentation?

    LOV is
    select ITEMNO display_value, ITEM_ID return_value
     from SH_ITEM
     ORDER BY 1
    Table
    *SH_ITEM*
    ITEM_ID
    ITEMNO
    ITEM_DESC
    Is actually long version that I really want
    select ITEMNO || ' - ' || ITEM_DESC display_value, ITEM_ID return_value
     from SH_ITEM
     ORDER BY 1
    Published by: userRRRYB on July 2, 2010 07:06

    Hi Alexandra,.

    In APEX 4.0, Popup LOV key support has been added to the built-in tabular feature (named for and based query LOVs), so now you can view the DISPLAY_VALUE according to needs. LOV Popup displays only the RETURN_VALUE, as you said, so it will not be your needs, but the new Popup LOV key should do the trick for you. If you change the attributes of a column in a table, update the column in question to the value of the point of his ' display as ' Popup LOV key (named LOV) or Popup LOV (query based LOV) key.

    Kind regards
    Hilary

  • Model with master detail

    Hello

    How can we create a template with the data in two tables as a master detail report. Each record in table A has multiple records in table B, and the tables have a common column.

    Thank you
    Machaan

    Yes.

    see this.

    DEP. and EMP - example of relationship

    http://download.Oracle.com/docs/CD/E10415_01/doc/bi.1013/e12187/T421739T434255.htm#3547893

    That you will get the data for the ship of the teacher-child relationship.

    then in model loop through them.

  • report/master-details form

    Hi friends,

    I want to create a master report/form / retail.
    I have a master table and it has 3 tables of detail.
    Example: 
    
    Master Table: Members
    Detail Tables: Contributions
                   Loans
                   Benefit Claims
    I want to show when I click on a particular Member in the edition of the report, I can make entry/updated at all
    3 detail tables. And will not each entry separately.


    This requirement of design is good?


    Thank you very much

    Here you can watch how to create several detail tables:

    http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:163

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • How to disable dynamically interactive report filed in the page master detail

    I use APEX 4.0 & very new to APEX. I am not able to disable a class in area of detail (which is an interactive report) of a master detail Page.
    I want to turn off the field in a row based on the value of another field of recording, like set_item_instance_property of the oracle forms. Please help me.

    See {message identifier: = 10743324}

  • Failed to add new detail in the form of master detail record

    Hello

    I created a simple database application from scratch by selecting the start a page master detail. This has generated a report (for the parent) and a page of form (for the child). On using the form to add a new record to the child, the following error is generated:

    Internal error in the routine mru: ORA-20001: error in MRU: line = 1, ORA-01400: cannot insert NULL into ("Student" 1.) "" DELEGATE. " "" ""DELEGATE_ID"), insert"Student"1." DELEGATE values' ('DELEGATE_ID', 'CLIENT_ID', 'NAME', 'INITIAL', 'SEX', "SPECIAL_NEEDS") (: b1,: b2,: b3: b4,: b5,: b6)
    Error failed to process the update.

    The field 'child' in the error message is automatically hidden on the form and I guess on the generation of this form using the wizard I would have had the opportunity to link the field delegate_id to a trigger or a sequence like this seems to happen when you create a scratch from application database using other types of page. I'm new to Apex then I would be grateful if someone could let me know why this default behavior occurs.

    Kind regards

    Kevin.

    I tried for Apex 4.0.2 (my version) and 4.1 (on apex.oracle.com) and I'm wondering for the production of main PK and details in both versions.

    What are your steps exactly in the wizard? Like this?
    Create page-> form-> form detailed Master
    Now you see a list of steps sub whose "Source of primary key.

    Oh I see "Create an Application Assistant." in your message. Start with an empty application (blank page) and use the wizard to create a Page. Maybe it's the difference.

    Published by: InoL on November 18, 2011 09:27

  • Master detail form

    Apex 4.0 master detail form

    In my Application

    1 page 2 is the report
    2 page 3's master detail form

    Press the button create on page 2, it displays the page 3 i.e. control the detailed form

    After entering in detail the form master I press the button create is back on page 2 that is create to communicate their data page and master
    but to go into detail for the same record I change and enter on page 3.

    I'm looking for the solution. When I press on create button on the master page 3 it will not return to page 2 page report i.e.
    recode newly created on the same screen (no return on page 2) and appear I get recode in detail for the master above.

    After completing data entry master detail, I will return that is page 2 to report.

    You can also visit my request and suggest but how to solve the problem

    http://Apex.Oracle.com/pls/Apex/f?p=50199:2:3351945796035428:no:

    What happened to change the branching (to be submitted on page 3) page 2 page 3? Or by adding a (conditional) branch on page 3 before this one?
    Maybe with some restrictions (so only when you press the button create).

  • Master/detail for printing of PDF report

    My application allows end-users a way to fill a transport request via a form, separated by about 10 regions. The application consists of about 50 fields (from the table requests) and n number of transport, penetrated through tabular form in the application form. Once they complete it and send it to the transport Department, I want them to be able to generate a master/detail of the application report , with information of demand on top and all the transport on a table.

    The DBA installed Apache FOP and it works fine for printing the report. We are on Apex 3.2, exploiting an Oracle 11g database.

    So I followed this guide: http://www.oracle.com/technology/products/database/application_express/howtos/howto_master_detail_pdf.html. I have created a master/detail form, installed Desktop Publisher BI, created the RTF template, everythng. But it is not out of what I want.

    When I "print" to PDF, I get only a table with transport, but no info on demand at all, even if I choose "Advanced (include session state information)" and I does not include session state information on all the variables I wanted for the output in the PDF file.

    Any idea of what this could be the cause? Session state disappears somehow when I print the PDF? Or is there a better way to solve this problem? Any help is welcome.

    Best regards
    Mathieu

    I decided to buy FO Designer of the Java4Less. For $ 60, it's a flight, and it works well. Need to change a thing or not in the XSL - FO generated, but nothing too difficult at the moment.

    Best regards
    Mathieu

  • How to create a master/detail with a PK of 4 columns form

    I want to create a report/form (or a master-detail form) based on a table with a primary key of 4 columns. But only up to 2 columns can be présicer at APEX. How can I handle this?

    Sincerely,

    James

    Hi James,

    I think Mike suggests that you create a SQL view on the table and bring together the different values of the primary key in a primary key, unique, unique, nickname. You can always include the individual columns in the SQL, but you can then use this new column as the primary key on a form. However, you also need to create instead of triggers to manage the changes/insertions/deletions that SQL does not update the tables in a view. (See: [http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/create_trigger.htm#i2064426] for more details on this Oracle or Re: how to upgrade the table or view for an example within the Apex).

    Ideally, however, you should only really need a column of key - is it necessary for four?

    Andy

  • [ADF, JDev12.1.3] master / detail af:tables the link is handled by ExecuteWithParams: how to create a master report / detail in a loop on the lines?

    Hallo,

    I have a page with 2 legs and they both contains an af:table created by dragging an instance of VO in the user interface.

    The 1st tab uses a master VO while the 2nd uses a VO detail.

    Between 2 your, there is not a link of VO master / detail.

    Opening Details tab I update the secondary table by calling the method ExecuteWithParams of the detail VO instance (in a managed bean).

    I would now like to generate a report that loop on the master table and that, for each line of master:

    • He writes in the report;
    • loops of registration of details (which are based on the master record) and also writes the report.


    Could you kindly suggest me which is the best way to achieve that through a code to write in a managed bean?

    Here I am interested how do to loop through the data, not in how to write the report.

    Thank you

    Federico

    Yes it will affect the selected line. If you want to ignore try using this code

        DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("DepartmentsView1Iterator");
        ViewObject vo = iter.getViewObject();
        for (int i = 0; i < vo.getEstimatedRowCount(); i++)
        {
          Row r = vo.getRowAtRangeIndex(i);
          System.out.println("DeptId= " + r.getAttribute("DepartmentId"));
        }
    

Maybe you are looking for

  • A bluetooth Satellite A200?

    A Satellite A200-1Kz bluetooth support?

  • Error when you try to update my MXPE

  • DAQmx property in event node can % 27T be update

    I want to update the node property of DAQmx event to update dynamically the value, but only 1 of the 2 property node can be updated "DAQmx is task Done.vi", the whole could be triged normally. As shown in the photo below: report cyclic case can be tr

  • UEFI problem after BIOS update

    Hello I've recently updated the version of BIOS for the Envy 15 J049TX. After the windows update shows "not properly configured SecureBoot. Please suggest a solution

  • I can not burn on CD titles!

    Pleease, I need your help!I pulled a few tracks on my computer using Windows Media Player and I inserted a CD blank, selected "burn" and under the burn list is a button saying "Start burn", but he won't let me not click on it what I DO?