Query and cfchart question

I have this simple query :
SELECT top 10
  SupplierName, supplierNumber
  SUM(TOTALS) AS TOTAL
  FROM tableName
It will give me a simple output like:
company1     12345     20
company2     98881     5
company3     76512     18
What I need to do is plot the query in pie chart, with a drilldown report for each pie slice (supplier name) :
<cfchart
         format="flash"
   chartwidth="350"
   chartheight="450"
   title='"Top 10 Supplier Volume "'
         pieslicestyle="sliced"
         labelformat="number"
         show3d="yes"
   url="../reports/supplierVolumeReport.cfm?supplierName=$itemlabel$&supplierNumber=#qryBuye rVolume.supplier#">
      <cfchartSeries type="pie"
            query="queryName"
            itemcolumn="supplierName"
            valuecolumn="Total"           
            datalabelstyle="value"
            colorlist="##CE1126,##3399CC,##CC5500,##444444,##00CC33,##7C96A1,##DAD9A0">
      </cfchartseries>
      </cfchart>
Everything works fine. But when I go to the drilldown report, I cannot really search by supplierName because some companies might have the same name, but the supplier numbers are unique, so I have to search by supplier number. That is why I am passing that value also.
But when I click on pie slice for company 3, it passes the supplier name company 3, but the supplier number is always the first one, 12345, regardless of what slice I click on. I have cfoutput in the report and it shows company 3 and 12345.
How do I get the corresponding supplier number for the pie slice supplier name that I click on ? I need the corresponding supplier number so I can use it to search the query in the drilldown report.
I tried to combine the name and number in the query and have the chart display 12345 - Company 1 in the legend, but they do not want the number to display, just the name in the legend.

On your graph, pass the company name and total as a list with a delimter not likely to appear in the company name.  Like this:
supplierName=$itemlabel$¿$value$
On your drill down page, start with a query to get the supplier number.
select suppliernumber, count(*)
from yourtable
where suppliername = ListFirst(url.suppliername, "¿")
group by suppliernumber
having count(*) = ListLast(url.suppliername, "¿")

