How do I do use the custom code and format for a percentage with 2 decimals in Report Builder 3.0?

In Report Builder 3.0, I have the following custom code entered:
  Public Function SafeDivide(Numerator as String, Denominator as String) as String
Try
If Numerator = “” or Denominator = “” then
Return “-“
End if
If Numerator = “-“ or Denominator = “-“ then
Return “-“
End If
If CDbl(Numerator) =0 or CDbl(Denominator) = 0 then
Return “-“
End if
If IsNothing(Numerator) or IsNothing(Denominator) then
Return "-"
End if
Return Val( ( (CDbl(Numerator) / CDbl(Denominator) )*100 ) )
Catch
Return "-"
End Try
End Function
I call the custom code in the cell with the following equation:
  =Code.SafeDivide(sum(Fields!TY_UNITS.Value)-sum(Fields!LY_UNITS.Value),sum(Fields!LY_UNITS.Value))
I have the format for the cell set to 0.00%, but it’s not being followed.
I want the result to be formatted as a Percentage, but instead I get values like: 
-78.9473684210
80
300
-100
I have the format for the cell set to 0.00%, but it’s not being followed.
How do I do use the custom code and format for a percentage with 2 decimals?

Hi AngP,
After testing the issue in my local environment, I can reproduce it. Based on my research, I find this issue is caused by the type of Units_VAR_Percentage cell is string, while the type of CDbl(Parameters!Var_Threshold.Value) is double, so they cannot be
compared.
To fix this issue, we can add a hidden column (Textbox91) next to the Units_VAR_Percentage column, and type =(sum(Fields!TY_UNITS.Value)-sum(Fields!LY_UNITS.Value)) /sum(Fields!LY_UNITS.Value) as the expression. Then use the expression below to control the
BackgroundColor:
=iif(iif(reportitems!Units_VAR_Percentage.Value=CStr(format(reportitems!Textbox91.Value,"0.00%")),reportitems!Textbox91.Value,0)>CDbl(Parameters!Var_Threshold.Value),"Yellow","PaleTurquoise")
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • I have paid for ipages 09 on 15/05 but never succed to enter the serial code. After 45 days, altough I was charged by 20 chf, I cannot completely use all ipages tools(impossible to save ). How can I get again the serial code I paid for?

    i have paid for ipages 09 on 15/05 but never succed to enter the serial code. After 45 days, altough I was charged by 20 chf, I cannot completely use all ipages tools(impossible to save ). How can I get again the serial code I paid for?

    Getting the request for a serial number means that at some time you had the iWork ’09 trial installed. You need to delete the trial & then reinstall from the boxed DVD or the Mac App Store. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user. The easiest way to fix the problem is to use Yvan Koenig's AppleScript that removes the files. You can find it on his box.com account in for_iWork'09 > other_iWork'09 items > uninstall iWork '09.zip. Download uninstall iWork '09.zip, decompress it, open it in AppleScript Editor and click the Run button.
    Apple's support article on the subject says it's due to having a copy of the trial that is a higher version that the one you've purchased, but I'm not sure that is very common. This problem started with Snow Leopard & it seems to be some code in the iWork installers that doesn't do what it should.

  • Issues regarding Transporting the Custom codes and Text Elements

    I created a custom t-code and had some text elements for my ABAP program in DEV, I transported quality an it worked , but when i transport it production it did not transport the custom code and the text elements.  Can u guys give me steps to take for the custom code and the text to be transported sucessfully??

    Hi,
    Please check whether the Tcode and Text elements are assigned to the particular Transport Request number. If it is an enhancement that Tcode and Text elements might be there in QA before itself and so this is working. You need to add the TCode manually while transporting the request and transport it to QA and PRD.
    Thanks and Regards
    Sowmmya VB

  • My ipod says it is updated to most current 6.1.6, i use the rdio app and it worked but now with the update it needs 7.0 but i do not get option to update to this what do i do?

    my ipod says it is updated to most current 6.1.6, i use the rdio app and it worked but now with the update it needs 7.0 but i do not get option to update to this what do i do?

    See the chart below to determine whether you can upgrade your device and what you can upgrade to. If you do not have a Software Update option present on your iDevice, then you are trying to upgrade to iOS 5 or higher. You will have to connect your device to your computer and open iTunes in order to upgrade.
    IPhone, iPod Touch, and iPad iOS Compatibility Chart
         Device                                       iOS Verson
    iPhone 1                                      iOS 3.1.3
    iPhone 3G                                   iOS 4.2.1
    iPhone 3GS                                 iOS 6.1.x
    iPhone 4                                      iOS 7.1.x
    iPhone 4S                                    iOS 8.x.x
    iPhone 5                                      iOS 8.x.x
    iPhone 5c                                     iOS 8.x.x
    iPhone 5s                                     iOS 8.x.x
    iPod Touch 1                               iOS 3.1.3
    iPod Touch 2                               iOS 4.2.1
    iPod Touch 3                               iOS 5.1.1
    iPod Touch 4                               iOS 6.1.x
    iPod Touch 5                               iOS 8.x.x
    iPad 1                                          iOS 5.1.1
    iPad 2                                          iOS 8.x.x
    iPad 3                                          iOS 8.x.x
    iPad 4                                          iOS 8.x.x
    iPad Mini & Mini Retina                iOS 8.x.x
    iPad Air                                        iOS 8.x.x
    =====================================
    Select the method most appropriate for your situation.
    Upgrading iOS
       1. How to update your iPhone, iPad, or iPod Touch
       2. iPhone Support
       3. iPod Touch Support
       4. iPad Support
         a. Updating Your iOS from iOS 5
              Tap Settings > General > Software Update
         If an update is available there will be an active Update button. If you are current,
         then you will see a gray screen with a message saying your are up to date.
         b. If you are still using iOS 4 — Updating your device to iOS 5 or later.
         c. Resolving update problems
            1. iOS - Unable to update or restore
            2. iOS- Resolving update and restore alert messages

  • Multiple iphones each with an apple id - can i use the same laptop and itunes for back up, restore and updates?

    We have two iphones each with a different apple id - can i use the same laptop and itunes for back up, restore and updates without risking having my apps overwritten.  Basically does itunes keep the two iphones as two separate entities ?  Does iTunes differentiate between the two devices and keep two different SYNCs ?

    Yes, you can use the same computer for BACK UPS, RESTORING AND UPDATING. But that is it.
    You cannot, however, use it to sync the different devices. iTunes will only recognize one device to sync with and if you sync any other devices with that iTunes library, it will replace what is on the phone with whatever is in the library. It cannot differentiate between devices. At most, it will jsut recognize that the phone has been synced with a different iTunes library.
    So if you would like to use the same computer for backing up, restoring and updating, just make sure to turn of Automatic Syncing in your iTunes Preferences.

  • I have a Ipod Nano and want to get another one , and use both. Can I use the same computer and library for both?

    I have a Ipod Nano and want to get another one , and use both. Can I use the same computer and library for both?

    Yes

  • Can I use the ac charger I bought for my mini with my new nano

    Having just bought a Nano, I want to know if I can use the ac charger I bought for the mini to charge it. I don't have enough access to a pc to charge it via the USB cable.

    Here are the specs on the Apple AC converter:
    Input AC 100-240 V 50-60 HZ
    AC input 0.35A max
    Output 5V, 1A
    I'm not sure how this matches up with the specs on your charger. Maybe you could find a website for your supplier and see if they advertise the unit for Nanos?

  • Unable to start several servers using the custom. authentication and authorization Provider

    I downloaded the Sample Security Providers (http://developer.bea.com/managed_content/direct/SampleSecurityProvidersUnmanaged.zip)
    and followed the user guide for installation.
    We have following configuration:
    - One domain with 3 servers :
    - ADM: admin, console
    - WTL_1 : WebTool server 1
    - WTL_2 : WebTool server 2
    WTL_1 and WT_2 are member of cluster WTL_Cluster
    I try to restart all servers. It worked fine for the first one (ADM), but for
    the other two I got followinf exception:
    ####<Nov 13, 2002 10:29:02 AM CET> <Emergency> <WebLogicServer> <isoit652.bbn.hp.com>
    <WTL_1> <main> <kernel i
    dentity> <> <000342> <Unable to initialize the server: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication denied: Boot identity not
    valid
    java.lang.SecurityException: Authentication denied: Boot identity not valid
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(SecurityServiceManager.java:1024)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    Do you have any idea why it worked only for one server?
    Thanks for any help
    My Chi

    Hi John,
    Actually, thanks to your examples, I have my Authentication Scheme setup using a custom authentication function that first checks that the Username/Password are valid, and if so, then validates that the user has also been setup in AD with one of the groups used by my application. What I'm wondering is, when I replace the built-in Authentication Function it appears that the function that I code must have the correct signature (accepts UserName and Password, and returns a boolean)... but I really want to be able to also return the actual AD Group that the user is assigned to for use within my Authorization Schemes. I'm not sure if/how I can do this from my authentication function, or if I just need to re-query AD again in my Authorization Schemes to get the AD group that the user is assigned to.
    Appreciate the help,
    Lori

  • How can I draw using the Brush tool and a touch screen?

    I need to be able to use the touch screen on my Lenovo Yoga (running Windows 8) to draw using the Brush tool in Photoshop CS6. I'm able to do that in other programs, including Microsoft OneNote and Paint. For some reason, Photoshop will only interpret touching and dragging on the screen as an attempt to pan or scroll, even when the Brush tool is selected. I bought Photoshop - and it isn't cheap - specifically in order to draw using the touch screen, which I need to be able to do for my job. Is there some driver I can download to fix this problem, or some obscure setting I can change?
    I would also like to note that Adobe's technical support line exhibits a degree of infuriating unreachability equalled only by the Massachusetts Registry of Motor Vehicles. When I called to ask for help with this problem, I was told the expected wait time was between 10 and 14 minutes. After waiting for 50 minutes, I gave up in disgust. Adobe's products are powerful, but what passes for customer service is an utter disgrace.

    There's gotta be a way but I just use gimp for touch drawing, save it off as a png, edit in ps or ai. 

  • How can I use the MPEG-2 DVD format for video rendering?

    I have been trying to make a DVD out of my brother's wedding footage, but I've run into a wall. I would like to render out my footage in the .M2V format (MPEG-2 DVD), but I'm not given the option to use it. The only MPEG format I'm given is the .H264, and that doesn't work as well. How can I install the .M2V codec?

    You should either:
    Render to a suitable production codec and then compress for DVD in your authoring application.Use the Render Cue to render a PhotoJpg at NTSC or PAL file using default frame sizes for your AE rendering composition, then drop in Encore for authoring.
    Open your AE project in Adobe Media Encoder, pick the composition you want to render from the list and pick the MPEG 2 for DVD preset.
    Open Adobe Encore, select File>Dynamic Link>Import After Effects Composition and then set up your timelines and menu's as you like and select Build DVD.
    All DVD authoring programs will compress standard def video in just about any format for DVD. After Effects, however, will not do multi-pass rendering which is required for high quality MPEG compression.

  • How to select songs using the search bar in iTunes for Windows 8.1

    Just today (8th May, 14) I couldn't select songs when using the search bar in the top right hand side of iTunes. I patched it but it didn't solve the problem, however once I ran as administrator it did fix the problem. Is there a way to not have to run as administrator every time I want to open iTunes and/or is there a way to fix this problem? I have iTunes pinned on my taskbar so by default it does not open iTues as administrator. Thanks

    Hi,
    This should be compatible issue.
    Please try to install the driver in Windows 8.1 compatible mode:
    Make older programs compatible with this version of Windows
    http://windows.microsoft.com/en-in/windows-8/older-programs-compatible-version-windows
    If you still find unknown device in your Device manager, right click to update the driver to see what's going on.
    For further troubleshooting, please post back the C:\WINDOWS\INF\setupapi.dev.log
    here for our research.
    You can update it onto OneDrive or the similar network device and share the link here.
    Kate Li
    TechNet Community Support

  • HT5621 I have several apple devices, three are mine and the other ones belong to my little children.  I use the same ID and password for all the devices.  Is this a good idea? Do I need to change the apples ID?

    I use the same apple ID for all my devices, 2 iphones, 2 itouch, 1 macbook pro, 2 ipads.  Becuse I have small children, can I change that and still, have control, and don´t need to buy the same things serveral times.

    It is something I would avoid if possible.   I would want to educate my children to think possessively and therefore of security.  Yes, I know you are all family but at the end of the day you wouldn't want your children to be blaming each other for any problems that arise.  Well, that's how I see it, for what it is worth.

  • How to edit data using a LOV list AND textfield for one Field

    I am trying to edit the templated edit from HTMLDB template when I create a new table. I implemented most of the fields with LOV list like yes/no, joe/bob/john etc. But some fields as many probably have seen have a LOV called "Other" where a person types a different value than the ones available. Can someone tell me how I can accomplish that? Do I need to insert "Other" into LOV and have it be set as the value in the textfield? I am not sure how i can create both LOV list and textfield per category/field i.e. Name.
    Thanks

    Again, I urge you to use HTML DB nomenclature to describe what you've done. For example: "I ran the Form on a Table wizard to create a form" Rather than using the word "template" for everything you describe. "Template" has a specific meaning in HTML DB and it is not what you are referring to.
    You really should invest the time required to accurately phrase your problem. Just like answering questions on this forum requires time, so does formulating your question. It is time well spent and it is effort on your part that the experts on this forum deserve. If you don't put in this effort and instead just post a stream of consciousness, that means the readers of this forum will gloss over your question and ignore it. As a result, you have to ask the question again...and again.
    Having said that, if I understand your question correctly, you should use a popup LOV item. This will allow the user to select from a list but will also allow typing of a non existent option into a text field.
    Sergio

  • Why do my firewalls only use the domain username and password for login and enable passwords, not a different enable password like my switches do? The RADIUS config looks the same...

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman","serif";}
    Issue:
    Cisco firewalls require only one level of password i.e. the domain username and password are used for both logging in as well as reaching global configuration mode.
    Background:
    We have multiple Cisco network devices set up which authenticate to our Windows domain controller using NPS (Windows 2008 R2). The switches we have set up all function exactly as we would hope as they require your domain username and password to login to the device. They then require a separate password when you use the enable command, this is stored in Active Directory:
    Switches:
    Username:domain-username
    Password:domain-password
    SWITCH>enable
    Password:enable-password-in-Active-Directory
    SWITCH#
    Firewalls (as they currently are):
    Username:domain-username
    Password:domain-password
    FIREWALL>enable
    Password:domain-password
    FIREWALL #
    With the firewalls however, they require your domain username and password first, and then your domain password again when using the enable command. I want the firewalls to use the enable level password that the switches currently use instead of the domain password again. The current configuration look like the following:
    Current switch configuration:
    aaa new-model
    aaa authentication login default group radius local
    aaa authentication enable default group radius enable
    aaa authorization exec default group radius local
    aaa session-id common
    radius-server host 192.168.0.1 auth-port 1645 acct-port 1646
    radius-server source-ports 1645-1646
    radius-server key 7 1234abcd
    Current firewall configuration:
    aaa-server DC01 protocol radius
    aaa-server DC01 (outside) host 192.168.0.1
    aaa authentication ssh console DC01 LOCAL
    aaa authentication enable console DC01 LOCAL
    key 1234abcd
    Any help would be great, thanks!

    Cisco ASA works that way by design. You could remove "aaa authentication enable" and then you could use the "enable password" command to set your enable password.
    But if you do that, then ASA would change your username to "enable_15". That would break Authorization and Accounting if you're using them. Let me clarify with an example
    Firewalls :
    Username:domain-username
    Password:domain-password
    FIREWALL>show curpriv
    Username : domain-username
    Current privilege level : 1
    Current Mode/s : P_UNPR
    FIREWALL>enable
    Password:enable-password-from-running-config
    FIREWALL #show curpriv
    Username : enable_15
    Current privilege level : 15
    Current Mode/s : P_PRIV
    If you're using Authorization and Accounting it's recommended to stick with your current behavior.

  • Premiere elements does not recognize Blu-Ray disc, says media not present.  Under 12 I was able to record 3 blu-ray dvds using the same burner and discs I'm trying with 13.  What is the problem?

    I installed PE13 and cannot burn blu-ray DVDs.  I was able to burn 3 blu-ray DVDs using PE12.  When I select DVD from the menu it recogniazes that it is not a stadard DVD as I get an 'incorrect media' error message.  It will burn standard DVDs of the same video using standard DVD mefia.
    What is going  on here?
    When I loaded PE 12 back on the computer I cannot load a file created with PE13.  Looks like a format change?  Can I convert file back to PE12?

    Juergen
    Terrible news. Sorry about that.
    The following is an excerpt from my Premiere Elements 13 blog post, the section on Publish+Share/Disc
    The ISO Image choice is only in Premiere Elements 13.
    DISC. Major Changes Include Burn to offering ISO Image for DVD, Blu-ray, and AVCHD plus 2 new 1080p @ 23.976 presets for Blu-ray.
    The major categories of Publish+Share/Disc/ are DVD, Blu-ray, and Blu-ray. DVD and AVCHD offer burn to disc, folder, and new ISO image. Blu-ray offers burn to disc and new ISO image.Like 12, the new version's DVD, Blu-ray, and AVCHD presets do not have an Advanced Button under which to customize the preset and do not have a "Share Work Area Bar Only" option for selective sharing of the Timeline content Sketch of DVD, Blu-ray, AVCHD includes
    DVD (new features)
    Burn to:
    Disc
    ISO Image (4.7 GB) NEW
    ISO Image (8.5 GB) NEW
    Folder (4.7 GB)
    Folder (8.5 GB)
    Presets
    NTSC_Dolby DVD
    NTSC_Widescreen_Dolby DVD
    PAL_Dolby DVD
    PAL_Widescreen_DVD
    As before in 12, frame rate is 29.97 interlaced frames per second NTSC and 25 interlaced frames per second PAL.
    AVCHD (no changes)
    Burn to:
    Disc
    Folder (4.7 GB)
    Folder (8.5 GB)
    Presets
    H.264 1440 x 1080i NTSC Dolby
    H.264 1440 x 1080i PAL Dolby
    H.264 1440 x 1080p NTSC Dolby
    H.264 1920 x 1080i NTSC Dolby
    H.264 1920 x 1080i PAL Dolby
    H.264 1920 x 1080p NTSC Dolby
    Except for the two 1080p presets with frame rate of 23.976 progressive frames per second, the other presets all have a frame rate of 29.97 interlaced frames per second NTSC or 25 interlaced frames per second.
    Blu-ray (new features)
    Burn to:
    Disc
    ISO Image (25 GB) NEW
    ISO Image (50 GB) NEW
    Presets
    H.264 1440 x 1080i NTSC Dolby
    H.264 1440 x 1080i PAL Dolby
    H.264 1440 x 1080p NTSC Dolby NEW
    H.264 1920 x 1080i NTSC Dolby
    H.264 1920 x 1080i PAL Dolby
    H.264 1920 x 1080p NTSC Dolby NEW
    Except for the two 1080p presets with frame rate of 23.976 progressive frames per second, the other presets all have a frame rate of 29.97 interlaced frames per second NTSC or 25 interlaced frames per second.
    Look to Burn To: in the Burn Dialog,  and scroll down there to the option that you want.
    Please let me know if this ISO Image choice is going to work for you. But I will keeping searching for the answer to these no media present situations.
    ATR

Maybe you are looking for

  • Query in a Role transported to Q system, not available in BEx Q system.

    Hello Everybody, After going through number of posts, I could not find a solution to my query. I've created a query, assigned it to a role. Collected the necessary objects into a BEx Tranport Request. Assigned it to the correct package. Now after the

  • How to back up iTunes Match music to external HDD

    I have had an iTunes Match account for several years.  Since I now use a retina MBP, I have deleted the matched music from my SSD to save space.  Now I would like to make a complete backup of all my music to an external HDD.  How can I do that withou

  • What Would You Guys Do?

    I make this summer video type thing for my friends and family every year. This year I wanted to have something at the beginning to really make it cool so this is what I was thinking... I wanted to do a 1 shot opening set in high speed from getting up

  • Printing dark black line using lbp2900b

    Hi iam facing problem with my canon laser printer lbp2900b... It is printing dark line on left side of page ..i could not understand what is problem in it i cleaned everything but still it prints like that ... I have uploaded the sample print out. Co

  • OS X 10.6.7 (Mac Pro) issues with Sleep

    Since the recent update, my Mac is not going to sleep consistently.    This morning, for example, it will attempt to go to sleep, then immediately wake up.  There are no extra apps working, no stimulus from the keyboard or mouse. Is this a known bug?