Multiple Queries in one Report

What is the best way to show the data of 2 queries in one report?

Hi Frank,
It purely depends on the reporting needs I would say. You could simply add the two queries, create joins in Crystal Reports and drag the required fields in the details section.
The joins in this case, however, would be executed by Crystal Reports, unlike when the report is created off a Relational database.
-Abhilash

Similar Messages

  • Results of multiple queries in one report

    Hi
    I would like to create one report with multiple rows and each row should display result of a different query.
    I guess I can use multiple report on one region or multiple regions in one place.
    (1)However is there a more elegant way of creating a single report look and feel...eg like it would happen in excel.
    (2)Is it better to have one page with multiple regions or multiple reports in one region.
    Thanks
    Faizi

    I'm not sure if it suite your needs,
    but maybe you can use UNION in your queries to get them together in one report ??
    Second option:
    Denes did great work and he created some how-to about putting mulitple reports in one region:
    http://deneskubicek.blogspot.com/2007/06/multiple-reports-in-one-region.html
    Hope this helps.
    Tomasz K.

  • Can we use multiple queries on one template

    Can we use multiple queries on one template

    Hi,
    if you're using data templates for your data set, you
    can put multiple queries in the XML data template.
    The queries may then be linked (or not) by the "link
    name" tag ...
    Grtz.Following you answer here...do you know eventually how/if possible to preview a report (with XMLP Desktop) that is using data templates for the data set?
    Thanks,
    Liviu

  • How to pass an array or structure, in addition to a query, or multiple queries to the Report Builder as parameters

    Is there a way to pass an array or structure for example as parameters, in addition to a query, or multiple queries to the Report Builder in CF8? I believe this was recommended by users to be in CF8.

    BrianO,
    Although it's been a while, I thought I'd provide the code to do this for you. It works for me in CF8, and probably will in CF7.
    Here I create a structure called My, and provide that one parameter to my CFReportParam tag.
    <CFSet My = {
    Client = "Client Name",
    ReportDateFrom = DateFormat(ThisStartDate, DateMask),
    ReportDateTo = DateFormat(ThisEndDate, DateMask),
    PageHeaderImage = ImagePath & "\Logos\Page_Header.png",
    WatermarkImage = ImagePath & "\Logos\Watermark.png",
    GetBarSummary = GetBarSummary,
    GetPieSummary = GetPieSummary
    }>
    <CFReport Template="#ReportPath#\SpendSummary.cfr" Format="PDF" Query="GetSummary">
    <CFReportParam Name="My" Value="#My#">
    </CFReport>
    Inside the report itself, reference the given parameter as Param.My.PageHeaderImage for example. It can be referenced that way from any expression inside the report builder. You can even use the queries as the data source for charts (using the Data From a Query -> Query Builder -> Advanced) by entering "Param.My.GetPieSummary" where it says "Variable containing query object".
    HTH
    Swift

  • How to execute multiple queries in one stored procedure.

    Hi,
    I am Kumar,
    How to execute multiple queries in one stored procedure.
    here is the my requirements,
    1. get the max value from one table and sum of the that value.
    2. insert the values and also sum of the max value.
    using stored procedure
    I am using SQL server 2000 database.
    Please help me.
    Advance thanks
    by,
    Kumar

    This is not a java question and it is not even a problem: your only problem is
    1) lack of knowledge
    2) lack of interest to find a manual
    But you are going to have to change both by actually reading a book or a manual that explains the stored procedure language of SQL Server. It is the same as Sybase I think, so you could also look for a manual for that DBMS.

  • Moving multiple queries from one category to another in QM

    Hi All,
    Is there is any way of moving multiple queries from one category to another in the query manager?
    Or is the only way of doing it by saving each one individually into a different category.
    Any ideas ?
    Regards,
    Rakesh N

    Hi Rakesh,
    The query manager has limited function compare with normal file management applications. Under current design, you have to do this one by one. You just need to make sure move the smaller amount of queries to large category. Category name can be changed easily.
    Thanks,
    Gordon

  • Two queries in one report?

    I have Three tables like
    Device_table columns are
    d_id, d_name, date
    Software_table
    sw_id, software, version, serial_no, sw_type, d_id(foreign_key)
    hardware_table
    hw_id, hardware, specification, d_id(foriegn_key)
    now in reports i want to attach both hardware and software, I have made two quires like
    SELECT d.d_name, sw.software, sw.version, sw.sw_type from
    device_table d, software_table sw
    where d.d_id = sw.d_id
    and second query is
    SELECT d.d_name, hw.hardware, hw.specification
    from device_table d, hardware_table hw
    where d.d_id = hw.d_id
    Now my problem is that how can I add both queries in one report so that i can get a list of software and hardware attached to one device.
    Regards
    Maz

    I want to see the report as follow.
    d_name: CPU-1
    date: -----------
    Software installed:
    sw_id, software, version, serial_no, sw_type
    (list of softwares attached, can be more then one)
    Hardware attached:
    hw_id, hardware, specification (same like software list, it will contain hardware list attached to specific device),
    Please if you can help me that how will i make a query for this.
    Thanks and Regards
    Maz

  • How to run multiple queries in a report 6i

    hi!
    i have multiple queries that i have created in data model
    how can i invoke them in my report?
    thanks!

    Every query is run automatically. You can have a Q1 and Q2 and display results of Q1 on one page, and the results of Q2 on another.

  • Multiple Queries on Interactive Report

    hi all,
    Can i run multiple queries based on some condition in creating an interactive report?? I mean
    i want to run a single query as
    if :P12_QUERY == 1 then
    first query
    else if :P12_QUERY == 2 then
    second query
    end if;
    Please provide me the syntax if its possible. Plz help me in this regard.
    With Regards,
    Sunil Bhatia

    Hello,
    You will need to create a pipeline function and use it in your query. But both your queries have to return the same dataset.
    Example:
    function choose_query(v_query_type integer) return some_type pipelined
    is
    v_query varchar2(4000);
    v_cur sys_refcursor;
    v_row some_type;
    begin
    if :P12_QUERY == 1 then
    v_query := 'select ....';
    else if :P12_QUERY == 2 then
    v_query := 'select ....';
    end if;
    open v_cur for v_query;
    loop
    v_row := some_type(null, null, null);
    fetch v_cur into v_row;
    exit when v_cur%notfound;
    pipe row (v_row);
    end loop;
    close v_cur;
    end;In interactive report you have to set query:
    select * from table(choose_query(:P12_QUERY ))
    Best Regards, Kostya Proskudin

  • How can I handle multiple Queries in single Report?

    Using Reports 6.0, i have 2 queries Q_1, Q_2 and I have define a user parameter, Flag_1 char(1).
    I wish to execute Q_1 if Flag_1 = 'T' and Q_2 if flag_1 = 'F'
    How can i do this?

    Hello Fayad,
    Another way in which you can achieve the same result in one report is by framing your two queries something like:
    Q_1. select * from emp where :flag_1 = 'T'
    Q_2. select * from dept where :flag_2 = 'F'.
    This will cause the appropriate query to be executed, depending on the value of the flag_1 parameter. Additionally, you would need to create two report blocks in your layout, one for each of the above queries. You can create format triggers for the enclosing frame of these blocks, which will show/hide the entire block depending on the value of the flag_1 parameter. For example, the format trigger for the EMP report block (based on query Q_1) frame would look like:
    function M_G_EMPNO_GRPFRFormatTrigger return boolean is
    begin
    if (:p_1 = 10) then
    return (TRUE);
    else
         return (FALSE);
    end if;
    end;
    Thanks,
    The Oracle Reports Team.

  • SQL Developer cannot execute multiple queries in one connection

    Hi,
    Using : SQL Developer 1.2.29.98, Oracle Database 9i on Windows XP.
    Currently I have TOAD and PL/SQL Developer to handle things related to Oracle Database.
    I found this SQL Developer tools as an interesting tool which might replace PL/SQL Developer (I assume).
    I opened two SQL Worksheets and tried to execute 2 queries (time consuming one) simultanously, suddenly it freezes (the window become grayed). Just like TOAD, we cannot smoothly execute multiple queries on single connection on SQL Developer
    I can monitor the query process using TOAD (Session Browser) and found both queries are running while SQL Developer window become grayed and seems not functioning. After the queries have been finished, I mean both of them, the SQL Developer window become normal and "alive" again showing the expected results.
    Well, however PL/SQL Developer could handle this. Executing multiple queries in single application is just its unbeatable features.
    We can view the query result once its finished instead of until the others being processed, by just only switch the SQL Windows.
    Is it true that SQL Developer doesn't support executing multiple queries?
    Or is it a feature which we should request?
    Or we have to activate this feature by doing some changes on configuration / preferences?
    (Do we need to open two SQL Developer instances? what a memory consuming solution).
    Regards,
    Buntoro

    SQLDeveloper connections are single threaded and also rather single minded (in that you can't do much else while a long query is running.)
    There is an existing feature request http://apex.oracle.com/pls/otn/f?p=42626:39:3685254426061901::NO::P39_ID:4202 for which you can vote.
    The workaround is to have multiple connections. Not brilliant but it works.

  • Cross tab data is getting multiplied if i use multiple queris in asingle report

    HI,
      i am using multiple queris for displaying data and graphs(charts).
      my requirement is to display 2 charts and data in crosstab in a single report.
      all the three thing (2charts and crosstab) will use diffrent values.
    I am writing 3 sql queries for getting appropriate values for charts and crosstab.
      Now the problem, both charts and crosstab are taking the values of all 3 queris
    i.e if i added crosstab  first to the report values are coming correctly. After  that if i add graph cross tab values are getting changed and graph values are not getting properly.
    if i add graph first then its coming correctly.
    if i tried to add all 3 components then values are going cores...... ?

    When you say you are writing 3 sql queries what do you mean? Are you creating 3 SQL command objects in the database expert? If so this is your problem, Crystal will pull a cartesian product through (this is every possible combinatin of rows from the 3 queries).
    If your 2 graphs and 1 crosstab are based on different datasets the way to approach this is to create each on a seperate report, then create a new blank report and add each of your 3 reports as subreports in the report footer.
    Hope this helps,
    Toby

  • How to embed multiple queries in one web template

    Hi,
    I've a requirement wherein I need to embed two queries in one web template. The first query displays order quantity from a particular customer and the second query displays other information for that customer. Most of my web templates i've contains only one query which i've created using 0ADHOC template saving this as diff template and modifying it. But this is the first time I have got this type of requirement wherein the user drills down on a particular customer for order quantity and then goes for other information from other query.
    Does anyone out there has any idea or suggestion as to how to do this ? One more thing I need to pass the values from one query to another which is akin to RRI concept while staying in the same web template.
    Your suggestions/advices are highly appreciated.
    Thanks in Advance,
    Rash.

    Hi Rash,
    You can do this by including 2 table web items in your template and assiging the 2 different queries as different dataproviders to each. You can try to create a drop down box to filter the customer and in its properties set DataProvider1 and DataProvider2 as the affected data targets.
    Hope this helps...

  • SQL multiple selects in one report?

    Hello,
    I'm having a problem selecting from the following table (let's call it the dpt_user_role) to be able to create a custom report,
    The table looks like the following:
    Dpt_id User_id User_is_manager
    1 1001 N
    1 1002 Y
    1 1003 N
    2 1001 Y
    2 1005 N
    2 1006 N
    3 1001 Y
    3 1007 N
    3 1008 N
    I would like to build a custom query to fit in just one report that would give me the following results for user_id 1001
    Dept_id User_id User_is_manager
    2 1001 Y
    2 1005 N
    2 1006 N
    ------ (line from the custom report template separating dpts) ------
    3 1001 Y
    3 1007 N
    3 1008 N
    As you can see I need to select all the depts where user_id :PX_USER is a manager but also the non manager users in that report.
    Any help pointing me in the right direction will be greatly appreciated and sorry for the inconvenience.
    Thanks.
    Best regards,
    NJ

    Hello,
    Thank you for your fast answers and for helping.
    The result of the query returns,
    2 1001 Manager
    2 1005 Non-Manager
    2 1006 Non-Manager
    ------ (line from the custom report template separating dpts) ------
    3 1001 Manager
    3 1007 Non-Manager
    3 1008 Non-Manager
    But I really need something like
    Dept_id Manager User_is_manager
    2 1001 Y
    Dept_id Non-Manager User_is_manager
    2 1005 N
    2 1006 N
    ------ (line from the custom report template separating dpts) ------
    Dept_id Manager User_is_manager
    3 1001 Y
    Dept_id Non-Manager User_is_manager
    3 1007 N
    3 1008 N
    So I could pass the results to the custom report like
    [begin of template report]
    Manager of Dept #Dept_id# is #Manager#
    Non managers users are #Non-Manager#
    ------ (line from the custom report template separating dpts) ------
    [end of template report]
    And the report would go to Dept_id = 3 and so on. I would have to perform an inner join of some sort to get the Manager and Non-Manager users first and last names from a different table.
    Is this all possible in a single query or am I in hyperspace here?
    May the good winds of fortune keep blowing your way and inspiring you.
    Thank you!
    Best regards,
    NJ

  • Multiple BEx queries in one report

    Hi All,
    I would like to know if we can use multiple BEx queries in a single report using Crystal Report 2008 / 2011?
    If so, there is another requirement follwoing the above as below:
    I have objects obj1,obj2,obj3 in query 1 and objects obj1, obj2, obj4 in query 2. I have prompts based on obj1 from query1 and prompt on obj4 from query2.
    So, when I enter a value in prompt1 for obj3, i need to have query1 executed and display the data and data should not be displayed from query2. Similarly, if I enter value for prompt2 of query2, only query2 data to be displayed.
    Pls suggest if this can be achieved and how?
    Thanks,
    Naresh
    Edited by: NareshKatakam on Jul 22, 2011 11:25 AM

    Use a subreport for each query