Similar Messages

  • BW Bex query and Webi question

    Hi All.
    Just a quick question on Bex queries. We are selecting a Bex query as a source for universe. However on the webi side we only want to see a subset of the data.
    1) The question is Would this rerun the entire BEX query on the BW side ? Or is there a better way to design the universe ?
    2) Also are there any best practices on how to desing Webi reports from BW BEX queries and also Infocubes etc ?
    Thanks in advance.

    Hi puneet,
    The WebI builds a query on the BEx results. The query is related only to those items used in the WebI report. However, the BEx query must have the results in it, as the WebI does not execute it. I am not aware of a best practices document.
    Regards
    Alan

  • Help in Ad-hoc query and Hr form editor

    any body have material links of Ad-hoc query(it means how the reports are generated with Ad-hoc query) and Hr form editor(with examples) plz forward it to me???????????

    Hi,
    HR Ad Hoc Query is the special version of InfoSet Query with the HR object selection.
    You can find the system documentation here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/f9/cc9138e4a0341fe10000009b38f8cf/frameset.htm
    However I doubt the use of documentation of the query generator. So what is your concrete question?
    Or in any R/3 via application help of transaction SQ01.
    Also HR580 is a good course.
    Regards,
    Michael

  • Rich Client Query Filter Pane question

    I've browsed through various forums without finding an answer to my problem. I'm frustrated and hope someone else has been there/done that and can offer a suggestion to ease my pain.
    We're using BOXI 3.0, and my question is specifically about deciphering/maintaining the contents of the query filter pane in InfoView and/or Web Intelligence Rich Client.
    We have some complicated reports with numerous optional prompts. We realize this is not optimal, but need to maintain this reports until we can replace them.
    The filter panes are very complicated, since there are so many prompts, ANDs, and ORs and nested statements.
    Is there a way to see which universe component a query filter field is connected to? In the query results pane (on top), I can click on a field and it's source is highlighted in the universe tree view on the left. That doesn't happen when you click a field in the query filter pane.
    Is there some way I've not found yet, or is this an enhancement request for BOE? Thanks in advance.

    I guess this an enhancement request for BOE because I've never seen an option like that.  And I really wish that option existed.
    The only way I could think of to solve this problem is renaming all the objects of your universe.  This way you may know what class any object is related to when using the query filter panel.
    For example: You have 3 classes in the universe: Users, Quotes, Invoices.  Rename them with a prefix, let's say:
    U-Users
    Q-Quotes
    I-Invoices
    Then all the objects belonging to Users must be renamed with the U- prefix:
    U-User name
    U-User id
    And the same applies for the other classes objects:
    Q-Quotes:
        Q-quote id
        Q-User id
         Q-Amount
    I-Invoices:
       I-Invoice id
       I-Quote id
       I-Amount
    So if in one query filter panel you have a filter using the object Quote id, you'll see if this Quote id comes from Quotes or Invoices, because of the prefix Q- or I-.
    I don't know if it is a good practice but I hope it helps.
    Regards,
    Erika Atencio Harris
    Edited by: PadawanGirl on Jan 19, 2011 10:10 PM

  • How to update this query and avoid performance issue?

    Hi, guys:
    I wonder how to update the following query to make it weekend day aware. My boss want the query to consider business days only. Below is just a portion of the query:
    select count(distinct cmv.invoicekey ) total ,'3' as type, 'VALID CALL DATE' as Category
    FROM cbwp_mv2 cmv
    where cmv.colresponse=1
    And Trunc(cmv.Invdate)  Between (Trunc(Sysdate)-1)-39 And (Trunc(Sysdate)-1)-37
    And Trunc(cmv.Whendate) Between cmv.Invdate+37 And cmv.Invdate+39the CBWP_MV2 is a materialized view to tune query. This query is written for a data warehouse application, the CBWP_MV2 will be updated every day evening. My boss wants the condition in the query to consider only business days, for example, if (Trunc(Sysdate)-1)-39 falls in weekend, I need to move the range begins from next coming business day, if (Trunc(Sysdate)-1)-37 falls in weekend, I need to move the range ends from next coming business day. but I should always keep the range within 3 business days. If there is overlap on weekend, always push to later business days.
    Question: how to implement it and avoid performance issue? I am afraid that if I use a function, it greatly reduce the performance. This view already contains more than 100K rows.
    thank you in advance!
    Sam
    Edited by: lxiscas on Dec 18, 2012 7:55 AM
    Edited by: lxiscas on Dec 18, 2012 7:56 AM

    You are already using a function, since you're using TRUNC on invdate and whendate.
    If you have indexes on those columns, then they will not be used because of the TRUNC.
    Consider omitting the TRUNC or testing with Function Based Indexes.
    Regarding business days:
    If you search this forum, you'll find lots of examples.
    Here's another 'golden oldie': http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:185012348071
    Regarding performance:
    Steps to take are explained from the links you find here: {message:id=9360003}
    Read them, they are more than worth it for now and future questions.

  • Concatenate results SQL query and CASE use Report Builder Reporting Services

    I need to concatenate the results from a SQL query that is using CASE.  The query is listed below.  I do not need permitsubtype but I need to concatenate the results from the permittype. 
    I tried deleting the permitsubtype query and it would not run correctly.  Please see the query and diagram below.  Any help is appreciated.
    select  PERMIT_NO
    ,(case when
      ISNULL(PERMITTYPE,'') = ''
      then 'Unassigned'
      else (select LTRIM(RTRIM(PERMITTYPE)))
      END) AS PERMITTYPE
    ,(case when
      ISNULL(PERMITSUBTYPE,'') = ''
      then 'Unassigned'
      else (select LTRIM(RTRIM(PERMITSUBTYPE)))
      END) AS PERMITSUBTYPE
     ,ISSUED
     ,APPLIED
     ,STATUS 
     ,SITE_ADDR 
     ,SITE_APN
     ,SITE_SUBDIVISION
     ,OWNER_NAME
     ,CONTRACTOR_NAME
     ,ISNULL(JOBVALUE,0) AS JOBVALUE
     ,FEES_CHARGED
     ,FEES_PAID
    ,BLDG_SF
    from Permit_Main
    where ISSUED between @FromDate and @ToDate

    Hi KittyCat101,
    As per my understanding, you used case when statement in the query, you do not need to display permitsubtype in the report, but when you tried to delete permitsubtype from the query, it could not run correctly. In order to improve the efficiency of troubleshooting,
    I need to ask several questions:
    “I tried deleting the permitsubtype query and it would not run correctly.” As we can see, it has no effect to delete permitsubtype from the query you provided, could you please provide complete sql query for the report?
    Could you please provide detailed information about the report? I would be appreciated it if you could provide sample data and screenshot of the report.
    Please provide some more detailed information of your requirements.
    This may be a lot of information to ask for at one time. However, by collecting this information now, it will help us move more quickly toward a solution.
    Thanks,
    Wendy Fu

  • ABAP Query and ABAP Report

    Hi,
    1.What is the difference between ABAP Query and ABAP report?
    2.What are the advantages of LSMW over BDC?
    Regards,
    Ajit

    Hi,
    Please read the rules of engagement before you post.
    Step 1: Finding An Answer
    Rule number one: Try to find the answer first. There are tons of resources out there, show that you have tried to find the answer. A question that shows that the person is willing to try and help themselves is more likely to be answered than one which simply demands information. Tell us what you have done to try and solve the problem yourself - often we can learn from that too!
    Search the forums, the articles, the blog posts and the Frequently Asked Questions (FAQ) in the Wiki for your topic.

  • Hierarchical Tree Data Query/Record Group Question

    I need help with Hierarchical Forms right now. I'm currently trying to implement a hierarchical tree to display the different items in different categories. I have been reading up on it for the past few days, and i do not understand a few things.
    What is the difference between a data query and record group? they seem the same to me.
    How does the XX = prior XXX work? i understand that this is what connects the parent to the child.
    How do you determine what depth the node is? its done in the record group/data query, but how do i decide what level it is dynamically?
    Thanks a lot in advance!

    Thanks! I am unable to create a table specifically for the tree because i am using tables that have been ported live and are in use. My question about levels is how do I know which depth the node is. For example, i have a category called Information Technology and a category item called Business Informatics. I want to know how to decide that the Category(information technology) is on level 1 and the Item(business informatics) is on level 2.
    Information Technology
    |_
    Business Informatics
    And i do know how the Connect By XX = prior XXX works in the data query/record group.
    Thanks for your help!

  • How can I customize af:query and af:queryCriteria

    Dear all,
    I have a question,How can I customize <af:query> and <af:queryCriteria/>, for example change "search" button label to "find" ,
    Best regards,

    These changes must be made within the application skin.
    --RiC                                                                                                                                                                                               

  • Stoping a query and clearing query cache

    Hi,
    Is there any way to stop a query from executing which is attached to a grid applet.
    I want to display the grid with out any contents and display contents when user clicks submit.
    I know there are two ways we can do this.
    1. First do not assign any query to the grid and later assign query template during runtime when user click  submit.
    or
    2. Set filter criteria to fail select condition ( not Xacute Query).
    My question is - Is there still an easier way to do this like just check/uncheck a checkbox.
    Thanks,
    Srinivas.

    Srinivas,
    As Ryan said I would use "Initial Update" and set it to false in your applet.  The other two ways you mentioned are possible but I would not recommend them as a solution the Initial update is built into xMII for this exact purpose and also much easier to implement.
    Regards,
    Erik

  • Printing Web query and related KM document together as PDF (in portal)

    Dear Gurus
    We are on NW2004s and have portal etc. installed.
    <b>Scenario:</b>
    We have set Guided procedure in portal where we use a simple web template as  iview in association with a single KM document. The KM document is used for entering comments by different users after they have seen the query results. As a last step of the Guided Procedure we would like to create a PDF printout of the related query and the KM document with comments in it. Ideally we would like to print these 2 objects with a single print function and if possible on the same page.
    <b>Questions:</b>
    -Is there a way to print the Query results iView and the associated KM document with a single Print function?
    -Can I Print these 2 objects on the same page?
    I can try a work around, to have a document for commenting purpose directly as web item in the template itself. Then use this in the Guided procedures. However from the information i know, there are only limited objects from the web template which are printed to PDF, the rest are just ignored.So I believe that the document with comments would still not be printed (refer to the link).
    Ref:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/68ce8391886e47e10000000a422035/frameset.htm
    Pls. Suggest,. I would surely give good points for this.
    Thanks in advance
    Gugi

    Not yetr resolved. Just wrong forum.

  • ABAP Query and BW Report

    Need an understanding of how do we judge or make out that for a particular report we can go for ABAP query and for one we can go for BW report.??? Please provide clear answer with example..
    Thanks

    Hi,
    Your question is very broad based.
    ABAP Query is a simple tool in the hands of the Functional consultants to extract information from the tables directly ( u can use complex logic as well ), Example - List all sales orders within a particular period.
    But, BW reports are used not for Transactional analysis but for Strategic reporting. Depends upon the nature of data , users of data, availability of data, you should decide. It needs investment in BW module. Report the total sales by region, product etc with trends and graphs.
    Thanks
    Siva

  • How to tune the query and difference between CBO AND RBO.. Which is good

    Hello Friends,
    Here are some questions I have pls reply back with complete description and url if any ..
    1)How Did you tune Query,
    2)What approach you take to tune query? Do you use Hints?
    3)Where did you tune the query and what are the issue with query?
    4)What is difference between RBO and CBO? where u use RBO and CBO.
    5)Give some information about hash join?
    6) Using explain plan how do u know where the bottle neck in query .. how u will identify where the bottle neck is from explain plan .
    thanks/Kumar

    Hi,
    kumar73 wrote:
    Hello Friends,
    Here are some questions I have pls reply back with complete description and url if any ..
    1)How Did you tune Query, Use EXPLAIN PLAN to see exactly where it is spending its time, and address those areas.
    See the forum FAQ
    SQL and PL/SQL FAQ
    "3. How to improve the performance of my query?"
    2)What approach you take to tune query? Do you use Hints?Hints can help.
    Even more helpful is writing the SQL efficiently (avoiding multiple scans of the same table, filtering early, using built-in rather than user-defined functions, ...), creating and using indexes, and, for large tables, partitioning.
    Table design can have a big impact on performace.
    Look for ways to do part of what you need before the query. This includes denormalizing (when appropriate), the kind of pre-digesting that often takes place in data warehouses, function-based indexes, and, starting in Oracle 11, virtual columns.
    3)Where did you tune the query and what are the issue with query?Either this question is a vague summary of the entire thread, or I don't understand it. Can you re-phrase this part?
    4)What is difference between RBO and CBO? where u use RBO and CBO.Basically, use RBO if you have Oracle 7 or earlier.

  • How to find lasts query and his results(number of record returned)

    Hi all,
    sorry for my english.
    My scenario: i have 3 select below....
    first select: select 1 from dual;
    second select select 1 from dualXXXX; (this table/view/synonym, etc,etc NOT exists in DB)
    third select select 1 from dual where 0=1;
    my question is:
    how and where i can find (in system table for example) the latest query and the right or wrong excecution?
    I.E. for the first query the results is OK (with 1 record returned)
    for the second query the results is KO (the table not exists)
    for third query the results is OK( but whit 0 record returned).
    There is this information stored somewhere?
    Thanks a lot
    Attilio

    Properly executed queries details will be found in below dynamic views :
    V$SQL,V$SQLAREA
    SELECT
         sql_text,
         ROWS_PROCESSED,
         LAST_ACTIVE_TIME
    FROM
         V$SQLAREA
    WHERE
         regexp_like(SQL_TEXT,'1 from dual');Not aware about the queries which did not get executed properly.

  • Account with an icon of a face and a question mark

    Same issue of other user in Yosemite Apple Support.
    Following advises on that thread I also installed the ETRECHECK software tool, report is as follows:
    Problem description:
    At the login screen I find an icon with a face and a question mark in it - with a message it needs an update.
    EtreCheck version: 2.1.5 (108)
    Report generated 02 gennaio 2015 12:37:26 CET
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2012) (Verified)
      MacBook Pro - model: MacBookPro9,2
      1 2.5 GHz Intel Core i5 CPU: 2-core
      16 GB RAM Upgradeable
      BANK 0/DIMM0
      8 GB DDR3 1600 MHz ok
      BANK 1/DIMM0
      8 GB DDR3 1600 MHz ok
      Bluetooth: Good - Handoff/Airdrop2 supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 4000
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Uptime: 1:22:54
    Disk Information: ℹ️
      APPLE HDD HTS545050A7E362 disk0 : (500,11 GB)
      EFI (disk0s1) <not mounted> : 210 MB
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      Macintosh HD (disk1) / : 498.89 GB (467.03 GB free)
      Encrypted AES-XTS Unlocked
      Core Storage: disk0s2 499.25 GB Online
      MATSHITADVD-R   UJ-8A8 
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Computer, Inc. IR Receiver
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
    User Login Items: ℹ️
      iTunesHelper Applicazione (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Dropbox ApplicazioneHidden (/Applications/Dropbox.app)
    Internet Plug-ins: ℹ️
      FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
      Flash Player: Version: 16.0.0.235 - SDK 10.6 [Support]
      QuickTime Plugin: Version: 7.7.3
      Default Browser: Version: 600 - SDK 10.10
    Safari Extensions: ℹ️
      Pin It Button [Installed]
      Save to Pocket [Installed]
      Add To Amazon Wish List [Installed]
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          14% WindowServer
          3% hidd
          2% Safari
          1% Dock
          0% fontd
    Top Processes by Memory: ℹ️
      333 MB com.apple.WebKit.WebContent
      155 MB mds_stores
      137 MB Safari
      137 MB Finder
      86 MB Dropbox
    Virtual Memory Information: ℹ️
      7.76 GB Free RAM
      4.88 GB Active RAM
      3.28 GB Inactive RAM
      1.26 GB Wired RAM
      4.73 GB Page-ins
      0 B Page-outs
    Diagnostics Information: ℹ️
      Jan 2, 2015, 11:15:06 AM Self test - passed
      Jan 2, 2015, 12:06:57 AM /Library/Logs/DiagnosticReports/Dropbox109_2015-01-02-000657_[redacted].cpu_res ource.diag [Details]
    ---------- is there any troubleshooting for delete that fake account every time I start my Macbook Pro?
    thanks and regards
    Edoardo

    Smiley face with a ? means a bootable system is not found.
    There maybe  a problem with either system software or hard drive itself.
    Try this.
    Repair Disk
    Steps 2 through 8
    http://support.apple.com/kb/PH5836
    Best.

Maybe you are looking for