Display Crosstab query in DataGrid

Hi, I'm a Flex beginner. Could someone please help me how to
display crosstab query result in DataGrid? The following query
returns 6 columns:
- First column: values in the field Sell_Channel
- Second: Sum(Revenue Total) from the Revenue field.
- Others: Revenue Subtotal by Sell_Channel and quarter.
Quarters are values stored in the field name Quarter. In Datagrid,
what would be the datafield for these 4 quarter columns?
Thanks millions.
Here is my SQL:
TRANSFORM Sum(Revenue.RevenueTotal) AS SumOfRevenueTotal
SELECT Revenue.Sell_Channel, Sum(Revenue.RevenueTotal) AS
[Total Of RevenueTotal]
FROM Quarter INNER JOIN Revenue ON Quarter.FiscalQuarter =
Revenue.Quarter
WHERE (Revenue.Fiscal_Year="2006")
GROUP BY Revenue.Sell_Channel
PIVOT Quarter.Quarter;

Crosstab is a reporting function not a SQL one. SQL statements must have a fixed number of columns regardless of the data.
The only way to do it using SQL is to use PL/SQL to generate a dynamic query as shown on Ask Tom here
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:15151874723724
Otherwise there are reporting tools such as Oracle Reports that can do it as well.

Similar Messages

  • Data not getting displayed in query

    Hi
    I have master infoobject with keyfigure units as percentage, and data is loaded and working fine.
    data is not getting displayed in query, i am getting the error message, that exception aggregation has to be maintained for 0calday.
    how do i resolve the issue
    Regards

    solved

  • Crosstab Query in Oracle

    Dear members:
    I have been trying to generate a crosstab query in Oracle using SQL.
    This is the situation:
    I have two tables in Oracle. One contains characteristics of institutions which people visit, and includes, amongst other fields, the ID of the institution (number) and an identificator for the district where the institution is implanted (number; ranging 1 - 18).
    The second table also contains a field with the ID of the institution, and more: the date when the visit occured (date), and a sequential (unique) number for each visit.
    What I need to obtain is a final table containing the following fields:
    Date of the visit, total number of visitors per date of visit, and a field for each district containing the total number of visitors to instituitions of the district per each date of visit.
    Can anyone give me a hint on this?
    Also; is there a user-frindly interface minimizing the use of SQL that I can download from Oracle for generating this?
    Thank You
    André

    Crosstab is a reporting function not a SQL one. SQL statements must have a fixed number of columns regardless of the data.
    The only way to do it using SQL is to use PL/SQL to generate a dynamic query as shown on Ask Tom here
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:15151874723724
    Otherwise there are reporting tools such as Oracle Reports that can do it as well.

  • Infoobject in infoset but not displaying in query designer

    Hi,
    I have created a query on infoset(ods1 & ods2).
    a custum defined infoobject (fiscyr) is not displaying in query designer while it is present in infoset.
    pls give your inputs,for why this infoobject is not available in query designer.
    Thanks
    Radika

    Hi Radika,
    I cannot think of anything other than the solutions already mentioned in this thread (checking the IOBJ in infoset, running RSISET and activating it). I just had a foolish idea that you might not be looking for the right IOBJ. All the IOBJs from an infoset are not displayed with their original technical names in the query designer. They are disdplayed in the format: <infoset_technical_name>_FXXXXX where XXXXX is a number.
    Also try one more thing. Go to transaction RSISET and type in the technical name of the infoset there.
    Right below the box where you type the Infoset name is a check button. Check your Infoset there and then activate it from within the RSISET transaction (the activate button is right after the check button). With Infosets, sometimes just activating it from within RSA1 does not work but RSISET always seems to work.
    Do this and see if it helps.
    Thanks & regards,
    Nikhil

  • How to display the query results in several pages?.

    Hi,
    i want to display the query results in several pages. for example my query result found 50 matches, now i want to print 20 per pages next 20 will be in next pages. iam using only jsp & mysql.
    Regards
    Chinna

    Hi, what you are trying accomplish is known as pagination.
    You could use JSTL tags with Custom Tags to perform pagination in your JSP pages.
    evnafets showed me DisplayTags , you could use those as well http://displaytag.sourceforge.net/11/tut_externalSortAndPage.html
    Here is one article on paging:
    http://www.javaworld.com/javaworld/jw-07-2004/jw-0726-pagination.html

  • Format Column Header in Crosstab Query in Crystal Reports for Enterprise

    Hi
    I am using Crystal reports for Enterprise and I would like to format the Column header of a crosstab query one block of colour say light blue.  However I cannot select the header in isolation to the rest of the cross tab.  All I can select is either column text boxes, which doesnu2019t look good formatted as a different colour to the background of the crosstab.  Or I can only select either entire column or the entire row, which kind of defeats the object of formatting just the column header itself.  Is there a way to isolate the column headers so I can format just the header, as the report is looking extremely bland all in white?
    Many Thanks in advance
    Regards
    Neil

    Alright, here's what you need to do:
    1) RIght-click one of the Column Headers and select 'Format Result Object Element' > Appearance > click on the formula button (fx) beside 'Fill' and use this code:
    if currentrowindex < 0 then crBlue
    You wanted light blue right? So, the rgb value for light blue or sky blue would be 135-206-250. So, you can change the color by modifying the formula like this:
    if currentrowindex < 0 then color(135,206,250)
    If this is not the exact blue you're after, just google!
    Hope this helps!
    -Abhilash

  • Custom column in Crosstab query in BO 6.5

    Hello Gurus,
    I am trying to create a report in BO 6.5 using data from two flat files by linking them and I applied cross-tab template as I need row data as columns based on a field called STATUS (Approved, Cancelled, In process etc). And in this STATUS field I want to add another column (Not Ordered) on the run using some conditions which is not in the flatfile. How can I do that?
    Please let me know if my post in unclear so that I can provide more data regarding the report.
    Thanks in advance for your time.

    Let me elaborate my requirement. I am trying to create a report using data from two flat files. I am supposed to give the status of orders. So I created crosstab query and I chose STATUS field data to be as columns. Currently it have three fields----Approved, In process, Waiting for approval. Now as per requirement I am supposed to include another column called Not applicable based on two fields Amount and Local/No local. Before this we used to create the same report uising excel and I used below formula:
    =IF(AND(Amount=0,B2="Non-Local"),"Not Applicable","Approved")
    But in BO if the above condition is False I want that particular record to fall under already existing "Approved" but it is creating another "Approved" status and it is not catagorizing Not applicable....I mean every record with amount =0 falls under new Approved status but not in Not applicable as expected. Hope you understand my issue.
    Am i doing anything wrong in creating formula?

  • Display the query result in an Excel file??

    hi there..
    am writing one script file that queries my DB and display the query result in an Excel file??
    i.e: if my query is :
    select col1, col2
    from table;
    and i want the results to dispalys in 2 col. in an Excel spreadsheet..
    Appreaciating ur cooperation..
    Mourad

    set colsep to a delimiter that is not normally part of your data like |
    also setup the environment with these other setup commands
    Set Echo Off;
    Set Concat Off;
    Set Pagesize 9999;
    Set Feedback Off;
    Set Verify Off;
    Set Term Off;
    Set Space 0;
    Set Colsep '|'
    Set Underline Off;
    If you wanted to use a comma delimiter the setup would be same but the set colsep='","'
    with the addition of concatenating a " on the first col and last col of the query
    eg.
    -- if first col and last_col are character types then
    SELECT '"'||col1,....,last_col||'"'
    FROM table;
    Otherwise if either is a number they would have to be converted with a TO_CHAR

  • Large number of attributes reduces data display in Query (PLS HELP).

    Dear Guru's
    We have newly upgraded our system to 7.0, Currently i have a Query based on master data info object(0 equipment) which contain several attributes, due to huge number of attributes, i cannot see data for few  attributes( Ex:-0service descrip), but data exists for these atrrib, when i check in RSA1. my client want to use heavy number of 0Euipment numbers(nearly 10000) in selection screen. thats the reason for data not to be seen.
    WE are under SP 16 also(Note 562162 - Additional selection of attribute reduces query result set is allready exists), and did not found any proper note.
    So guru's can any one please tell me how i can get the data in Query for these attribute by keeping the same selection option for Equipment numbers (10000).
    Dude's give me some good suggestion please...client is waiting from 1 week
    Thanks in adv
    Dev
    Edited by: Srinivas dev on Jun 10, 2008 11:52 AM

    Dear Yogesh,
    Thanks a lot dude...
    I assigned points for your kindly help....
    Got any idea about by initial post   Large number of attributes reduces data display in Query
    Thanks and Regards
    Dev

  • Use for a Crosstab Query?

    I have a table with the following metric data in it.
    one entry for a metric, whether its integrity was checked and the date checked.
    I need a report that puts all monthly activity on a single line.
    Examples:
    Here's what the table looks like
    proj_name metric integrity_checked Date
    abc broke Y 01-Apr-08
    abc fixed Y 01-Apr-08
    abc trashed Y 01-Apr-08     
    abc broke Y 01-Mar-08
    abc fixed Y 01-Mar-08
    abc trashed Y 01-Mar-08
    xyz broke Y 01-Apr-08
    yxz fixed Y 01-Apr-08
    yxz trashed Y 01-Apr-08     
    yxz broke Y 01-Mar-08
    yxz fixed Y 01-Mar-08
    yxz trashed Y 01-Mar-08
    Report needs to look like this.
    Prog Metric Apr-08 Mar-08
    abc broke Y Y
    abc fixed Y Y
    abc trashed Y Y
    xyx broke Y Y
    xyz fixed Y Y
    xyz trashed Y Y
    Does this call for a crosstab-type query and if so
    how would I code it?
    I've done one crosstab query before but can't get this one to come out right.
    Thanks
    David

    See this link
    http://www.myoracleguide.com/s/Pivot_Tables.htm

  • Crosstab Query for Remaining Revenue (Count, If, Date Between )

    Hi all, hope you had a great new year.
    I am wanting to create a crosstab query for my Projects which shows ProjectID in the row headers and Time Periods split into months quarter or year as the Column Headers using the [DateAgreed] from the Session table. 
    I have created crosstabs which show revenue from sessions and count of sessions with different time periods but i am trying to make it so that it counts only completed sessions from before the column date, so that i can then multiply by the [SessionCost].
    Any ideas guys?
    Here's what i have been working with;
    TRANSFORM Sum(([tblSession]![SessionCompleted]*[tblProject]![SessionCost])) AS Revenue
    SELECT tblProject.ProjectID, tblCompany.CompanyName
    FROM (tblSession INNER JOIN tblCompany ON tblSession.CompanyID = tblCompany.CompanyID) INNER JOIN ((tblProject INNER JOIN tblProjectMetrics ON tblProject.ProjectID = tblProjectMetrics.ProjectID) INNER JOIN qryProjectStatus ON tblProject.ProjectID = qryProjectStatus.ProjectID)
    ON (tblProject.ProjectID = tblSession.ProjectID) AND (tblCompany.CompanyID = tblProject.CompanyID)
    GROUP BY tblProject.ProjectID, tblCompany.CompanyName, tblProject.Total
    PIVOT Format([DateAgreed],"yyyy-mm");
    Thanks :)

    Hi Gord0oo,
    You could concatenates the data as a result and show in a cell.
    TRANSFORM Sum([tblProject]![SessionCost])) & ";" & Sum([tblSession]![SessionCompleted]) AS Revenue
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Display Bex Query in Web

    Hi,
    I want to display the Bex query directly in web.What are the possible ways that i can do, for the user to view the report in the web.Can anyone tell me how to configure RRMX in this case or how to do the settings for user to navigate from user menu to the required BW report directly from the SAP work bench.?I have tried linking from User Menu where the java servlets blocking the navigation.? Do i need to follow any configuration for this too?
    Thank You,
    Edited by: sunanda G on Feb 28, 2011 9:59 AM

    Hi,
    There are multiple ways to display the query in Web:
    ->Web Analyzer: In the query designer you need to click on the web symbol it will take you to run the query in web in the explorer. For this your server need to be setup contact your basis team for the same.
    ->WAD: After creating a query, you can display the same using Web application designer. Here you need to check the Java Settings to be installed.
    ->EP: You can copy the link generated from the query can be copied and displayed in the Enterprise portal.
    There is a search option available in the SDN , you can search for more information regarding the same.
    Hope this helps...
    Rgs,
    Ravikanth

  • Data Entry - Crosstab Query

    Is it possible to do perform data entry in a crosstab query view?

    If you want to insert, update or delete in a view you need to write ON-INSERT, ON-UPDATE and/or ON-DELETE trigger and perform your DML inside these triggers ...
    Hope it helps
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JAMIE MCPHIE ([email protected]):
    Is it possible to do perform data entry in a crosstab query view?<HR></BLOCKQUOTE>
    null

  • Date should be displayed on query execution

    hello all
    when v execute a query date should display when query is executed.like if i execute query on 01/06/2006 this date should be displayed and when execute query on 01/02/2006 this date should be displayed?,like that so on?
    kindly anyone let me know how it should be done?
    how this should be done?
    many thanks

    hi Balaji,
    in bex analyzer, you can display the date with menu business explorer -> display text elements -> general, you will see some info, 'author'... 'last refreshed'.
    in web (WAD) you can use web item 'text element' and choose element type 'general text' and
    element id 'SYUZEIT'.
    element id can be used
    general text elements:
    - technical name of the query (REPTNAME)
    - description of the query (REPTXTLG)
    - InfoProvider (INFOCUBE)
    - key date for the query (SRDATE)
    - validity of the data (date and time) (ROLLUPTIME)
    - the person who wrote the query (AUTHOR)
    - the last time the query was changed (date and time) (MODTIME)
    - the last person to make changes to the query (MODUSER)
    - current user (SYUSER)
    - the last time the query was refreshed (date and time) (SYUZEIT)
    hope this helps.
    Message was edited by: A.H.P

  • Customer number is not displayed at Query

    Hi to all,
    I have created a query where i need to display the Receivables aging Report.
    when i check data at Cube level data is coming properly for Every Customer.
    but when i filter customer at Query level data is not displayed at query level.
    Please can any one provide me solution.
    i shall be thnakful to you for this.
    Regards
    Pavneet Rana

    Thanks for Reply,
    For some customer i am getting correct data, and for some customer i am not getting any data at Query level,
    although correct data exist for every customer at CUBE level.
    Regards
    Pavneet Rana

Maybe you are looking for

  • User had just run a payment run when it was cancelled

    Hi We ran a payment run on F110,  but the job cancelled because the user was set to locked by accident.    No payments have processed,  but the payment run icon shows the payment run is complete  The log in F110 shows the payment run job was cancelle

  • / and without /

    I am using web cache to connect to the web server, both are oracle product. I find the when I access the server by http://www.example.com/app1/ , it will go to the page that I want. But if I access the server by http://www.example.com/app1 (without t

  • Lost Content in Ver 11! HELP

    Hello, I just upgraded to Ver 11 (I really, really wish I hadn't!) and content is missing... read on. I store my itunes library on an external usb drive.  After 'upgrading' to 11 I am absolutely missing a bunch of content--just not sure exactly what.

  • Questions about database pooling....

    Hi everyone, I'm not new to java programming but I am looking to polish up my skills. I have read sooo many articles and am still confused so please be patient with me. Java has a way of adding new acronyms everytime I turn around - its very hard to

  • Oracle 9.2 and memory leak detection

    Hi All. I have found the following error in trace file after shutdown database. ================================================================= /.../udump/cpaw_ora_4427.trc Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production With the Partiti