How do I reference columns in a report query from another report query?

In Apex 3.1 it is possible to generate a report on more than one query. I have read that these queries can be correlated, but I cannot find how in the documentation.
I go the Shared Components and create a new Report Query:
select * from dept
Then I click Add Query and I add:
select * from emp
How do I correlate these two queries (I want to join emp.deptno to dept.deptno) and have a nice hierarchicle XML-file.
Is it possible in Apex 3.1?
Dik Dral

Dik,
This type of query can't be build. The two queries are independent, you can't reference values in the first query from the second query. However you can reference page and application items - which won't help you all that much with this scenario though. You could also try combining the two queries into one, and then take care of the proper presentation in your template.
Regards,
Marc

Similar Messages

  • How to pass values to a module pool program from another Report Program

    Hi ..
    Please let me know how I can pass values to a MODULE POOL selection screen field from another Report Program.
    Thanks
    RK

    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/frameset.htm

  • How to rename a column name while copying it from another table

    Hi All,
    I am copying rows between two table TableA to TableB
    but I wanted to insert data in he column name (username) in tableA to a column named (NewUser) in tableB
    How do I go about that?
    insert into TableB
    select Username
    from TableA
    Thanks

    If you want to only move username, then just specify the column name for TableB, that is
    insert into TableB(NewUser)
    select Username
    from TableA
    If you want to move all (or some) of the columns while putting Username in a column named NewUser, just list the columns in both the insert into part and the select part, for example
    insert into TableB(NewUser, ColA, ColB, ColC)
    select Username, ColA, ColB, ColC
    from TableA
    Tom

  • How to bring all columns in a single/first page in report painter

    Hi Experts,
    There are 9 columns in a report painter which includes 1 lead column.
    7 columns comes in a first page including lead column and rest 2 columns goes to second page. This report is copied from another report where all columns comes in a first page only. if the original report comes in one page then why not the new report.
    Please suggest how to bring all columns in a single/first page in the new report.
    Please revert if I'm confused anywhere.
    Thanks in advance
    Arabinda

    Hi Rajneesh,
    Thanx for the quick reply. When I change the column width to 10 it comes in one page. But the requirement is to keep the column width to at least 12 or 14 and moreever the original report from where this report is copied having the same no of columns and the column width for original report is 14 and it comes in one page only.
    Do I need to do something more to achieve this. My question is how the original reports data comes in one page where as the current report having issue with same number of columns.
    Pls suggest.
    Thanx,
    Arabinda

  • How to send a PDF file as a FAX from Oracle Reports 6i

    Hi
    I want to know how to send a PDF file as a FAX from Oracle Reports 6i. Or please post any sample code in reports that sends PDF document as FAX
    Help need immediately.
    Thanks in advance. my email id is
    [email protected]
    Arun
    null

    hello,
    there is no native support for directly faxing a report. you could e.g. use a fax-software that has a printer-driver that supports this.
    regards,
    the oracle reports team

  • How to call dynamic selection screen from another report

    hi,
    i have transaction ZFAGLL03.
    it has got standard selection screen.. and dynamic selection screen...
    i am calling this transaction from another report, now how do i display this dynamic selection screen.....

    Try following code and see if it helps:
    TYPE-POOLS : rsds.
    TABLES:tgsb.
    DATA: trange TYPE rsds_trange,
           trange_line
             LIKE LINE OF trange,
           trange_frange_t_line
             LIKE LINE OF trange_line-frange_t,
           trange_frange_t_selopt_t_line
             LIKE LINE OF trange_frange_t_line-selopt_t,
              trange_line1
             LIKE LINE OF trange,
           trange_frange_t_line1
             LIKE LINE OF trange_line-frange_t,
           trange_frange_t_selopt_t_line1
             LIKE LINE OF trange_frange_t_line-selopt_t,
           texpr TYPE rsds_texpr.
    DATA: seltab TYPE TABLE OF rsparams WITH HEADER LINE,seltex TYPE rsds_texpr.
    SELECT-OPTIONS:so_gsber FOR tgsb-gsber.
    LOOP AT so_gsber.
       trange_line-tablename = 'FAGLFLEXA_FS'.
       trange_frange_t_line-fieldname = 'RBUSA'.
       MOVE-CORRESPONDING so_gsber TO trange_frange_t_selopt_t_line.
       APPEND trange_frange_t_selopt_t_line
       TO trange_frange_t_line-selopt_t.
    ENDLOOP.
    APPEND trange_frange_t_line TO trange_line-frange_t.
    APPEND trange_line TO trange.
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
       EXPORTING
         field_ranges = trange
       IMPORTING
         expressions  = texpr.
    submit FAGL_ACCOUNT_ITEMS_GL with FREE SELECTIONS texpr   AND RETURN .

  • How do I pass parameter to different portlet regions from another page?

    How do I pass parameter to different portlet regions from
    another page?
    I have a page that with two regions. Each region has a report
    that uses the same information to generate its report.
    Individually running the reports, I can use p_arg_names and
    p_arg_values to get what I want. However, when I run the page
    that has both portlets, my .show is gone and I cannot get it to
    use the p_arg_names, etc. Do you have any idea how to overcome
    this? Thanks for any help.

    How do I pass parameter to different portlet regions from
    another page?
    I have a page that with two regions. Each region has a report
    that uses the same information to generate its report.
    Individually running the reports, I can use p_arg_names and
    p_arg_values to get what I want. However, when I run the page
    that has both portlets, my .show is gone and I cannot get it to
    use the p_arg_names, etc. Do you have any idea how to overcome
    this? Thanks for any help.

  • Copy report layout from one report to another

    I have a VERY complex report layout which is part of a report with Data model A.  I need to copy that report layout to another report which has Data model B, which has all the same structure as Data model A but is queried differently.   The first is invoices for regular billing the second is invoices for re-billing, all columns are the same.
    Thanks for any help / suggestions.

    Hi Robert,
    In the Report Organizer, just right click and Export the definition. Then, open the new company & right click and import the definition.

  • Execute a Query from a report sending it parameters and capture the result

    Hello everybody,
    Greetings from Peru, I want your help, Do you know how to execute a query from a report sending parameteres and capture the result in a internal table?
    The attached imaged has in red square the parameteres I want to send from a report.
    The idea is to have a JOB that executes everyday and parameters like DATE PERIOD will change automatically.
    Thanks for your time.

    Hi Enrique,
    You can call a query from a report by using submit statement.
    Every query has a corresponding program associated with it.
    Execute the query from SQ01. On te selection screen of query, goto SYSTEM  from menu and then click on STATUS, you will get program name (In this case aqzzzent_struct=zmm_ent_struc1). Use this program to call the query from your custom program.
    Also populate the rspar int table as per the selection criteria you want to pass to query.
       DATA: rspar     TYPE TABLE OF rsparams,
        wa_rspar  LIKE LINE OF rspar.
          wa_rspar-selname = 'SP$00001'.
          wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'.
          wa_rspar-option = 'BT'.
          wa_rspar-low  = s_cmp_cd-low.
          wa_rspar-high = s_cmp_cd-high.
          APPEND wa_rspar TO rspar.
       SUBMIT aqzzzent_struct=zmm_ent_struc1 WITH SELECTION-TABLE rspar AND RETURN.
    Thanks,
    Sachin

  • Problem calling XML Report Publisher from Oracle Reports

    Hi,
    I'm facing a problem in calling XML Report Publisher from Oracle Reports.
    Basically, I'm trying to customise Dunning Letter program. The program which is submitted calls another program. I have customised the second program and added a call to a stored procedure which in turn calls XML Report Publisher.I have created a template and attached it to the second program as well.
    The procedure code is as follows.
    v_request_id := FND_REQUEST.SUBMIT_REQUEST(application => 'AR'
    ,program => 'ARDLP_NON_SRS'
    ,description => 'Dunning Letter Print from Dunning Letter Generate'
    ,sub_request => FALSE
    l_status := fnd_concurrent.WAIT_FOR_REQUEST
    ( REQUEST_ID => v_request_id,
    INTERVAL => 15,
    MAX_WAIT => 180,
    PHASE => l_phase,
    STATUS => l_status_code,
    DEV_PHASE => l_dev_phase,
    DEV_STATUS => l_dev_status,
    MESSAGE => l_message );
    v_xml_req_id := FND_REQUEST.submit_request(application => 'XDO',
    program => 'XDOREPPB',
              argument1 => v_request_id,
    argument2 => 'FLS DE AR Dunning Letter Print - German',
    argument3 => 603, -- changed 665 -- was 551,
    argument4     => NULL,
    argument5 => 'N',
    argument6     => 'RTF',
              argument7     => 'PDF');
    Now, there are two problems I'm facing...
    1. when the second program('Dunning Letter Print from Dunning Letter Generate') gets called it executes this procedure ... logically the 'Dunning Letter Print from Dunning Letter Generate' should get called twice ... second time from the procedure. Its getting called multiple times .. as many as 15 - 20 times.
    2. The Xml Report Publisher program ultimately gets called but its erroring out with the following error:
    java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA, DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.DS_APP_SHORT_NAME DS_APP_SHORT_NAME, B.DATA_SOURCE_CODE DATA_SOURCE_CODE, L.LOB_TYPE LOB_TYPE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE (L.LOB_TYPE = 'TEMPLATE' OR L.LOB_TYPE = 'MLS_TEMPLATE') AND L.APPLICATION_SHORT_NAME= :1 AND L.LOB_CODE = :2 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND ( (L.LANGUAGE = :3 AND L.TERRITORY = :4 ) OR (L.LANGUAGE = :5 AND L.TERRITORY = :6) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ) )
    I have checked from database that the XDO_LOBS/ XDO_TEMPLATES_B table has corresponding registration data.
    I don't know what's creating the problem.
    If anyone has customised the Dunning Letter program before or having any idea about this problem, please help me out ..
    Thanks

    satrajit,
    Now I am getting the same error you got, Can you please tell me the solution you found?.
    XML Report Publisher 5.0
    Updating request description
    Waiting for XML request
    Retrieving XML request information
    Preparing parameters
    Process template
    --XDOException
    java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA, DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE L.LOB_TYPE = :1 AND L.APPLICATION_SHORT_NAME= :2 AND L.LOB_CODE = :3 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND ( (L.LANGUAGE = :4 AND L.TERRITORY = :5 ) OR (L.LANGUAGE = :6 AND L.TERRITORY = :7) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ) )
         at oracle.apps.xdo.oa.schema.server.TemplateInputStream.initStream(TemplateInputStream.java:309)
         at oracle.apps.xdo.oa.schema.server.TemplateInputStream.<init>(TemplateInputStream.java:187)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.getTemplateFile(TemplateHelper.java:776)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:1269)
         at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:807)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:148)

  • Calling a report from another report

    Hi,
    Is there any way ,(any built in ) to call a report from another report in Report Builder 2000 and Report Builder 6i.
    Regards

    Try to call report from report by a button in the calling report:
    1     In the Layout Model view, click in the tool palette. Note
    2     Click and drag a rectangle.
    3     Double-click the button object to display the Property Palette.
    4     Under the Button Label node, set the Label Type property to either Text or Icon:
    n     If the button label is text, set the Text property to the text you want to appear on the button.
    n     If the button label is an icon, set the Icon Name property to the name of the file containing the icon (the file must reside in the directory specified by the UI_ICON environment variable).
    5     Under the Button Behavior node, set the Type property to PL/SQL.
    6     Double-click the PL/SQL Trigger property value field.
    7     In the PL/SQL Editor, define the PL/SQL for the action trigger or format trigger when the button is clicked in the formatted report.
    8     Set other properties as desired.
    9     To activate the button, run the report, then display it in the Runtime Previewer.

  • Calling a Report from another Report.....URGENT

    Hi,
    I am calling a report from another report using hyperlink. I want that this new report should come in a new page.
    Can any body help me where i can set this property, so that the new report will open in a new page.
    Thanks in advance
    Regards
    Kamal

    Try to call report from report by a button in the calling report:
    1     In the Layout Model view, click in the tool palette. Note
    2     Click and drag a rectangle.
    3     Double-click the button object to display the Property Palette.
    4     Under the Button Label node, set the Label Type property to either Text or Icon:
    n     If the button label is text, set the Text property to the text you want to appear on the button.
    n     If the button label is an icon, set the Icon Name property to the name of the file containing the icon (the file must reside in the directory specified by the UI_ICON environment variable).
    5     Under the Button Behavior node, set the Type property to PL/SQL.
    6     Double-click the PL/SQL Trigger property value field.
    7     In the PL/SQL Editor, define the PL/SQL for the action trigger or format trigger when the button is clicked in the formatted report.
    8     Set other properties as desired.
    9     To activate the button, run the report, then display it in the Runtime Previewer.

  • See sql query from crystal report without crystal report

    see sql query from crystal report without crystal report 

    Hi,
    Depends on datasource type but you could have a look at ODBC trace or if you have access to the SQL Server you could use profiler to monitor the session.
    Regards,
    Craig
    And this will only be of use if you know which Server/Insstance/Database the Report is connecting to...
    Please click "Mark As Answer" if my post helped. Tony C.

  • How to refer the trigger written in one form from another form ?

    How to refer the trigger written in one form from another form ?
    Thanks,
    Ravi Shankar

    Try to convert the PL/SQL code from Forms trigger into a PL/SQL library(.PLL),
    and then attach that PLL in your forms.
    Note that all Forms objects should be referenced indirectly, for example,
    you have to rewrite
    :B1.DEPT_CODE := :B2.DEPT_CODE;
    :B3.TOTAL_AMOUNT := 100;
    ==>
    copy('B2.DEPT_NO','B1.DEPT_NO');
    copy('100','B3.TOTAL_AMOUNT');
    This is the best way to share PL/SQL code among Oracle Forms.

  • Can we run one report from another Report in reports 6i

    Actually my requirement is i want to run 4 reports from another report(driver report) by passing parameter same as the driver report.
    i want to see the out put on the screen report by report next to driver report output.is it possible?? actually i got the solution for printing or taking file. but i want to show the output on the screen.
    Edited by: user9165808 on Feb 16, 2010 3:21 AM

    I used SRW.RUN_REPORT () . But my question that is it possible to show report in batches on screen??
    Edited by: user9165808 on Feb 19, 2010 4:23 AM

Maybe you are looking for