Report Queries - Multiple Source queries - One source returns & one doesn't

Hi Folks.
Odd one here.
I have a report query entry in the Shared Components of the APEX UI.
Within the Query are two source queries.
Both return unique column names.
Both use the same bind variable.
When generating a PDF using the call to the report, the data from one query is being returned and the data from another is not.
I have generated a sample XML file from APEX which is populated with data for both queries.
If I import this into MS-Word using the BIP plugin and generate a preview all is fine. All fields using data from both source queries are populated.
When generated via a regular call within APEX it simply does not work. I only get the data from one query.
Does anyone have any suggestions?
Anyone had a similar thing?
Any comments/suggestions welcome.
Many thanks
Dogfighter.
Message was edited by:
Dogfighter
Message was edited by:
Dogfighter

Hi Marc
Does this make sense to you?
I have now set up a simple report query and report layout.
The record ID is hard coded into the query so that it only returns one row.
I am using an RTF based template.
If I navigate to Shared Components > Report Queries > Edit Report Query and then press the 'Test Report' button it runs perfectly.
If I copy the 'Print URL:' value from this page and use it as the URL target on any page in the app. it also works perfectly.
If I try and execute the following...
update invoice_summary
set invoice_pdf = APEX_UTIL.GET_PRINT_DOCUMENT (127, -- App ID
'TEST_INVOICE', -- query name
'TEST_INVOICE') -- layout name
where invoice_summary_gsm_id = a.INVOICE_ID;
I get the pdf saved to the BLOB column with the field labels in place but no data.
Three ways of running the report.
Two of them work perfectly but the one I want (generate direct into BLOB column) does not. Why would the exact same report query & report layout work with the other two methods but not the GET_PRINT_DOCUMENT route?
It's not as if the pdf does not get into the BLOB column, it does, but it only has the labels and no values.
Any ideas?
Simon.
PS. I only have one report query and one report layout set up so as to avoid confusion. Both with the same name.
Message was edited by:
Dogfighter

