How to conditionally put a percentage sign in a column in a report

Background: In the past, our users have been provided with a spreadsheet of statistics that was created manually, by running a bunch of barely related queries, manually entering the data into the spreadsheet, adding formatting and headings, etc. They wanted this moved to APEX, and they wanted to be able to export it as one spreadsheet. The only way I could find to do this was to combine all the queries into one huge query.
So I have a report of 22 unique queries unioned together. The third and fifth columns are percentages. I found Column format with percent ( % ) sign post that explained how to use the HTML Expression (under Column Attributes) to add a percentage sign (#COL03#%).
This worked fine except for that in order to get the headings how they wanted them, I had to do something like:
-statistical query-
union all
select '<b>HEADING ONE</b>', null, null, null, null from dual
union all
-statistical query-
etc.
The problem now is that I don't actually want the percentage sign in the heading rows. Is there a way to change the HTML Expression so it's conditional, and it only appends the percentage sign if the value in that row is not null? Or alternately, is there a way to append the percentage sign in the actual select statement, so I could go through each of my 22 queries and append it only when I know it's needed? A simple example of one of these queries is:
select ''New Enrollees'' as a,
(count(case when extract(month from rdate) = :P45_MONTH_SELECT THEN 1 else NULL END)) as monthly,
(((count(case when extract(month from rdate) = :P45_MONTH_SELECT THEN 1 else NULL END))/:P45_TOTAL_MON_SUBMISSIONS)*100) as m,
(count(case when extract(month from rdate) <= :P45_MONTH_SELECT THEN 1 else NULL END)) as YTD,
(((count(case when extract(month from rdate) <= :P45_MONTH_SELECT THEN 1 else NULL END))/:P45_TOTAL_SUBMISSIONS)*100) as y
from main
where extract(year from rdate) = :P45_YEAR_SELECT
Thanks in advance for your help!
-Gaso
Edited by: gaso on Feb 4, 2009 1:39 PM
Edited by: gaso on Feb 9, 2009 4:39 AM

why don't you add the percentage sign in the query itself, e.g. with a case statement to show it conditionally?

Similar Messages

  • How do I put a sold sign on a photo in PhotoShop Elements 8?

    How do I put a sold sign on a photo in PhotoShop Elements 8?

    You could select the text panel from the content menu then click apply.
    Select the text tool and type your words on top.

  • How can I get (using API) the current sort column for some report

    hello,
    How can I get (using API) the current sort column for some report ? For example something like "fsp_sort_1_desc" - if the user sorts by the first column ?
    I cannot use the :REQUEST for this, sometimes the current sort column is not in the :REQUEST, but it is still active.
    I thought it was posssible by using
    APEX_UTIL.GET_PREFERENCE (
    p_preference IN VARCHAR2 DEFAULT NULL,
    p_user IN VARCHAR2 DEFAULT V('USER'))
    RETURN VARCHAR2;
    function, but I don't really know which preference should I pass as parameter.
    looking in WWV_FLOW_PREFERENCES$, i saw preferences_names like FSP4000_P527_R6281510839654570_SORT , I'm not sure how this name is formed.
    I'm using generic columns for that complex report (which has a flexible number of columns shown), and the idea is that sometimes I have to overwrite that sort column, in case the user chose the version of the report with fewer columns than the previous one.
    Can I get (using API) a list of all preferences set for some user ?
    Thank you,

    seems that it is FSP<app_number>P<pagenumber>R<regionnumber>_SORT.
    is there anyplace where I can get these kind of things documented ?
    Thank you.

  • How does one give out enough spaces for a column in SQL report ?

    How does one reserve enough spaces for a column in SQL report ?
    Ex: 2 columns defined as the following
    projectNo varchar2(10)
    ProjectName varchar2(50)
    When create an sql report, the report heading will show below. If my project name is " Tire Strength Test At Site R987654" . I need to get it to show in one line since it was defined as varchar2(50)
    projectNo     ProjectName
    A0001         Tire Strength
                  Test At Site
                  R987654 There got to be a way to get around here . Thanx in advance.
    tai

    I noticed the CSS Style settings only seem to work if using a "Standard Report Column". Unfortunately I have the need to define some report columns where undesired wrapping occurs as "Display as Text (based on LOV, does not save state)" and tried to avoid wrapping, but no luck - is there a way around this (other than performing the report query using a huge DECODE clause, which somewhat renders the LOV useless except for data entry)?
    Thanks in advance for any ideas,
    Holger

  • How to remove the append "/1 CAD" in the column of drilldown report

    Hi Expert,
    We have a report for "AGED TRIAL BALANCE for AP" in local currency and column heading are printing fine.
    Example of column header "0 - 30" and its automatically appending "/1 CAD":
    Sample output:
      0 - 30    |     31 -60   |
      1 CAD    |   1 CAD     |
    Now I am creating the same report but in document currency which i want to remove the auto append "/1 CAD".
    On the form I am using the characteristics "Due date analysis".
    How can i remove this currency  "1CAD" thing.
    Thanks in advance.

    Hi,
    this has to do with the scaling and formating you are using.
    If you are using an automatic Scaling mode and you X-values have the display format "Time", DIAdem switches to the scaling type "Date/Time".
    By default, DIAdem is using an automatic formating with two lines. The upper is for the Ticks and the lower for a larger step. It looks as if your time-data is only holdig the seconds of the day, but not the date itself. So DIAdem assumes a year 0 and the 1 is for the first day of the year. If your data spans over several days, you will see the number of the day below the 12:00 for each day. Depending on the X-values, the automatic scaling will show seconds, minutes, hours or dates and years.
    You just need to go to the X-Axis - numbers tab and change the format. "#hh:nn" would do the job with leading zeros and "#HH:nn" without leading zeros.

  • On Firefox 4, how can I put one "new tab" on the "tab bar" (The + sign) and one next to the "back/forward" buttons (as in FF 3.6)?

    On Firefox 4, how can I put one "new tab" on the "tab bar" (The + sign) and one next to the "back/forward" buttons (as in FF 3.6)?
    In my current Firefox, the "new tab" icon/item from the "customize" pop-up window menu of items is placed next to my home, back, forward buttons near the top-left of my header (Button 1 for "new tab"). Then, the tab bar automatically come with a small tab (with a + sign) to the right of your last tab opened (so you click on + and a new tab opens. Button 2 for "new tab"). I like to have this "new tab" button twice (as a + mini tab, and next to my "home icon".
    When I upgraded to Firefox 4, I seemed to be only able to "customize" or use the "new tab" in one place. Either as an icon next to home button, or as a "+ minitab", but NOT both.
    What can I do to put this button in Firefox 4 on BOTH places???
    Your help is really appreciated. I want to upgrade, but I want my buttons on both places...
    I upgraded to FF 4, but downgraded again just because this feature... that's just me of coarse :-)

    *New tab toolbar button: https://addons.mozilla.org/firefox/addon/new-tab-toolbar-button/

  • How to display a percentage sign ( % ) after a text box in a screen

    hi experts,
    Can anybody tell me how to display a percentage sign ( % ) after a text box in a screen.

    Hi Ajay,
    Try to use the  [Position|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dba7e235c111d1829f0000e829fbfe/frameset.htm] option of selection screen.
    By using this you can place the text as a comment at a desired position on the selection screen.
    The syntax would be like this :
    SELECTION-SCREEN POSITION <pos>.
    Regards,
    Swapna.

  • How to Display the Percentage (%) Sign in Planning Form..???

    Hi All,
    How to display the percentage sign in the planning form in an account..?? I've an account that already set as the percentage for the data type.
    What I want is, when I type 50 in my cell, then in my form will be show 50%
    Now, I can't see the % sign on my form.
    Any Idea..??
    Thanks.
    Regards,
    VieN

    I know it's an obvious one but has caught me once or twice before when I've changed many properties numerous times in one day: Make sure you've deployed since you last set the properties!

  • HOW CAN I PUT THE AMOUNT WITH THE SIGN OF DOLLAR?

    HI!
    HOW CAN I PUT THE AMOUNT WITH THE SIGN OF DOLLAR?
    BECAUSE WHEN I WRITE THE DATA THE AMOUNT OVERWRITE THE SIGN.
    THANKS PEOPLE

    THIS IS THE WRITE PART:
    [code]
    WRITE:
              /97 t_bsid-dmbtr,          "Invoice Amount
              104 '$',
              104 t_bsid-fecha,          "Payment Date
              114 t_bsid-pago,           "Payment Amount
              116 '$'.
    [/code]

  • How can I put a sign of mine as a Tab sign for my site?

    How can I put a sign of my choice as Tab sign for a site I have created? Thanks in advance -- basifra

    That sure isn't clear. If you want to create a '''favicon''' for your site you can, there are several sites that will help you with that.
    There are at least three linked here:
    :http://dmcritchie.mvps.org/excel/xl2html.htm#html-kit
    Since you don't know the terminology, I guessing you will have to put the reference into each page -- unless you actually do have your own domain/subdomain.
    <link rel="SHORTCUT ICON" href="../excel/favicon.ico">
    it can refer to another site but you should avoid doing that unless the site does not allow you to have a favicon .

  • How to escape a percentage sign

    I have a simple one line MySQL command that I want to run from AppleScript.
    The command itself is
    UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE "% DATE %" ;
    Unfortunately, every time I run it I get some error or improper result.
    I've tried escaping out the quotes and percentage sign with a backslash, using "quoted form of" statements, parsing out individual words and using "quote" operators, using curly quotes, and even substituting "ASCII character 37" or "character id 37" for my percent symbol. Most often I get backslashes before my quotes. Here is a recent example.
    Code:
    set part1 to "UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE "
    set part2 to " DATE "
    set part3 to " ;"
    set convertDate to part1 & quote & (ASCII character 37) & part2 & (ASCII character 37) & quote & part3
    return convertDate
    Result:
    "UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE \"% DATE %\" ;"
    I know I can always call a 1 line shell script, but I hope there is a simple solution.

    Quote-Mania
    mabye this example helps:
    do shell script "echo UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE \"% DATE %\" >~/Desktop/testoutput.txt"
    do shell script "echo UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE \\\"% DATE %\\\" >>~/Desktop/testoutput.txt"
    the result in Skript-Editor looks like
    "UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE % DATE %
    UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE \"% DATE %\""
    when you open that text file now you will see
    UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE % DATE %
    UPDATE exif SET datevalue = tagvalue WHERE tagname LIKE "% DATE %"
    Just keep in mind, that the result of a script could be directly inserted into another script, so the output will be quoted if needed to make this possible.

  • Copy value of condition type to another condition type *Not Percentage*

    Hi SAP community!
    How can I copy the value of a condition type to another condition type in my pricing procedure?  The rules are that these conditions are not Percentage. The calculation type is Quantity for the two conditions.
    I want to copy the value of condition type PMIN (Minimum Price) to another Z condition type.
    Thank you all

    Hi Lakshmipathi;
    In fact, there are two Z conditions that I need to have with the same value of the PMIN. I 've maintained my pricing procedure this way:
    For the PMIN, the step is 320
    For the ZPV1, the step is 920 and I put in "From " field 320 and in the "To" field 320
    For the ZPV0, the steo is 925 and I put in "From " field 320  and in the "To" field 320
    But when I looked the Conditions Tab in the sales order there is no value copied to the Z conditions. 
    In order to do this, my Z conditions do not need an access sequence assigned, right?

  • How do i put  my old itunes account  on to new computer

    how do i put old itunes account on to new computer

    An itunes account is just a user name and password.  You can sign into your account from any comuter that has itunes.
    Are you talking about your library ( music/apps/etc)
    If so then type "move itunes library" into the google search bar.

  • How do I install this self-signed SSL certificate?

    I haven't been able to connect to the jabber server I've been using (phcn.de) for quite some time now, so I filed a bug report with mcabber. The friendly people there told me to install phcn.de's self-signed certificate, but I can't figure out for the life of me how to do that.
    I know I can download something resembling a certificate using
    $ gnutls-cli --print-cert -p 5223 phcn.de
    Which does give me something to work with:
    Resolving 'phcn.de'...
    Connecting to '88.198.14.54:5223'...
    - Ephemeral Diffie-Hellman parameters
    - Using prime: 768 bits
    - Secret key: 767 bits
    - Peer's public key: 767 bits
    - PKCS#3 format:
    -----BEGIN DH PARAMETERS-----
    MIHFAmEA6eZCWZ01XzfJf/01ZxILjiXJzUPpJ7OpZw++xdiQFBki0sOzrSSACTeZ
    hp0ehGqrSfqwrSbSzmoiIZ1HC859d31KIfvpwnC1f2BwAvPO+Dk2lM9F7jaIwRqM
    VqsSej2vAmAwRwrVoAX7FM4tnc2H44vH0bHF+suuy+lfGQqnox0jxNu8vgYXRURA
    GlssAgll2MK9IXHTZoRFdx90ughNICnYPBwVhUfzqfGicVviPVGuTT5aH2pwZPMW
    kzo0bT9SklI=
    -----END DH PARAMETERS-----
    - Certificate type: X.509
    - Got a certificate list of 1 certificates.
    - Certificate[0] info:
    - subject `CN=phcn.de', issuer `CN=phcn.de', RSA key 1024 bits, signed using RSA-SHA, activated `2009-05-04 08:26:21 UTC', expires `2014-04-08 08:26:21 UTC', SHA-1 fingerprint `d01bf1980777823ee7db14f8eac1c353dedb8fb7'
    -----BEGIN CERTIFICATE-----
    MIIBxzCCATCgAwIBAgIINN98WCZuMLswDQYJKoZIhvcNAQEFBQAwEjEQMA4GA1UE
    AwwHcGhjbi5kZTAeFw0wOTA1MDQwODI2MjFaFw0xNDA0MDgwODI2MjFaMBIxEDAO
    BgNVBAMMB3BoY24uZGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALqS+tnB
    tNruBGdcjw0o+BWSdfkKH4T3VpS7bkrsS0q7RD5iUIao7jH2lJqTk1TrLbQe28+R
    H0X9Ya+w22iYFea2l3wkrTnBfgdSZbRhpSxgVvC2QEBMoSrEQoRpo5lzXadRlob/
    RQ+rhu/cWCNeiRJzfkmNirPVEciGKQHrwKxxAgMBAAGjJjAkMCIGA1UdEQQbMBmg
    FwYIKwYBBQUHCAWgCwwJKi5waGNuLmRlMA0GCSqGSIb3DQEBBQUAA4GBALFBalfI
    oESZY+UyVwOilQIF8mmYhGSFtreEcUsIQvG1+cgD16glKehx+OcWvJNwf8P6cFvH
    7yiq/fhMVsjnxrfW5Hwagth04/IsuOtIQQZ1B2hnzNezlnntyvaXBMecTIkU7hgl
    zYK97m28p07SrLX5r2A2ODfmYGbp4RD0XkAC
    -----END CERTIFICATE-----
    - The hostname in the certificate matches 'phcn.de'.
    - Peer's certificate issuer is unknown
    - Peer's certificate is NOT trusted
    - Version: TLS1.0
    - Key Exchange: DHE-RSA
    - Cipher: AES-128-CBC
    - MAC: SHA1
    - Compression: NULL
    - Handshake was completed
    - Simple Client Mode:
    Unfortunately, the above command spits out more than a certificate. Do I need the additional information? If so, what do I need it for? Where do I need to put the certificate file?

    Hi,
    I recently found out a way how to install test or self-signed certificates and use it with S1SE.
    See:
    http://www.gtlib.cc.gatech.edu/pub/linux/docs/HOWTO/other-formats/html_single/SSL-Certificates-HOWTO.html
    Follow the instructions there
    1. Create CA
    2. Create root ca certificate
    Now install the root-ca-certificate in S1SE -> Security>Certificate Management and Install a "Trusted Certificate Authority".
    Paste the contents of the file: cacert.pem into the message-text box.
    Then restart the server. Now your CA-Cert should be visible in the Manage Certificates menu.
    The next step is to send a certificate-request from S1SE to your e-mail-address.
    The contents of the e-mail the server sends to you (certificate request) must be pasted into the file: newreq.pem.
    Now just sign the Request:
    CA.pl -sign
    The last step is that you have to paste the contents of the file newcert.pem into the message-box of the Security>Certificate Management - now under the option Certificate for "This Server".
    Then you have to reboot the server/instance again and it should work with your certificate.
    Regards,
    Dominic

  • HT204394 how do i put microsoft word docs onto icloud

    how do i put microsoft word docs onto icloud so that i can transfer to my mac book

    Not really.
    You can sign into iCloud.com from a web browser on your PC.
    Open Pages and drag the Word document in or click the Gear on the top right and upload.
    This will convert it to a Pages document. It will be accessible to you through iCloud and the Pages app on your iOS devices. You can always redownload the file from iCloud as a Word document.
    As with any document conversion, this may alter the formatting.

Maybe you are looking for

  • Certain songs won't import to iTunes

    Hi all, I recently purchased the most recent 13" MacBook Pro which seems to be running fine, except I am having trouble with iTunes. When I download songs and drag them into iTunes, they either go in then I get a pop-up window saying "Attempting to c

  • Changing fields color in CL_GUI_ALV_GRID using class

    Hi, I've written a lot of posts but still I have problem with changing color for CL_GUI_ALV_GRID. I have class ZKSL_CL_4_17_ALV_GRID_OO with 3 methods : SELECT, HANDLE_DBL_CLICK AND DISPLAY_ALV I want to change fields color every time I double click

  • What region is my DVD?

    How do I find out what types of DVDs I can play on my MacBook Pro? I want to buy an Aussie DVD, but I'm in the US and I don't know if the DVD player in my Mac will support region 4 DVDs,

  • Good book for HR programming

    Hi, I'm looking for a book of HR module programming. Mostly of HR books have a functional approach, but I need one more oriented to developers. I've seen "mySAP HR: Technical Principles and Programming" but I don't know if it's what i'm looking for?

  • Customizing Web Dynpro for CATS Approval

    Hi experts, I would like to implement some additional logics when the CATS is approved by managers in MSS. After tracing the codes, I located an ABAP class "CL_MSS_CAT_APPR_TR_BUFFER" that performs the approval actions in R/3. Currently, I am conside