Maybe you are looking for

  • Status of the mail sending option using SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi experts, I m using SO_NEW_DOCUMENT_ATT_SEND_API1 function moduel for sending mails to dealers. That is, whenver i execute a Z transaction, the customer invoice details are getting displayed in report output. At the same time, the same output data

  • External HDD keeps changing from HFS to NTFS

    Greetings, This is my first post and I am also brand new to apple. I have an issue that I am wondering if anybody has experienced it. I currently migrated from an old PC (XP SP3) to OSX. I have files on an external HDD that was used on the PC that I

  • Can retrieve users from some sub OUs and from other sub OUs cann't

    hi, I am using Windows 2003 Active Directory Server and Jndi to access that in my application. I am using follwing code to retrieve all Users from a aprticular OU. ctx = new InitialDirContext(environment); SearchControls ctls = new SearchControls();

  • ATP warning: Lock rule not maintained

    Hi Friends, I am creating a delivery for Subcontract PO components and I am get the following warning message: " Lock rule not maintained for ATP group ZS" Sanjay

  • HT5294 I am having trouble importing converted .MTS files

    I am having trouble importing .MTS files converted from file not camera. Data rates are low and not match 3 camera editing seq. (2 camera HD files imported off camera into iMovie) I am using Wondershare Ultimate 3.0 and have tried several options in