Similar Messages

  • Crystal Report with multiple BEX queries

    I have a Crystal Report that uses 6 different BEX queries.  The report needs to display the results from each query, there is no need to join these queries.  The Crystal Report is using subreports and displaying the data one BEX query after another.
    The issue I have is that these BEX queries all have the same mandatory variable.  This is causing Crystal to prompt the user to enter the same variable filter once per BEX query.  
    If we change the BEX queries so only the first BEX query has a variable and use Crystal to filter the other 5, the performance is unacceptable.  My guess is the other 5 queries are experiencing client side filtering instead of the filter being passed down to BW.
    Is there a way to have multiple BW queries with the same variable and have Crystal only prompt the user to enter input one time?
    Thanks,
    Andy

    Hi Andy,
    My understanding of the issue is :
    --You have 6 Bex queries and are displying on after the other becaused you have inserted all these queries as sub report.
    --All your Bex queries are having same parameter / prompt / variable which will take user input and filter the data.
    --Now the report is prompting the user to enter prompt / variable 6 times.  You are looking for an option to proimpt only ones insted of 6 tiems.
    If I understood correctly follow the method to link sub reports to grab the parameter value form main report parameter :
    Right click on sub report go in Change Subreport Links, select main reort prompt / varieable and then select sub report prompt / parameter / variable.
    Do the same for all your sub reports.  This will eliminate asking / prompting the same parameter value several times.
    Thanks,
    Sastry

  • Create BI Pub report using multiple Answers queries as sources

    No answer to this on the BI Publisher forum. Posting here...
    Is it possible to pull information from two or more separate Answers requests into the same BI Publisher report?
    I'm using Word with the BI Publisher add-in. I can connect to, and retrieve data from, one of my stored Answers requests. So now I have a table of Answers-sourced results in my Word doc.
    Now I'd like to get some different results, from another stored Answers query, and put those results into a second location in my Word doc.
    How is this accomplished?
    Thanks!

    I figured it out. Although I can't DIRECTLY add more than one answers query to a Word doc strictly from within Word, if I establish the different Answers queries as different DataSets over in my BI Publisher report, then specify that the default DataSet is the Concatenated SQL Data Source, both queries appear in the "Insert" options in Word, and both can be used in the same Word doc layout template.

  • Multiple XML HTTP Data sources sequentially

    Hi,
    We are creating a report using multiple XML HTTP Data sources sequentially.
    The Report uses multiple XML HTTP Data sources sequentially; the report creation fails or delayed. We would like to join the datasources after accessing from the HTTP Server.
    At the same time the same XML files when locally accessing as data sources, the report is getting created.
    Is there any alternate solution for XML HTTP Data Source Access. Or in which way I can proceed with this.
    Thanks,
    Unni

    I am not able to use datasets here.
    The context is as below.
    I am running an HTTP server (XML-RPC program),which will generate an XML output as defined with a local XML Schema.
    Here I have multiple HTTP requests ,each will generate multiple XML outputs.
    I am using XML and WebServices Connection where I will provide like below,
    (Please note file1,file2 are normal text files with data corresponds to xsds.)
    HTTP(s) XML URL : http://localhost:8002/ReadTable?name=file1
    Local Schema File : E:\Test\file1.xsd
    HTTP(s) XML URL : http://localhost:8002/ReadTable?name=file2
    Local Schema File : E:\Test\file2.xsd
    Like this I am able to create multiple XML outputs through HTTP requests.(only file1),which means while creating reports the sequential requests are not handling properly.
    My report will join say two of theese files. But at the time of report creation it will ask of only runtime parameter of first request in the join.
    Here The report will generate only with data from first text(data) file.(file1)
    Hope you got a clarity about the proble.

  • How do i access multiple bex queries in one crystal reports??

    Hello Experts,
    I have 10 cubes and 30 bex queries on it and i need to create 3 final crystal reports on these 30 queries.
    I am on BI 4.0 & CR 2011. but my client is not on correct SAP patch ie., he is on 15+ but he must be on 23+ to access multiple bex queries on CR 2011 Database expert. (I am unable to see bex queries in Database expert to link couple of bex queries)
    And my client env doesnt have SAP EP for SAP BW Netweaver Connection to create a connection to access cubes or queries in IDT.
    Do my client env need EP? so that SAP BICS Connection will work in IDT?
    How do i approach to achive this...
    Thank you...

    Hi,
    have you checked the option "allow external access" in your query? SAP Toolbar will find all queries but the database export needs this flag to be set.
    Using multiple queries within one crystal report is using the "multi database join feature" of crystal reports. You can link your queries by key fields and crystal will join them in memory. So when there are many queries or many datarows this can be a huge performance killer.
    Actuallly one of our customers is running a report which has more than 20 BEx queries linked together. It runs just fine.
    Please be sure to set your joins correctly. E.g. crystal will try to make a join on the "key figures" sturcture if you let it create a suggestion or it will try to link on all fields of an infoobject. This will bring MDX errors.
    So you should be setting your joins correctly - the [infoobject]-[20infoobject] fields are fine for that.
    I hope you can use some of my words.
    Regards
    Thorsten

  • 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

  • One report, One Source System with multiple Company Codes -- Authorization

    Hello Guys
    We have 2 DEV source systems for our BI implementation right now. one for US (CCode - 406) an one UK(CCode - 301).
    We have already completed the implementation for UK with 38 reports.
    we are right now moving the US implementation.
    when we move to QAS we are going to have one Source system with both US and UK data.
    so when we move to QAS, the US clients wants to view the reports developed in UK implementation with their own data.
    How can we do that. since some reports doesn't have company code to restrict the data to respective users.
    Thanks and Kind regards,
    shekar.

    Hi
    First make the company code authorization relevant in infoobject BEx explore tab
    If your in BI7 , you have analysis authorization concept
    http://help.sap.com/saphelp_nw70/helpdata/en/66/019441b8972e7be10000000a1550b0/frameset.htm
    Regards
    N Ganesh

  • Bursting a report with multiple queries

    Hi,
    I need to set-up bursting in BIP for a report with multiple queries. The output format is pdf and delivery is through e-mail. Since the queries need to be linked, I'm trying to do this using data template. I've set-up split and burst based on a field (store_id) from the first query which is used as a bind variable in the subsequent queries. So I'd ideally want the report to be split based on store_id. The report works fine if I use a parameter for store_id and view the output by store_id. When I try to schedule the report for bursting, it generates and e-mails the reports but only the last report appears to have correct data output while the others have only the output from the first query (and all other queries appear to return nothing in the report).
    Any suggestions on what could be the issue here? Thanks!
    Here is the data template for the report:
    <dataTemplate name="Report" description="Report" dataSourceRef="ReportDB">
    <dataQuery>
    <sqlStatement name="STORE_VENDOR">
    <![CDATA[SELECT STORE.STORE_ID Q1_STORE_ID, VENDOR.VENDOR_ID Q1_VENDOR_ID, VENDOR.VENDOR_DESC Q1_VENDOR_DESC, PERSON.NAME Q1_NAME
                   FROM STORE, SERVICE_TICKET, VENDOR, ROLE, ROLE_TYPE, PERSON, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND (SERVICE_TICKET.SOURCE_ID = VENDOR.SOURCE_ID AND SERVICE_TICKET.VENDOR_ID = VENDOR.VENDOR_ID)
                   AND (STORE.SOURCE_ID = ROLE.SOURCE_ID AND STORE.STORE_ID = ROLE.STORE_ID)
                   AND (ROLE.SOURCE_ID = ROLE_TYPE.SOURCE_ID AND ROLE.ROLE_TYPE_ID = ROLE_TYPE.TYPE_ID AND ROLE_TYPE.TYPE_DESC = 'PIC')
                   AND (ROLE.SOURCE_ID = PERSON.SOURCE_ID AND ROLE.PERSON_ID = PERSON.PERSON_ID)
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4'
                   GROUP BY STORE.STORE_ID, VENDOR.VENDOR_ID, VENDOR.VENDOR_DESC, PERSON.NAME
                   ORDER BY STORE.STORE_ID]]>
    </sqlStatement>
    <sqlStatement name="WO">
    <![CDATA[SELECT STORE.STORE_ID Q3_STORE_ID, 'Nightly Cleaning' Q3_NIGHTLY_CLEANING, 'Nightly Cleaning' Q3_DESCRIPTION, SERVICE_TICKET.TICKET_ID Q3_TICKET_ID, TO_CHAR(SERVICE_TICKET.END_DATE, 'MM/DD/YYYY') Q3_END_DATE, 'Excellent' Q3_QUALITY_RATING_1, 'Satisfactory' Q3_QUALITY_RATING_2, 'Unsatisfactory' Q3_QUALITY_RATING_3
                   FROM SERVICE_TICKET, STORE, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND STORE.STORE_ID = :Q1_STORE_ID
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4']]>
    </sqlStatement>
    <sqlStatement name="SERVC_TYPE_1">
    <![CDATA[SELECT STORE.STORE_ID Q4_STORE_ID, ZONE.ZONE_DESC Q4_ZONE_DESC, SERVICE_TICKET_LINE.SERVICE_COST Q4_SERVICE_COST, SERVICE_TICKET_LINE.TICKET_ID Q4_TICKET_ID, TO_CHAR(SERVICE_TICKET_LINE.WO_END_DATE, 'MM/DD/YYYY') Q4_WO_END_DATE, 'Excellent' Q4_QUALITY_RATING_1, 'Satisfactory' Q4_QUALITY_RATING_2, 'Unsatisfactory' Q4_QUALITY_RATING_3
                   FROM SERVICE_TICKET_LINE, SERVICE_TICKET, STORE, SERVICE_TYPE, ZONE, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = SERVICE_TICKET_LINE.SOURCE_ID AND SERVICE_TICKET.TICKET_ID = SERVICE_TICKET_LINE.TICKET_ID)
                   AND (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = SERVICE_TYPE.SOURCE_ID AND SERVICE_TICKET_LINE.SERVICE_TYPE_ID = SERVICE_TYPE.TYPE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = ZONE.SOURCE_ID AND SERVICE_TICKET_LINE.ZONE_ID = ZONE.ZONE_ID)
                   AND SERVICE_TYPE.TYPE_DESC = 'ABC'
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND STORE.STORE_ID = :Q1_STORE_ID
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4'
                   ORDER BY SERVICE_TICKET_LINE.SOURCE_ID, SERVICE_TICKET_LINE.TICKET_ID, SERVICE_TICKET_LINE.LINE_ID]]>
    </sqlStatement>
    <sqlStatement name="SERVC_TYPE_2">
    <![CDATA[SELECT STORE.STORE_ID Q5_STORE_ID, ZONE.ZONE_DESC Q5_ZONE_DESC, SERVICE_TICKET_LINE.SERVICE_COST Q5_SERVICE_COST, SERVICE_TICKET_LINE.TICKET_ID Q5_TICKET_ID, TO_CHAR(SERVICE_TICKET_LINE.WO_END_DATE, 'MM/DD/YYYY') Q5_WO_END_DATE, 'Excellent' Q5_QUALITY_RATING_1, 'Satisfactory' Q5_QUALITY_RATING_2, 'Unsatisfactory' Q5_QUALITY_RATING_3
                   FROM SERVICE_TICKET_LINE, SERVICE_TICKET, STORE, SERVICE_TYPE, ZONE, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = SERVICE_TICKET_LINE.SOURCE_ID AND SERVICE_TICKET.TICKET_ID = SERVICE_TICKET_LINE.TICKET_ID)
                   AND (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = SERVICE_TYPE.SOURCE_ID AND SERVICE_TICKET_LINE.SERVICE_TYPE_ID = SERVICE_TYPE.TYPE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = ZONE.SOURCE_ID AND SERVICE_TICKET_LINE.ZONE_ID = ZONE.ZONE_ID)
                   AND SERVICE_TYPE.TYPE_DESC = 'XYZ'
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND STORE.STORE_ID = :Q1_STORE_ID
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4'
                   ORDER BY SERVICE_TICKET_LINE.SOURCE_ID, SERVICE_TICKET_LINE.TICKET_ID, SERVICE_TICKET_LINE.LINE_ID]]>
    </sqlStatement>
    <sqlStatement name="SERVC_TYPE_3">
    <![CDATA[SELECT STORE.STORE_ID Q6_STORE_ID, ZONE.ZONE_DESC Q6_ZONE_DESC, 'Excellent' Q6_QUALITY_RATING_1, 'Satisfactory' Q6_QUALITY_RATING_2, 'Unsatisfactory' Q6_QUALITY_RATING_3, 'One' Q6_QTY_MISSING_1, 'Two' Q6_QTY_MISSING_2, '3 or More' Q6_QTY_MISSING_3
                   FROM SERVICE_TICKET_LINE, SERVICE_TICKET, STORE, SERVICE_TYPE, ZONE, PERIOD PERIOD_FROM, PERIOD PERIOD_TO
                   WHERE (SERVICE_TICKET.SOURCE_ID = SERVICE_TICKET_LINE.SOURCE_ID AND SERVICE_TICKET.TICKET_ID = SERVICE_TICKET_LINE.TICKET_ID)
                   AND (SERVICE_TICKET.SOURCE_ID = STORE.SOURCE_ID AND SERVICE_TICKET.STORE_ID = STORE.STORE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = SERVICE_TYPE.SOURCE_ID AND SERVICE_TICKET_LINE.SERVICE_TYPE_ID = SERVICE_TYPE.TYPE_ID)
                   AND (SERVICE_TICKET_LINE.SOURCE_ID = ZONE.SOURCE_ID AND SERVICE_TICKET_LINE.ZONE_ID = ZONE.ZONE_ID)
                   AND SERVICE_TYPE.TYPE_DESC = 'PQR'
                   AND SERVICE_TICKET.START_DATE BETWEEN PERIOD_FROM.START_DATE AND PERIOD_TO.END_DATE
                   AND STORE.STORE_ID = :Q1_STORE_ID
                   AND PERIOD_FROM.PERIOD_DESC = 'Cal Week 1'
                   AND PERIOD_TO.PERIOD_DESC = 'Cal Week 4'
                   ORDER BY SERVICE_TYPE.TYPE_ID]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
         <group name="G_STORE_VENDOR" source="STORE_VENDOR">
              <element name="Q1_STORE_ID" value="Q1_STORE_ID"/>
              <element name="Q1_VENDOR_ID" value="Q1_VENDOR_ID"/>
              <element name="Q1_VENDOR_DESC" value="Q1_VENDOR_DESC"/>
              <element name="Q1_NAME" value="Q1_NAME"/>
         </group>     
         <group name="G_WO" source="WO">
              <element name="Q3_NIGHTLY_CLEANING" value="Q3_NIGHTLY_CLEANING"/>
              <element name="Q3_DESCRIPTION" value="Q3_DESCRIPTION"/>
              <element name="Q3_TICKET_ID" value="Q3_TICKET_ID"/>
              <element name="Q3_END_DATE" value="Q3_END_DATE"/>
              <element name="Q3_QUALITY_RATING_1" value="Q3_QUALITY_RATING_1"/>
              <element name="Q3_QUALITY_RATING_2" value="Q3_QUALITY_RATING_2"/>
              <element name="Q3_QUALITY_RATING_3" value="Q3_QUALITY_RATING_3"/>
         </group>     
         <group name="G_SERVC_TYPE_1" source="SERVC_TYPE_1">
              <element name="Q4_ZONE_DESC" value="Q4_ZONE_DESC"/>
              <element name="Q4_SERVICE_COST" value="Q4_SERVICE_COST"/>
              <element name="Q4_TICKET_ID" value="Q4_TICKET_ID"/>
              <element name="Q4_WO_END_DATE" value="Q4_WO_END_DATE"/>
              <element name="Q4_QUALITY_RATING_1" value="Q4_QUALITY_RATING_1"/>
              <element name="Q4_QUALITY_RATING_2" value="Q4_QUALITY_RATING_2"/>
              <element name="Q4_QUALITY_RATING_3" value="Q4_QUALITY_RATING_3"/>
         </group>     
         <group name="G_SERVC_TYPE_2" source="SERVC_TYPE_2">
              <element name="Q5_ZONE_DESC" value="Q5_ZONE_DESC"/>
              <element name="Q5_SERVICE_COST" value="Q5_SERVICE_COST"/>
              <element name="Q5_TICKET_ID" value="Q5_TICKET_ID"/>
              <element name="Q5_WO_END_DATE" value="Q5_WO_END_DATE"/>
              <element name="Q5_QUALITY_RATING_1" value="Q5_QUALITY_RATING_1"/>
              <element name="Q5_QUALITY_RATING_2" value="Q5_QUALITY_RATING_2"/>
              <element name="Q5_QUALITY_RATING_3" value="Q5_QUALITY_RATING_3"/>
         </group>     
         <group name="G_SERVC_TYPE_3" source="SERVC_TYPE_3">
              <element name="Q6_ZONE_DESC" value="Q6_ZONE_DESC"/>
              <element name="Q6_QUALITY_RATING_1" value="Q6_QUALITY_RATING_1"/>
              <element name="Q6_QUALITY_RATING_2" value="Q6_QUALITY_RATING_2"/>
              <element name="Q6_QUALITY_RATING_3" value="Q6_QUALITY_RATING_3"/>
              <element name="Q6_QTY_MISSING_1" value="Q6_QTY_MISSING_1"/>
              <element name="Q6_QTY_MISSING_2" value="Q6_QTY_MISSING_2"/>
              <element name="Q6_QTY_MISSING_3" value="Q6_QTY_MISSING_3"/>
         </group>
    </dataStructure>
    </dataTemplate>

    Hello user6428199,
    When you use ":Q1_STORE_ID" in your queries, BI Publisher looks for a report parameter named Q1_STORE_ID. Change all your report queries to get data for all the store_id's available. As you are bursting the report using the store_id as the bursting key, BI Publisher will split the report based on the stored_id and delivers content based on it. No matter how many queries you may have, BI Publisher will loop through all the store_id's available and all the queries will return data for that particular id in a report.
    Thanks,
    Machaan

  • Group by Left Report for Multiple Queries

    Afternoon folks,
    I have been pretty much writing my queries in Oracle Reports by having one long query (which includes multiple sub-queries) and then displaying the results (Mainly Counts and MEDIAN values).
    This has resulted in one very long query (difficult to manage and understand), not to mention slower performance. I would like to change that my making smaller queries and use data links to join the groups.
    Here is my Report request in hand. I need to build a Report that will be grouped by a Reporting Year and stratified by Age Groups and then Report various Counts of Students that are
    coming from various data sources (Tables). As of now, I have the Counts coming from at least 3 different data sources. So as you can imagine, my 3 sub queries have added to one
    very long query. Anymore requirements to the Report and it can lead to a big mess.
    Column '# of Students Enrolled' is coming from ENROLLMENT_TB table
    Columns '# of Students who took Math' and 'Marks > 60' are coming from COURSE_MATH table.
    Birth Date information is in the STUDENT_TB table (Since the Report needs to be stratified by Age Groups)
    Report Layout
    Reporting Year    Age Group         # of Students Enrolled   # of Students who took Math       Marks > 60   Median Score
    ========================================================================================================================
    2010              1960 - 1969                          999                           999              999            999                 
                      1970 - 1979                          999                           999              999            999                 
                      1980 - 1989                          999                           999              999            999                 
                      1990+                                999                           999              999            999                 
    2011              1960 - 1969                          999                           999              999            999                 
                      1970 - 1979                          999                           999              999            999                 
                      1980 - 1989                          999                           999              999            999                 
                      1990+                                999                           999              999            999                 
    2012              1960 - 1969                          999                           999              999            999                 
                      1970 - 1979                          999                           999              999            999                 
                      1980 - 1989                          999                           999              999            999                 
                      1990+                                999                           999              999            999                  Currently, I have 3 sub-queries
    Sub Query #1: # of Students Enrolled from ENROLLMENT_TB.
    Sub Query #2: # of the Enrolled Students who took Math from COURSE_MATH_TB
    Sub Query #3: # of the Enrolled Students who took Math from COURSE_MATH_TB and got Marks > 60. Median Score of this sampling.
    My thought would be to have them into Groups and then create a Report a s a Group Left to achieve the results. Any help or suggestions would be more than welcome.
    I have begun working on this Report but it is still taking quite long (Like 4 minutes) when the individual Queries (Q_COURSE_MATH and Q_COURSE_MATCH_60) are only taking 20 seconds each.
    My guess is the Grouping based on the age group is resulting in slower performance but I could be wrong.
    Also, the Query runs between pages and takes a long time to run. So, when I actually ran the Report, only the first page was formatted and then subsequent pages follow.
    Looking at the data model, is there something conceptually wrong?
    I have also not included the Query for Enrollment Counts to keep the Report simple.
    Data Links:
    Q_REPORTING_YEAR and Q_COURSE_MATH (Join condition: reporting_year and age_range_order_id)
    Q_REPORTING_YEAR and Q_COURSE_MATH_60 (Join condition: reporting_year and age_range_order_id)
    Data Layout:
    Q_REPORTING_YEAR
    select yrs.reporting_year,
           age_range.age_range_label,
           age_range.age_range_order_id
    from
      select to_char(Add_Months(To_Date ('01-JAN-2009', 'DD-MON-YYYY'), 12 * LEVEL), 'YYYY')   reporting_year
      from    DUAL
      CONNECT BY LEVEL < 4
    ) yrs,
      select decode( rownum, 10, '1990+', to_char(1900+ (rownum-1)*10)||'-'|| to_char(1900+ (rownum)*10-1))   age_range_label,
                 to_char(1900+ (rownum - 1)*10)                                                               age_start,
                 to_char(decode(rownum, 10, to_char(sysdate, 'yyyy'), 1900+ (rownum)*10-1))                   age_stop,
                 rownum                                                                                       age_range_order_id
      from    dual
      connect by rownum < 11
    ) age_range
    order by yrs.reporting_year, age_range.age_range_order_id
    Q_COURSE_MATH
    select reporting_year              cm_reporting_year,
           age_range_label             cm_age_range_label,
           age_range_order_id          cm_age_range_order_id,
           COUNT(distinct(student_id)) cm_student_count
    from
      select distinct cm.student_id                     student_id,
             to_char(cm.course_date, 'YYYY')           reporting_year,
             age_range.age_range_label        age_range_label,
             age_range.age_range_order_id   age_range_order_id
      from   course_math    cm,
             student_tb s,
               select decode( rownum, 10, '1990+', to_char(1900+ (rownum-1)*10)||'-'|| to_char(1900+ (rownum)*10-1))   age_range_label,
                          to_char(1900+ (rownum - 1)*10)                                                               age_start,
                          to_char(decode(rownum, 10, to_char(sysdate, 'yyyy'), 1900+ (rownum)*10-1))                   age_stop,
                          rownum                                                                                       age_range_order_id
               from    dual
               connect by rownum < 11
              ) age_range
        where  cm.student_id = s.student_id
        and exists ( select 'x' from sampling_student_vw w
                         where  w.student_id = cm.student_id )
        and     to_char(s.birth_date, 'YYYY') between age_range.age_start and age_range.age_stop
    ) q
    GROUP BY q.reporting_year, q.age_range_label, q.age_range_order_id
    Q_COURSE_MATH_60
    select reporting_year              cm_reporting_year,
           age_range_label             cm_age_range_label,
           age_range_order_id          cm_age_range_order_id,
           COUNT(distinct(student_id)) cm_student_count,
           MEDIAN(marks)                cm_median_60
    from
      select distinct cm.student_id                     student_id,
             to_char(cm.course_date, 'YYYY')           reporting_year,
             cm.marks                                  marks,
             age_range.age_range_label        age_range_label,
             age_range.age_range_order_id   age_range_order_id
      from   course_math    cm,
             student_tb s,
               select decode( rownum, 10, '1990+', to_char(1900+ (rownum-1)*10)||'-'|| to_char(1900+ (rownum)*10-1))   age_range_label,
                          to_char(1900+ (rownum - 1)*10)                                                               age_start,
                          to_char(decode(rownum, 10, to_char(sysdate, 'yyyy'), 1900+ (rownum)*10-1))                   age_stop,
                          rownum                                                                                       age_range_order_id
               from    dual
               connect by rownum < 11
              ) age_range
        where  cm.student_id = s.student_id
        and      cm.marks >= 60
        and exists ( select 'x' from sampling_student_vw w
                         where  w.student_id = cm.student_id )
        and     to_char(s.birth_date, 'YYYY') between age_range.age_start and age_range.age_stop
    ) q
    GROUP BY q.reporting_year, q.age_range_label, q.age_range_order_id

    Hi Arsalan,
    "Group by" is not a valid calculation option for calculated fields in the database object, nor is it for the calculation fields in your report.
    I believe that what you are trying to achieve is to have a SUM of all the sales done, grouped by Brand. This is typically something you configure while building your report(in Active Studio).
    If you for example would only want to show 2 out of 5 Brands in your report I suggest you use a filter(which is configured while building your report as well).
    For all calculation and operation options in calculated fields you can go to the Help section of BAM and search for "Calculation Operators and Expressions".
    I hope I helped you solve your problem.
    Kind regards,
    Martijn van der Kamp

  • How do I setup multiple users to use one source but manage playlists separately?  For example, play counts are specific to each user.

    How do I setup multiple users to use one source but manage playlists separately?  For example, play counts are specific to each user.

    Hi,
    Thank you for posting in Windows Server Forum.
    Here adding to the words of “Tim”, a forwarder is a DNS server on a network used to forward DNS queries for external DNS names to DNS servers outside of that network. You can also forward queries according to specific domain names using conditional forwarders.
    A DNS server on a network is designated as a forwarder by having the other DNS servers in the network forward the queries they cannot resolve locally to that DNS server. You can refer information regarding forwarders and how to configure from beneath link.
    Understanding forwarders
    http://technet.microsoft.com/en-us/library/cc782142(v=ws.10).aspx
    Configure a DNS Server to Use Forwarders
    http://technet.microsoft.com/en-us/library/cc754941.aspx
    Hope it helps!
    Regards.

  • Report with Multiple queries too slow in BI Publisher 11g

    Hi, I have a report in 11g where i need to create multiple queries to show them in report. I tried to combine everything in one query, but i found that the query is too huge and hard to understand and maintain. I created 3 data sets and linked them together. In SQL dev, the main query is returning about 315 records and first detail query returns less than 100 records and second detail query is returning one record which is BLOB. Each query returns data within a couple of seconds from SQL Developer. The entire report from BI Publisher should be just 21 page PDF output. Did anyone face performance issues while running reports with multiple queries in 11g? I ran reports that have single query which returned 10K pages PDF and never had an issue while everthing is in one query. This is the first time Iam attempting to create multiple queries. Can someone help me understand what i might be doing wrong or missing here. Thank you.

    Isn't there a way for you to do this via a Package/Procedure versus having multiple queries?
    Per the BI Publisher guide,
    Following are recommended guidelines for building data models:
    Reduce the number of data sets or queries in your data model as much as possible. In general, the fewer data sets and queries you have, the faster your data model will run. While multiquery data models are often easier to understand, single-query data models tend to execute more quickly. It is important to understand that in parent-child queries, for every parent, the child query is executed.
    You should only use multiquery data models in the following scenarios:
    To perform functions that the query type, such as a SQL query, does not support directly.
    To support complex views (for example, distributed queries or GROUP BY queries).
    To simulate a view when you do not have or want to use a view.
    Thanks,
    Bipuser

  • BI+ Reporting With Multiple Data Sources

    Hi -
    We've been using BI+ Reports with multiple data sources on separate grids. We are wondering if there is a better way to ensure the user has their point of view bar in sync between the the data sources. In our case, both Data Sources are separate HFM applications with all the dimensions identical except the account which is defined on the report. We are not using Metadata Management.
    I'm aware of the "Merge Equivalent Prompts" in the Preferences > Financial Reporting window, but this does not always ensure the users have the same point of view.
    What practice are other companies using to make sure the user runs the reports accurately with both point of view bars pulling the same entity/year/period.
    Thanks in advance.

    Thanks for your answer, however my question - I know it looks quite messy - is not directly related to data templates, my problem is that at the moment I am using a stored procedure following - almost exactly - what another procedure does in oracle EBS to call a BI publisher report.
    1. This procedure populates some temporary table with the xml data where the concurrent request picks it up and uses it to populate the BI publisher template.
    2. However I can't go and specify the XML location in my data template as this is not an option for us (i.e. reading the xml from the temporary table), so I am looking for another way to populate the BI publisher template (Note: I can't as well include the SQL queries in my Data template).
    Thanks ;)

  • How to mass print a report with multiple queries?

    Dear All,
    i want to precalclate a report (which includes 4 queries) to pdf for printing. Because i have to print it for all profitcenter (~200), i want to use the filter navigation.
    Because this isn't possible for reports, i inserted my report using a report item to a web template.
    When i call the web template direct, everything works fine, but if i precalculate the web template using the bex broadcaster, only one query is parameterized. The second one seems to use the global variant (the sum of all profitcenter).
    Any Idea? Do i have to change an export web template and add some data provider? I am not absolutely sure which is the right export template for an report in a web template...
    Thanks in advance,
    Thomas

    Hey all,
    nobody an idea of a possible approach.
    Greetz,
    Thomas

  • SQL Command returns multiple records, but I see only one record in report

    I work with Crystal Reports XI R2 SP3 and Oracle 10g R2 database.
    I have an SQL Command that returns multiple records. Command name is "CommDivisionNames" and it returns column "CommDivisionNames.DIVISION_NAME". When I place this field into report details section of the report, I can see all 10 records returned and this is how it should be. I actually need this field to be placed in the report header section, and when I place the field there, then I see only the first record. I set that field as "can grow = true". When I do "browse field data" for this field, I see that all 10 records are there, but only the first one is displayed in report header section.
    I thought that I can place SQL Command field anywhere on the report (page header, footer, details) and that it will always show all records that it returns from the database. Can that be done?
    My "main part" of the report returns different set of records, and that's what I have in "report details" section. I need this list of divisions to be in the report header section, so user can see that the report was executed for DivA, DivC, DivE.
    Thank you,
    Milan

    sharonamt:
    Users select divisions from parameter, but the parameter multi values are division_numbers (1,5,10), not division_names. Division_names are visible in parameter_prompt_window as description, but parameter remembers only numbers and I don't know how I can reuse division_names later in formula.
    I do join for division_numbers and make them into one string variable and pass to sub-report, but I think that I can only get these division_names by calling an SQL command or calling stored procedure.
    If I try to do join({MySQLcommand.DIVISION_NAME}) I get error message "A string array is required here".
    Carl:
    I'm playing with cross-tab and I can use it to see all division_names in the report-header section. Since I need them in only one column or only one row, I have to edit cross-tab object and turn all unneeded border lines to white to make them look invisible. So, cross-tab could be a solution for my problem here.
    Another option could be to re-write my SQL command. Since I've read here that SQL command could be written in the same way as I would write a stored procedure, then I could use a bit more complex code to get all multiple division names from the database table into a local cursor, and then use do-while loop to concatenate them into one string, and then to return that string as one record (like 'DivA, DivB, DivC'), and then it should not be a problem to display only that one record/string in report header. It is my understanding that Crystal Reports can call stored procedure that works with many cursors/recordsets and CR will use only the last recordset from the stored procedure. Do you think it could be done this way?
    Thank you,
    Milan

  • Generating multiple target xmls from one source xml using xslt mappings

    Hi,
    I need to create more than one xml file from one source xml file using xslt mappings in file to file scenario.
    Can you please let me know how this can be achieved.
    Thanks,
    Rajesh

    Rajesh,
    If you must use the XSL Transformation then you can find a nice simple example here.  It's based on the Xalan XSLT Processor which to my knowledge is incorporated in PI7.1.  I've not actually tried this but it makes for an interesting mapping case so please let us know the results: 
    [XSLT Split for multiple XML file output|http://abbeyworkshop.com/howto/xslt/xslt_split/index.html]
    The XSL file will require a namespace addition:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:redirect="http://xml.apache.org/xalan/redirect" extension-element-prefixes="redirect" version="1.0">
    The redirect prefix is used for the write tags in the XSL file.
    The details cover the transformation of the source file:
    1:<student_list>
       2:    <student id="1">
       3:        <name>George Washington</name>
       4:        <major>Politics</major>
       5:        <phone>312-123-4567</phone>
       6:        <email>gw_at_example.edu</email>
       7:    </student>
       8:    <student id="2">
       9:        <name>Janet Jones</name>
      10:        <major>Undeclared</major>
      11:        <phone>311-122-2233</phone>
      12:        <email>janetj_at_example.edu</email>
      13:    </student>
      14:    <student id="3">
      15:        <name>Joe Taylor</name>
      16:        <major>Engineering</major>
      17:        <phone>211-111-2333</phone>
      18:        <email>joe_at_example.edu</email>
      19:    </student>
      20:</student_list>
    Using this transformation:
    2:<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    3:    xmlns:redirect="http://xml.apache.org/xalan/redirect"
    4:    extension-element-prefixes="redirect"
    5:    version="1.0"
    6:>
    7:<xsl:output method="xml"/>
    8:
    9:<xsl:template match="/">
    10:    <xsl:apply-templates />
    11:</xsl:template>
    12:
    13:<xsl:template match="student_list">
    14:    <xsl:apply-templates />
    15:</xsl:template>
    16:
    17:<xsl:template match="student">
    18:    <xsl:variable name="filename" select="concat(@id,'.xml')" />
    19:    <redirect:write select="$filename">
    20:        <student id="{@id}">
    21:            <xsl:apply-templates />
    22:        </student>
    23:    </redirect:write>
    24:</xsl:template>
    25:
    26:<xsl:template match="name | major | phone | email">
    27:    <xsl:copy-of select="." />
    28:</xsl:template>
    29:
    30:</xsl:stylesheet>

Maybe you are looking for