Problem with simple expression

Hi,
I have an SSRS report based on a SSAS cube that contains a Date field called Closing_Date.
This field can be null in the database.
The purpose is to convert the DateTime into a Date field respecting the user's locale
This expresion returns a blank for empty dates and a DateTime (yyyy/mm/dd hh:mm:ss) for non empty dates
=Fields!Closing_Date.Value,DateFormat.ShortDate
This expression returns OK for non empty dates and NOK for empty dates
=IIF(Trim(Cstr(Fields!Closing_Date.Value)) <> "","OK","NOK")
However this expression returns an #error for all empty dates. I don't understand because he should just return NOK.
Why would a change in the True part if the IIF give a different result if the date is empty.
=IIF(Trim(Cstr(Fields!Closing_Date.Value)) <> "",FormatDateTime(Fields!Closing_Date.Value,DateFormat.ShortDate),"NOK")
I get this error in the VS.Net Conversion from string "" to type 'Date' is not valid
Any Idea's?
PS : Other date fields (that don't contain null's) work correctly and can be converted with FormatDateTime function
Regards,
Sven Peeters

Hi Sven,
According to your description, when you iif function to set empty dates to NOK when you preview the report, the error occurred: Conversion from string "" to type 'Date' is not valid. But the fields with data can be converted successfully.
I reproduced the issue in my local machine, the error is caused by data type. I suppose the data type of Closing_Date is string, so when we tried to convert a string with null data, the error occurred. To achieve your goal, please use the expression like
below:
=IIF(Fields!Closing_Date.Value = "", "NOK" , FormatDateTime(IIf(Fields!Closing_Date.Value = "" , Nothing , Fields!Closing_Date.Value) , DateFormat.ShortDate))
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu

