Oracle Reports : one query - two reports?

Help, please, Oracle Reports 10g.
I have a query, need to make two reports in one. They are similar, just couple parameters are different, say, entreprise type and region;
How do I display these two reports in one? I tried to make parameters as placeholders, package variables, put an trigger on outer frames for reports. parameters do change their values but just the same report displays twice. where is the trick?
Thank you

The way I have done this in the past was to create 2 master frames, 1 for each report and then put conditions on each frame as to when it is to appear. Hope this helps..

Similar Messages

  • One query two different Group By

    In My parameter two option one and two.
    if i select one, need to come this group by:-
    GROUP BY
    Name1,
    Name2,
    Country,
    MCC || '/' | MNC
    One Output:
    Name1 -  Name2 - Country  - PNR
    if i select two, need to come this group by
    GROUP BY
    Name1,
    Country,
    MCC || '/' | MNC
    two output :
    Name1 - Country - PNR
    I have only one sql query But i have two different group by
    Please advise me, m not using subreport option.
    whether any formulas or any other options for group by.

    Try inserting the groups statically that are common for both the parameaters like this
    GROUP BY
    Name1,
    Country,
    MCC || '/' | MNC
    and now create a formula like this
    whilereadingrecords;
    if =1 then
    {Name2 field}
    else
    Now insert one more group using this formula and move the group to second level by using group options.
    Hope this helps!
    Raghavendra

  • One Query, Two Datasources

    Is there a way to run a query on two separate datasources? I
    would like to compare the data in two separate MS Access databases.
    Thanks.

    You won't be able to combine two datasources in one cfquery,
    so one way might be for you to query each datasource, then compare
    the two results using a Q-of-Q.
    Phil

  • Query ESSBASE and Oracle in one query

    What is the best way to query in the same time an ESSBASE database and an Oracle Database.I need to retrieve ESSBASE data with information stored in Oracle Database (supplement data).Thanks

    I've used Oracle and MySQL together on several machines; there's no contention or incompatibility that I've ever encountered. They listen on different ports by default (1521 for Oracle, 3306 for MySQL).
    As for PHP, you'll probably want to read an introductory article from the [Oracle PHP Developer Center|http://www.oracle.com/technology/tech/php/index.html]. Nothing you do there should interfere with your MySQL operations, either.
    Have fun!

  • Using one query two times

    Hi i have a system that control car acidents ..
    I have a query that return the streets from a choosed city, and after i ask if the crash happens in streets crossings,
    So i get the variable $street
    If so i do the same query to return the same streets to the user choose the street crossing.
    So i get the variable $street_crossing
    I only need assign diferent variables names to handle the street and the street crossing.
    Is there any way to not go to the database to do the same work that already is done? and get the previous query result ? i am using php and oracle
    thanks in advance

    After the query, the street list is in $results_crzmt_logr. You
    should be able to print this array twice. The first time with
    headings for "Street" and the second time for "Street Crossing".
    For performance reasons the query may benefit from a bind variable.
    Something like:
        $cmdstr_crzmt_logr = "SELECT NOME, ".
        "B, ".
        "CEP, ".
        "FROM TABLE ".
        "WHERE MUNIC=:mun ".
        "ORDER BY NOME ASC";
        $parsed_crzmt_logr = ociparse($db_conn, $cmdstr_crzmt_logr);
        OCIBindByName($parsed_crzmt_logr, ":mun", $_POST[MUN_CODIGO], 10);
        ociexecute($parsed_crzmt_logr);
        $nrows_crzmt_logr = ocifetchstatement($parsed_crzmt_logr, $results_crzmt_logr);Adding error checking may be useful. The free statement should be:
        OCIFreeStatement($parsed_crzmt_logr);-- CJ

  • One query, two diffrent outputs

    Hiho,
    i have got a ABC - Analysis in the business partner data. there are 2 related fields. U-umsatz (for total sales) and U_gruppe (for the kind of business partner). Related from this both udf u should get an A, B or C.
    The udt is a matrix with relations between sales and kind of bp.
    I wrote this query
    SELECT TOP 1 T0.[U_Klasse] FROM [@KUNDENKLASSE]  T0 WHERE T0.[U_Umsatz] < $[OCRD.U_umsatz] AND T0.[U_gruppe] = $[OCRD.U_Klasse] ORDER BY T0.[U_Klasse]
    Sometimes i got the correct output, sometimes not. I thought i could be the thousend sep., but it wasnt.
    any ideas ?
    regards

    ok, so the problem is formating of thousand (I hope you have space as separator). Try it as
    SELECT TOP 1 T0.U_Klasse FROM dbo.@KUNDENKLASSE T0 WHERE
    convert(numeric(9,6), replace(convert(varchar(100), coalesce(T0.U_Umsatz, 0)), ' ', ''))
    <
    convert(numeric(9,6), replace(convert(varchar(100), coalesce($http://OCRD.U_umsatz, 0)), ' ', ''))
      AND T0.U_gruppe = $http://OCRD.U_Klasse ORDER BY T0.U_Klasse

  • In Report How To Execute Query Two Times in One Layout

    hi
    All
    In My Report i have creating on main Query and then query run two type with Defrent Parameter how is possible in Oracle Report 6i
    example
    my Query is
    For Example First time query run defrent parameter and again run some other parameter in same layout help me
    select decode(art_mkt,'1',art_brc,art_mkt) art_mkt,
    &f1 art_prd,
    sum(nvl(art_amt,0)) art_amt,
         sum(nvl(art_net,0)) art_net,
    nvl(substr(art_vou_ser,2,1),' ') art_mfg_type,
    nvl(substr(art_vou_ser,3,1),' ') art_src_code
    from art
    where art_rec_ty = 58
    and art_ml in (:art_ml1,:art_ml2)
    and art_dt between to_date(:start_dt,'dd-mm-yyyy')
    and to_date(:end_dt,'dd-mm-yyyy')
    and art_vou_dt between to_date(:dt1,'dd-mm-yyyy')
    and to_date(:dt2,'dd-mm-yyyy')
    group by decode(art_mkt,'1',art_brc,art_mkt),
    substr(art_vou_ser,2,1),
    substr(art_vou_ser,3,1),
    &g1
    order by decode(art_mkt,'1',art_brc,art_mkt),
    substr(art_vou_ser,2,1),
    substr(art_vou_ser,3,1),
    &g1

    That would be a great question in the [url http://forums.oracle.com/forums/forum.jspa?forumID=84]Reports Forum wouldn't it ;)
    Tony

  • Programmatically change the query used to generate Oracle Reports

    I have two queries. Depending on some parameter value, I would like to use one of these queries to generate my report. Is it possible to programmatically change the SQL query used to generate the Oracle Report.
    Thanks

    There are two options:
    - The easy way
    In the report paper layout create two frames, one for each query , and at runtime
    display only one based on your parameters. (using format triggers on the frames)
    - the not so easy way (but more elegant)
    create the query at runtime using xml customizations using the examples from
    the following documentation:
    http://download-
    uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_xml.htm#i1006734
    16.3 Creating XML Data Models
    16.4.1.3 Applying an XML Report Definition in PL/SQL
    16.4.1.3.2 Applying an XML Definition Stored in Memory
    Regards and Good Luck
    Ionut S

  • ORACLE reports Build 10g - Data Model - query - If statement in Alias ?

    I have the following select statement. It has the alias Survivors, Deaths and "All
    With the ORACLE reports Build 10g - Data Model - I have the following query statement. I require the alias to change. Can the following be done.
    Cases". Is it posible to use :P_LANGUAGE variable to say that -- IF :P_LANGUAGE = FRENCH THEN alias are Survivants for survivors, Décès for Deaths, Tous_les_cas for All Cases. Please advise
    SELECT ALL T_NTR_MULTIBAR.CAT, T_NTR_MULTIBAR.NUM_CASES_LEFTBAR AS Survivors,
    T_NTR_MULTIBAR.NUM_CASES_MIDDLEBAR AS Deaths, T_NTR_MULTIBAR.NUM_CASES_RIGHTBAR AS "All Cases"
    FROM T_NTR_MULTIBAR
    WHERE INSTANCE_NUM = :P_INSTANCENUM
    order by ORDERS

    It is no problem, you can automatically change the complete query before the report is running, which delivers you different kind of values. But the alias names does not change in the group of the data-model, although two query are running with different alias names at different times. In the data model you see the alias names of the first implemented select statement, which are the column fields in the layout.

  • Oracle report , when no data found in query then ptint zero in text how

    hi ,
    i have use oracle report in one query if no data found then i have return O but no row select is there
    query is
    select sum(nvl(a.pitm_matl_cost,0)),
    decode(b.pm_assy_type,'B','B','Z')
    from pumpitems a, pumpmast b
    where a.pitm_proj_code like 'KAWASII' and
    a.pitm_pump_type = b.pm_pump_type and
    a.pitm_comp_type = b.pm_comp_type and
    a.pitm_sr_no = b.pm_sr_no and
    substr(a.pitm_matl_code,1,1) = 'X' and
    pitm_itm_cal = 'N'
    group by decode(b.pm_assy_type,'B','B','Z')
    order by decode(b.pm_assy_type,'B','B','Z')
    no data then it return no row select but
    i have return 0 how is possible , in report i have check cf, and cs to total , and no data then print 0 in text box so.
    sol1:
    select count(*), sum(nvl(a.pitm_matl_cost,0)),
    decode(b.pm_assy_type,'B','B','Z')
    from pumpitems a, pumpmast b
    where a.pitm_proj_code like 'KAWASII' and
    a.pitm_pump_type = b.pm_pump_type and
    a.pitm_comp_type = b.pm_comp_type and
    a.pitm_sr_no = b.pm_sr_no and
    substr(a.pitm_matl_code,1,1) = 'X' and
    pitm_itm_cal = 'N'
    /*and
    substr(a.pitm_matl_code,1,1) != 'C' and
    substr(a.pitm_matl_code,1,1) != 'F' and
    substr(a.pitm_matl_code,1,1) != 'S'*/
    group by decode(b.pm_assy_type,'B','B','Z')
    order by decode(b.pm_assy_type,'B','B','Z')
    count(*) is return 0 but it's notworking in this query why i dont no
    another soluction than help

    This sounds like it's similar to another recent post
    Re: How do I print some value when there is no record against field

  • How to write REF-CURSOR Query in Oracle Reports

    Hello Guys!!
    I have a form in which you can select regions/divisions/locations etc by the use of check boxes. And the selected values will be inserted into a table, and based on the selected values of the table the report is run.
    The issue I have is with the query inside the Oracle reports(attached to this file).
    The query works fine until the last two EXISTS conditions.
    IF a region exists In the table report_param then it works fine but if there are no divisions in it , then the query returns no values, which is not correct.
    Someone has advised me to use a ref-cursor query inside reports tool, which I am not aware off. So, anykind of suggestions or advises are welcome. Please let me know about it as it is very urgent issue for me. Anykind of help would be greatly
    appreciated.
    Thanks,
    Vishal
    -------------------------------------------------------Query in Oracle Reports---------------------------------------------------------
    select c.key_segment, p.supplier_id,
    decode(:in_col_nm, 'BRAND',nvl(p.product_brand,'<Unknown Brand>'), 'PLN',nvl(p.product_legal_name,'<Unknown Legal Name>')) COL_NM,
    sum(a.ext_price) sales_dols,
    sum(comp_allow_pkg.get_comp_allow_stddiv(a.control_loc_id, a.product_id, a.sold_to_customer_id,
    a.doc_dt, a.ext_price, a.units)) cust_reb_dols,
    sum(a.units) units,
    sum(a.ext_cost) cost_dols
    from sales a, key_segment_plns c, product p, rep_wrtr_dw_cust h
    where a.doc_dt between :in_start_dt and :in_end_dt
    and a.customer_oc = h.control_loc_id
    and a.sold_to_customer_id = h.sold_to_cust_id
    and a.ship_to_customer_id = h.ship_to_cust_id
    and ((:in_dg_cd = 'B' and h.dealer_grower_cd in ('D','G')) or h.dealer_grower_cd = :in_dg_cd)
    and a.product_id = p.product_id
    and p.product_gl_class_cd = 'CHEM'
    and p.product_legal_name = c.product_legal_name
    and c.key_segment in ('GLYPHOSATE','PLANT HEALTH/RUST FUNGICIDES','PYRETHROIDS','STROBI FUNGICIDES')--&IN_KEY_SEGMENTS
    -- and (:in_oc = 'ALL' or (a.control_loc_id in (select control_loc from control_loc_comb_ocs where control_loc_comb = :in_oc)))
    -- SALES DATA FILTERS TO MATCH ACCUM_SALES_DG_MV
    and a.sale_type_cd in ('02','08')
    and a.document_type_cd in ('I','C','D')
    and (substr(a.product_id,-1) in ('0','1') OR nvl(upper(trim(p.product_brand)),'X') = 'TECH FEE')
    and a.units <> 0
    and a.unit_cost <> 0
    and a.unit_price <> 0
    -- NEW FILTERS ADDED 9/11/07: LOCATION(BRANCH), BUSINESS TYPE, RSM/ASM/REP
    and ((:in_loc = 'ALL') or (nvl(a.warehouse_id,'<blank>') in (SELECT param_value
    FROM report_param
    WHERE report_id = :IN_REPORT_ID
    AND session_id= :IN_SESSION_ID
    AND USER_ID = :IN_USER_ID
    AND param_name='LOCATION_TYPE')))
    and ((:in_uhs_ag = 'ALL') or (:in_uhs_ag = 'NA' and p.product_uhs_ag != 'A') or (p.product_uhs_ag = :in_uhs_ag))
    and ((:in_sales_rep = 'ALL') or (nvl(a.territory_id,'<blank>') in (SELECT param_value
    FROM report_param
    WHERE report_id = :IN_REPORT_ID
    AND session_id= :IN_SESSION_ID
    AND USER_ID = :IN_USER_ID
    AND param_name='SALES_REP_TYPE')))
    and EXISTS
    (SELECT '1'
    FROM locations l, report_param rp
    WHERE rp.report_id = :IN_REPORT_ID
    AND rp.session_id= :IN_SESSION_ID
    AND rp.user_id = :IN_USER_ID
    AND rp.param_value = l.region
    AND rp.param_name = 'REGION_TYPE'
    AND a.warehouse_id = L.ARS_LOCATION)
    and EXISTS
    (SELECT '1'
    FROM locations l, report_param rp
    WHERE rp.report_id = :IN_REPORT_ID
    AND rp.session_id= :IN_SESSION_ID
    AND rp.user_id = :IN_USER_ID
    AND rp.param_value = l.region
    AND rp.param_name = 'DIVISION_TYPE'
    AND a.warehouse_id = L.ARS_LOCATION)
    group by c.key_segment, P.supplier_id,
    decode(:in_col_nm, 'BRAND',nvl(p.product_brand,'<Unknown Brand>'), 'PLN',nvl(p.product_legal_name,'<Unknown Legal Name>'))

    Hi,
    I need your help to create a report using Ref-Cursor. please see the below thread
    Report using ref cursor or dynamic Sql

  • Why JRC executes query two times? (reports.queryengine(?:?) - Executing query: ...)

    Hello! Using JRC. While creating the report for viewing, I noticed one interesting thing. Why JRC executes query two times AND first time is executed with default parameters AND if default parameters are NULL the query can be invalid (even if it is marked to convert all database NULLs to defaults in Report Options).
    <!break>
    1. Why do you need to execute query the first time with these default parameters, which are later set to the others? We need to make some valid default parameters to make everything work. Also it is not efficient to execute unnecessary query.
    2. If I'm wrong could you explain please? If I'm right, is it a bug and when do you fix it?
    Waiting for answer,
    Anton Stalnuhhin
    Java-developer, Webmedia AS

    .

  • Reports 9i Graphs with more than one query..

    Hello,
    I am converting my 6i reports to 9i reports. On my graph reports with more than one query, when I invoke the graph wizard it changes the value of the src to the wrong query automatically. When I run my report, I am getting the error REP-0069 Internal Error rwlib-1: REP-6219 Column (Column Name) not in given cursor hierarchy. Although it's a pretty easy fix to go into the graph settings in the property palette and change it back, it is extremely frustrating. Has anyone else ran into this problem and did you find a permanent fix?
    Thanks,
    Laura

    Hi Laura
    One workround would be to create a new query in the Data Model that includes desired fields, and then source
    chart to the new group.
    FYi, bug2527100 was filed on this issue and is already fixed. The fix would be available in 9i Reports 9.0.2.2 patch. Reports 9.0.2.2 patch is scheduled to be released on Mar 05 2003 (tentative date).
    Thanks
    The Oracle Reports Team

  • Crystal Report Many to One Query Config error when using DataSet.ReadXML me

    When I build a dataset with this method numerous relations are automatically created. I then map these fields onto crystal reports with ADO.net data connection. However when I run the report the following error occurs:
    CrystalDecisions.CrystalReports.Engine.InternalException: Cannot determine the queries necessary to get data for this report.Details:
    This query cannot be performed. The link order requires many to one query configuration, which is not supported. Please rearrange the links.
    If I remove the links (relations) i get duplicate data on the report. Is there any way to resolve this or a patch for the error?

    Hello, Mervin;
    Since you are using ADO.NET dataset, is it possible to get all of the fields you need in one SQL Query outside of Crystal Reports?
    If that is possible, you can use that dataset to create an XML or XSD file to use as the structure for your report.
    VB
    'Using the full path to the .xml file, include the schema
    dataSet.WriteXml("C:\temp\test.xml", XmlWriteMode.WriteSchema)
    or
    dataSet.WriteXmlSchema("c:\temp\testXML.xsd")
    Now create a new report with the ADO.NET(XML) connection and point to either the XML or XSD you created. XML is useful because you can view data in the report designer for final formatting of the report.
    Now there is only one datasource and no linking is required in Crystal Reports. That should resolve the one to many issue.
    Another useful tool is to group on the many and place all the fields normally in the detail section into that group header. Suppress the Detail and Group footer sections. The Group Header will now look like a Detail section and each distinct value will only appear once. You can group on one field or a combination (using a formula field) to get the results you need. Test this to be sure you do not miss anything you want to see.
    Elaine

  • SQL Query as Item Source/Oracle Reports w/ HTML DB?

    I have successfully used a SQL Query as an item source in the past on several occasions. However, in this instance, every time I try to do this, I get the following error:
    Error ERR-1019 Error computing item default value: page=3 name=P3_TEST_ITEM.
    ORA-01460: unimplemented or unreasonable conversion requested ORA-02063: preceding line from [database_name]
    If I use the exact same query in creating a report region, the page displays fine and the query returns the correct data. Why might this be happening, and what can I do to fix it?
    Also - off the subject - is there a way to use HTML DB to deploy reports that are created in Oracle Reports Builder? I have created several employee productivity reports for supervisors and managers in HTML DB, which is great for allowing them to run them live and have fields as parameters for varying employees, date ranges, etc... but formatting them to be browser and printer friendly is an absolute nightmare so far. If I could create and format the reports in Reports Builder and then deploy them using HTML DB, while still being able to offer parameters to the user, that would be perfect. Is this possible?

    Here is my query:
    SELECT
    TO_CHAR((sum(decode(ef.production_function,'Y',ef.function_minutes+ef.function_ot_minutes))/60)/8, '9999999.99')
    FROM
    RLAPPLSG.EMPLOYEE_INFO@REMOTE_SERVER EI,
    RLAPPLSG.SC_EMP_FUNCTIONS@REMOTE_SERVER EF,
    RLAPPLSG.SC_EMP@REMOTE_SERVER E
    WHERE
    ( e.SC_EMP_NBR=ef.SC_EMP_NBR )
    AND ( ei.EMP_ID=e.EMP_ID )
    AND (
    ( trunc(( e.SC_DATE )) BETWEEN :P2_BEGIN_DATE AND :P2_END_DATE )
    AND (ei.EMP_MGRS_ID = :P2_SUPERVISOR_ID
    OR ei.EMP_ID = :P2_SUPERVISOR_ID)
    Every table and/or view that is referenced here is done so remotely. The column datatype breakdown is as follows:
    production_function - BOOLEAN
    function_minutes - NUMBER
    function_ot_minutes - NUMBER

Maybe you are looking for

  • Changing meeting date/time doesn't reflects to all atendees

    ... but everybody gets a mail notification of the change. We cannot figure out whats happening. We tried to reproduce the problem but we couldn't. Anyway we can see: a) The owner of the event has his calendar modified b) Everybody got mail notificati

  • Song tracks are not downloaded properly from iTunes Store: they are not added to the playlists, and eat disk space

    Hi, Yesterday I wanted to upgrade my wife's iPhone (5, 16 GB) from iOS 7.0.6 to iOS 7.1. She had only 500 MB of free space, and 1.9 GB was needed, so I decided to temporarily remove a number of songs from her music library. After this operation there

  • Steven Please Help

    Hi Steve, I feel you can give me better suggestion for my question. We are suppose to develop an Application which is little big, I mean it may have around 200 forms.This has to be done for a Supermarket which is placed at around 20 centres.Now we ar

  • Conditional formating in pivot view using combine similar request

    Hello, I have a report using combine similar request. It's a union report with around 6 reports. Now for first 2 report results the user wants red and 2 report results green and last two yellow. Is there a way we can do this? also the report is in pi

  • SRM Product Category replication

    Hi, I have a problem while replicating the product category from SRM 5.0 to R/4 4.7 system. When I run the load the entry is stuck in the queue and the error message says: The current application triggered a termination with a short dump. I have rese