Similar Messages

  • Probleme with PCI Express Root Complex

    I bought an hp 15t - j100 with Windows 8.1 but on windows 8.1 but i needed change to windows 8 and now i have a problem with PCI Express Root Complex code 28. The drives i have donwload for hp site http://h10025.www1.hp.com/ewfrf/wc/softwareCategor​y?os=4158&lc=en&cc=us&dlc=en&sw_lang=&product=6521​...
    I need help to solve that problem
    thanks
    and i waiting for help
    This question was solved.
    View Solution.

    Hi:
    You need this driver...
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloa​dIndex?softwareitem=ob-124661-1&cc=us&dlc=en&lc=en​...

  • Problem with Regular Expression

    Hi There!!
    I have a problem with regular expression. I want to validate that one word and second word are same. For that I have written a regex
    Pattern p=Pattern.compile("([a-z][a-zA-Z]*)\\s\1");
    Matcher m=p.matcher("nikhil nikhil");
    boolean t=m.matches();
    if (t)
              System.out.println("There is a match");
         else
              System.out.println("There is no match");
    The result I am getting is always "There is no match
    Your timely help will be much appreciated.
    Regards

    Ram wrote:
    ErasP wrote:
    You are missing a backward slash in the regex
    Pattern p = Pattern.compile("([a-z][a-zA-Z]*)\\s\\1");
    But this will fail in this case.
    Matcher m = p.matcher("Nikhil Nikhil");It is the reason for that *[a-z]*.The OP had [a-z][a-zA-Z]* in his code, so presumably he know what that means and wants that String not to match.

  • Problem with Airport express N (2nd gen)

    Problem with Airport express N (2nd gen)
    Firmware 7.6.4
    ISP - 20 Mbps ethernet cable
    I have MacBook Air 13 mid 2013 os x 10.9.5, ipad 4 ios 8.0.2, ipad4 ios 7.1.2 , iphone 5 ios 7.1.1
    When i try to use speedtest.net from my Macbook i got good results of download speed and incredible upload http://www.speedtest.net/my-result/3801286946 (connection 300 Mbps) , both ipads got terrible speedtest download result and incredible uploadhttp://www.speedtest.net/my-result/i/981631804 (connection 150 Mbps), iphone 5 got bad download and great uploadhttp://www.speedtest.net/my-result/i/981695357.
    All these tests were done near airport express with really good signal and 5ghz. I tried to choose different channels, 802.11 mode, guest ssid, 5ghz ssid ...
    I think that something is wrong with my new airport express. Can anyone help me to solve this problem?
    ps sorry for my bad english

    As a last resort, try a factory default reset on the AirPort Express as follows:
    Power off the AirPort Express
    Wait a minute
    Hold in the reset button first, and keep holding it in for another 8-10 seconds while you simultaneously plug the Express back in to power
    Release the reset button after the hold period and allow a full minute for the Express to restart to a slow, blinking amber light status
    On an iPhone or iPad home screen....
    Tap Settings
    Tap WiFi
    Look for a heading of Setup a New AirPort Base Station. If it appears.....
    Tap on AirPort Express just below the heading to start the configuration process on the Express again
    If you try several factory default resets, and the AirPort Express does not appear under the heading of Setup a New AirPort Base Station, the Express most likely is defective and will need to be replaced.

  • Notation Problems with Logic Express 8

    Hello there,
    I´m a new member here and have a question about a notation problem with Express 8.
    When I´m trying to double measure bars (is this correct? In german we call them "Doppelstriche". They are to divide one part from another... hope anyone understands this), they disappear. I don´t know why, but it happens after about a minute after writing them into the Complete Set... it never happened in Logic 7, it´s a new problem for me...
    I thought that perhaps I pushed a wrong button by accident, but even when I did it correctly, securing everything, locking screensets, it disappeared...
    hope anybody does know anything about this,
    Alex

    We just call them 'double lines' although a double 'bar' line is the thick/thin pair that ends a piece.
    I did a simple test myself, just ran some notes in the Piano roll and got some 'score' to edit and dragged and dropped the double lines in place, no problems. I closed, opened, resaved, and played the 'piece' for a few minutes on loop, nothing went wrong.
    Perhaps I am missing something but i don't seem to be able to see them dissappearing.

  • Problem with Application Express

    Good Morning,
    I installed Oracle Application Express, but I have a problem with the first login and the creation of my workspace.
    During login using the username 'admin' and pwd as the sys's user because until now the only pwd I configure when I installed Oracle Express 10g and Oracle Application Express.
    When I go to login, the page seems not to take any command.
    I look a your help. Thanks

    Check out the {forum:id=137} forum you'll probably get better help there.
    By the way, welcome to the forum! :)

  • Problem with simple chart

    Hi everyone. I've got a problem with ABAP charts. I need to place a simple chart in screen's container.
    REPORT ZWOP_TEST4 .
    Contain the constants for the graph type
    TYPE-POOLS: GFW.
    DATA: VALUES       TYPE TABLE OF GPRVAL WITH HEADER LINE.
    DATA: COLUMN_TEXTS TYPE TABLE OF GPRTXT WITH HEADER LINE.
    DATA: ok_code LIKE sy-ucomm.
    DATA: my_container TYPE REF TO cl_gui_custom_container.
    REFRESH VALUES.
    REFRESH COLUMN_TEXTS.
    VALUES-ROWTXT = 'Salary'.
    VALUES-VAL1 = 50000.
    VALUES-VAL2 = 51000.
    APPEND VALUES.
    VALUES-ROWTXT = 'Life cost'.
    VALUES-VAL1 = 49000.
    VALUES-VAL2 = 51200.
    APPEND VALUES.
    COLUMN_TEXTS-COLTXT = '2003'.
    APPEND COLUMN_TEXTS.
    COLUMN_TEXTS-COLTXT = '2004'.
    APPEND COLUMN_TEXTS.
    Call a chart into a standard container, this function could be used
    for many different graphic types depending on the presentation_type
    field :
    gfw_prestype_lines
    gfw_prestype_area
    gfw_prestype_horizontal_bars
    gfw_prestype_pie_chart
    gfw_prestype_vertical_bars
    gfw_prestype_time_axis
    CALL SCREEN '1000'.
      CALL FUNCTION 'GFW_PRES_SHOW'
        EXPORTING
          CONTAINER         = 'CONTAINER'    "A screen with an empty
                                            container must be defined
          PRESENTATION_TYPE = GFW_PRESTYPE_LINES
        TABLES
          VALUES            = VALUES
          COLUMN_TEXTS      = COLUMN_TEXTS
        EXCEPTIONS
          ERROR_OCCURRED    = 1
          OTHERS            = 2.
    *&      Module  STATUS_1000  OUTPUT
          text
    MODULE STATUS_1000 OUTPUT.
      SET PF-STATUS 'GUI_1000'.
    SET TITLEBAR 'xxx'.
      IF my_container IS INITIAL.
        CREATE OBJECT my_container
          EXPORTING container_name = 'CONTAINER'.
      ENDIF.
    ENDMODULE.                 " STATUS_1000  OUTPUT
    *&      Module  USER_COMMAND_1000  INPUT
          text
    MODULE USER_COMMAND_1000 INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    I created a screen 1000 in SCREENPAINTER, named it 'CONTAINER'. Then I try to launch code above and nothing appears on the screen. Could You give me some tip?

    Hi,
    delete this lines:
    IF my_container IS INITIAL.
    CREATE OBJECT my_container
    EXPORTING container_name = 'CONTAINER'.
    ENDIF.
    then it should work.
    R

  • BIG5 Problem with WebLogic Express 6.1

              Hi,
              I found some problem with Chinese Big5 when using JSP. All big5 code convert in
              a wrong format and can't view by browser.
              My server setting is:
              OS: Solaris 8
              Weblogic: Express 6.1
              JDK 1.3.1
              Anyone know how to solve this problem?
              I have tried different way like creating a new string in different encoding type.
              Actually the BIG5 work fine with Solaris 8, JDK1.2.2_05a and Weblogic 5.1. However
              I WEblogic 6.1 only support JDK1.3 or above. Anyone can help me out. Thanks.
              Pls email me at [email protected]
              

    The download binary is the same for WL Full version and WL Express. It's the
    license that matters. Contact BEA to obtain / buy a WL Express license.
    Ben
    "Rajendra" <[email protected]> wrote in message
    news:[email protected]..
    We have WebLogic 6.1 licensed software. I need to work with WebLogic
    Express.
    I installed on win2K using the installer available with the CD. Now, what
    exactly do I need to do (restricting license..) to work with WebLogic
    Express?
    I need this info urgently. Any help in this regard is greatlyappreciated.
    >
    Thanks
    Rajendra.
    "Michael" <[email protected]> wrote in message
    news:[email protected]..
    Hi.
    WebLogic Express is WebLogic Server with a different license that limits
    some of
    the WebLogic Server features, such as EJB. Downloading WLS effectively
    downloads
    WebLogic Express.
    Regards,
    Michael
    raj wrote:
    Hi,
    does anyone know if it's possible to download weblogic express 6.1 ? icouldn't
    find any link on the bea website.
    thanks
    Raj

  • Problems with EL expressions

    Hi all,
    Actually i have a problem. I am working with Tomcat 5.0.XX and when i create a new web app inside webapp directory and define any jsp with EL expressions, these ones don�t evaluate to theirs values.
    For instance, this is the code of one.jsp:
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html>
    <body>
    <h1>DATAS</h1>
    <table border="5">
    <tr><td><b>NAME:</b></td><td><i><c  ut value="${param.name}"/></td></tr>
    </table>
      When i try
    http://localhost:8080/webDir/one.jsp?name=Charly
    the output is
    NAME: ${param.name}
    In my WEB-INF/lib dir i have placed jstl.jar and standard.jar
    Curiossly, when i put this jsp inside webapps/jsp-examples, all is ok
    Thanks in advance

    This is caused by your web.xml file.
    For backwards compatibility, if you specify web.xml as version 2.3, it disables EL evaluation.
    To fix, you need to update your web.xml with the servlet2.4 header.
    Look at the example one under ROOT to see the new syntax.
    Your web-app tag should look something like this:
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        version="2.4">Cheers,
    evnafets

  • WDK 8.1 update download issue and integration problem with VS Express 2013

    I have VS Express 2013 in my machine and want to download the WDK 8.1 Update. However, I am facing two issues:
    1. The download site says : "You have to register for downloading. Click on continue to register and download". On doing so it asks for what I want to download. Then it redirects to the page saying "Thank You for downloading". However,
    it has been more than 10 times since yesterday and yet no file has popped up for download. It is the same problem with other machines.
    2. On installing WDK 8.1 from softonic, it has created a separate folder and shows no way for its integration with VS express 2013. I do not get any "Windows driver functionalities" in VS Express 2013.
    Could somebody point me where I am wrong.
    Thank You in advance

    Hi codeahead,
    About this (1) issue, could you please tell me where you download the WDK 8.1 Update?
    Generally, I know that we can download the WDK 8.1 Update from the following Microsoft Official site.
    http://www.microsoft.com/en-us/download/details.aspx?id=42273
    So please you check if you download the WDK 8.1 Update from the above link.
    (1) If no, please try to download this WDK 8.1 Update from the above link check this issue.
    (2) If yes, could you please tell me if you register a life user account from this Microsoft?
    Generally, I know that when we download some software from this Microsoft site, we will need to register a life user account.
    So please check if you have a life user account from this Microsoft site.
    However, as you said about the (2) issue. Since it is related to install the WDK 8.1 with VS2013 Express. Since I am not the VS Install experts, so I suggest you can post this issue directly to this VS Install forum:https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vssetup
    , you will get better support.
    Thanks for your understanding.
    Best Regards,
    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.

  • Itunes 7.7 - problem with airport express remote speakers

    I upgraded to 7.7 and when I try to connect to my remote speakers, itunes either does not play or the sound cuts in and out. Anyone have any suggestions?
    Duq

    Having the same problem have 2 Airport Expresses and have problems with one of them locking up and not appearing on itunes or in the airport utility anymore.
    Switching it to ethernet usage to see if that helps or will try factory reseting it next.
    Have already tried hard and soft resets.

  • Problem with airport express extending wifi from extreme

    My setup is an airport extreme wired to the internet with two iMacs connected by wire and an airport express to extend wifi from the extreme to the further parts of my house.  When originally installed about a year ago this arrangement worked perfectly, but I noticed a few weeks ago that neither my iphone, ipad, nor my MBP 13" is connecting to the aitport express anymore and the network extension is not working as intended.
    Last night I investigated the isue and found that the express is connected wirelessly to my extreme because when I wired my MBP to the express and turned off the wireless connection it could still reach the internet.  But, even with the express sitting plugged in next to my iPhone I could not get it to connect to the express - it always uses the extreme and while I'm in range there is no problem.  The problem is that my house is old and the wals tend to cause problems with reception and I can't get wifi in the garden and some parts of the house.
    I have the express and the extreme configured to allow access only by the client macs that I have provided and it looks like the two devices share this information when they are in extend mode (but not sure about that).  When I set up the system I added the aitports mac addresses to the approved list in the access control screen, which seemed to be necessary then though I removed them (the airport mac addresses) fromt he list last night to see what effect this had and biefly the airport did connect to my MBP.  But after returning it to its location where it usually is I have not been able to reconnect to it.
    In brief;  I have an airport express extending an airport extreme wifi, it used to work, but now all wifi clients will only connect to the master.  I have a suspicion that a recent airport update has caused this (both airports are up-to-date) but can't be sure.  I have the express correctly configured to extend the wifi of the extreme as it was originally working.
    One thing I have noticed - I had the express set to use a fixed IP by setting 'static' in the internet screen - this is not the current setting (it's reverted to DHCP) and I cannot force it to update to and remain set to static.
    Does anyone know how I can restore the correct functioning of the express as an extension of the wifi network?
    Thanks
    Damon

    Perform the Factory Default Reset one more time. Hold the reset button until the amber light has been blinking rapidly for 8-10 seconds before you release the reset button
    Run the setup wizard, and wait for screen similar to this to appear, then click on Other Options:
    Select the Add to an existing network option, then click Next and follow the prompts.
    If you are still having difficulty, try running the setup utility on an iPhone or iPad, since Yosemite has a number of bugs in the setup process.

  • Macbook has Problems with Airport Express newtork

    I am using an Airport Express at home. I have my 20" iMac (OS 10.4.11) connected to the network with no problems. When I try to access the network with my Macbook (OS 10.4.10) I have all kinds of problems: I often can not find the network, when I do get onto the I get really slow download speeds (~3 mins for a web page), after waking the Macbook from sleep it can not find the network unless I restart. I even have these problems when the Macbook is right next to the airport (< 1 m).
    I don't believe it is a problem with the Airport because my iMac connects perfectly from about 4 m away through the floor.
    I don't believe it is the Macbook per se because I can connect to any open network without problems.
    It seems to be the odd combination of the Macbook with the Airport.
    Does anyone have any suggestions for addressing this issue?
    Thanks in advance.

    Network
    Plug the AE next to the PLC and connect it to the Ethernet port of the PLC.  Configure the AE to operate in bridge mode.  If your PLC doesn't offer an Ethernet port, use one like the Netgear XAVN2001.  If it's already taken, you will need a 4 port switch.  You will also need a long 3.5mm audio cable if the amp is not in the proximity of the PLC, available from Amazon for under $5.  Finally, create a separate wireless network on the AE.
    Client
    Connect the client to the AE's wireless network, not your existing network.  The client in this case is an iPxd or other computer with iTunes or Airplay/similar PC.
    The above basic configuration works flawlessly in my experience.  If the Client is to distant from the AE's wireless, you can, as a second step, connect it to your existing network, but be forewarned that in this scenario dropouts abound and the AE frequently disappears from view.

  • Problems with simple picture gallery

    I've got a website project where the client wanted a picture
    gallery. I don't really do much with Flash so I went on the web and
    found a tutorial on how to get what I want. Problem is that the
    instructions I followed are fairly old so I couldn't export my
    movie any higher than AS2 and Flash 6 and have it work. That would
    be fine except that I wanted to use a feature that requires Flash 8
    or higher, namely a gradient mask. I was hoping that I could post
    my code and have the board gurus help me out with what i need to do
    to get everything working together.
    First you'll want to create a movie using AS2 and Flash 8 to
    see what I'm trying to accomplish, then export it again with Flash
    6 to see it actually working. You can grab a copy of what I'm
    working with here:
    http://www.technospider.com/~david/rusty.zip
    All help greatly appreciated.
    Thanks,
    David

    based on experience. i didn't check your file.
    you're not likely to get anyone in this forum to check your
    file.
    if there's not code problem, and you can't publish for flash
    8, there will be an error message. if you can publish for flash 8,
    you see no error message but your application fails to work
    correctly, you must have a problem with code.

  • Problem with simple query

    I have a problem with Oracle 10.2.0.5.0 and 11.2.0.1.0. Query result is wrong.
    SELECT t.id
      FROM (SELECT t.ID, MAX(t.nom) AS nom
              FROM (SELECT 2 AS ID, 200 AS nom
                      FROM dual
                    UNION ALL
                    SELECT 3 AS ID, 0 AS nom FROM dual) t
              LEFT JOIN (SELECT 0 AS ID_1, 0 AS nom_1 FROM dual) s
                ON s.id_1 = t.ID
             WHERE t.ID IN (2, 3)
             GROUP BY t.ID
            HAVING MAX(t.nom) != 0) t;Return nothing.
    But on Oracle 10.2.0.4.0 result is correct:
    ID  NOM
    2  200

    Looks like a bug related to ANSI joins.
    Check Oracle Support, maybe it's fixed in 11.2.0.2.
    It works with Oracle join syntax :
    Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
    Connected as dev
    SQL>
    SQL> SELECT t.id
      2    FROM (SELECT t.ID, MAX(t.nom) AS nom
      3            FROM (SELECT 2 AS ID, 200 AS nom
      4                    FROM dual
      5                  UNION ALL
      6                  SELECT 3 AS ID, 0 AS nom FROM dual) t
      7                ,(SELECT 0 AS ID_1, 0 AS nom_1 FROM dual) s
      8           WHERE t.ID IN (2, 3)
      9           AND s.id_1(+) = t.ID
    10           GROUP BY t.ID
    11          HAVING MAX(t.nom) != 0) t;
            ID
             2

Maybe you are looking for

  • Returnable packaging-vendor and customer sides

    Dear Experts, I have searched through the internet as well as on this forum but I was not able to find the information I am looking for. I have the following issue concerning the Returnable packaging process in SAP: I need to gather overall informati

  • Looking for a script exporting pdf files after changing PMS to CMYK colors

    Hello every one, I have lot of files which needs to change in InDesign 1. PMS colors (if any) to CMYK 2. Exportas a specific color profile (GWG_GenericCMYK) To do this I have file names, sizes information in excel sheet. Can I assume with scripts-? N

  • ICR: FBICS1

    Hi Ralph I've made the analysis and what I'v found was that only one position of the document had the "X" on the field "OI management (XOPVW)". And the partner field was empty as the Partner information has just been added in August 2008 and the docu

  • Why will my iphone 4 connect to wifi in the UK but not abroad?

    Hi, I bought a UK unlocked iphone 4 from a colleague of my sister's after my 4s went for a swim. For some reason I can connect to wifi services in the UK but none where I live, in Spain.  I never had this problem with my 4s or the 3G that I had previ

  • Power on with no start up chime by iMAC G5

    I use in addition to my relatively modern iMac that I am typing this up on, a 20" iMac 1.8 GHz G5 (2005, separate iSight) with 2 GB RAM, running Mac OS X Leopard (10.5.8). The system has failed me for the first time today, unexpectedly. It powers on,