The Or operator is not working

I have Crystal Reports XI, and I can't get the Or operator to work in the record selection formula.  I can get each individual line to work, but once I put an Or statement in, nothing shows up in my report.
{CP_ORDLIN.QTY_BO} > 0 Or
{CP_ORDHDR.CODE_STAT_ORD} <> "Q"
Each line works individually, but once I put the Or operator between them, I get nothing.

Hello Rob,
Steve's original question concerned the selection filter:
{CP_ORDLIN.QTY_BO} > 0 OR {CP_ORDHDR.CODE_STAT_ORD} = "Q"
However, Steve's subsequent post has a Where clause:
"CP_ORDHDR"."CODE_STAT_ORD"'Q' AND "CP_ORDLIN"."SEQ_LINE_ORD"=10 OR "CP_ORDLIN"."QTY_BO">0
The latter statement is more restrictive than the former, since the AND operator takes precedence over OR.  For example:
False AND True OR False == (False AND True) OR False == False OR False == False
Boolean algebra is distributive, so
a AND b OR c == (a AND b) Or c == (a OR c) AND (b OR c)
so the second expression above becomes
("CP_ORDHDR"."CODE_STAT_ORD"'Q' OR "CP_ORDLIN"."QTY_BO">0) AND ("CP_ORDLIN"."SEQ_LINE_ORD"=10 OR "CP_ORDLIN"."QTY_BO">0)
(so I used to do this for a living once...)
Since the expression Steve originally asked about was different from the SQL, I wanted to know where the additional AND clause had come from.
Sincerely,
Ted Ueda
ps.  Graham's referring to [Short-Circuit Evaluation|http://en.wikipedia.org/wiki/Short-circuit_evaluation] that Crystal supports.  This is useful if you want to evaluate a condition such as:
(1 / {?x} > 10)
which is problematic if there's a possibility that {?x} can be zero, since that would raise a divide by zero exception.  So you'd write:
({?x} = 0) OR (1/{?x} > 10)
and that's safe, since if {?x} is zero, the right-hand size of the OR would be True and the left-hand size won't have to be evaluated.
This is equivalent to:
If {?x} = 0 Then
    True
Else If (1/{?x} > 0) Then
    True
Else
    False

Similar Messages

  • HT201407 The shake operation is not working on my iPhone, can anyone help me with it plz

    The shake operation is not working on my iPhone, can anyone help me with it plz

    All depnds what your using it for..  If it's an app, may be a delay in the app doing an update to be compaitible with iOS 6.  If its for an Apple app, then you need to check the settings for that specific app.

  • Does the Mac Operating System not work properly with Youtube?

    I noticed that my Messages on youtube are instantly deleted when I comment on some peoples Youtube channels. I don't think its the person that owns the youtube channels doing it because it is deleted almost instantly after I log out. It's very odd and I don't think its youtube censoring my comment because I'm not cursing in the comment and I don't believe cursing is against the TOS on Youtube anyways.
    Another thing I notice is that when I'm on a flash based chatroom that when someone I am talking to has left the chatroom it will still say they are in the chatroom until I click on my friendlist and than they turn red as if they are gone. It is very odd that I am noticing these strange bugs. However the chatroom thing could be a chatroom problem because it might do that on my Windows side which I never checked because I'm usually on that chatroom on my Mac side.

    The Adobe flash version could be checked to see if the system is actually using
    their latest version (see Adobe, not a third party prompt from elsewhere to get it)
    as that may be dated or you may have a newer -and- older Flash, and if so,
    the later one may not be in use. Within OS X you can choose the newer one.
    http://helpx.adobe.com/flash-player.html
    {see the links further down in the above linked page, should you have additional
    Mac OS X problems with Flash player or issues in general with installing it}
    Also, some of youtube can be run in HTML5 and depending on the author, should
    be visible even without a Flash player installed. youtube is a google product and
    they also have a help section for dealing with their content. And browser settings
    may affect how things work. Depending on what browser you use, this varies.
    Good luck & happy computing!

  • I got a iphone 5 but it does not work on my MacBook with Mac OSx 10.5.8  it says i need OSX 10.6.8 but it will not download because I need OSX 10.6 but it would load either. How do I get the older operating system to work with the IPhone5?

    I got a iphone 5 but it does not work on my MacBook with Mac OSx 10.5.8  it says i need OSX 10.6.8 but it will not download because I need OSX 10.6 but it would load either. How do I get the older operating system to work with the IPhone5?

    You don't. Since you have an Intel Mac, buy a Mac OS X 10.6 DVD from the online Apple Store.
    (71894)

  • Multiple operation using the same port does not work

    I am trying to have multiple operations on both ports
    here is my wsdl snapshot
         <portType name="CommonAlerter">
              <operation name="initiate">
                   <input message="client:CommonAlerterRequestInitMessage"/>
              </operation>
              <operation name="StartWait">
                   <input message="client:CommonAlerterRequestInitMessage2"/>
              </operation>
              <operation name="StopWait">
                   <input message="client:CommonAlerterRequestInitMessage3"/>
              </operation>
         </portType>
         <portType name="CommonAlerterCallback">
              <operation name="onResult">
                   <input message="client:CommonAlerterResponseMessage"/>
              </operation>
         </portType>
    I just added two new methods "StartWait" and "StopWait" to the default async. template that got generated when I created a new BPEL Project "CommonAlerter"
    Now I call this BPEL process from another BPEL project
    The three methods I call "initiate", "StartWait" and finally "StopWait" are at different stages in my calling BPEL processes. Although "initiate" gets called first.
    When I debug the calling process instance I get an error on the call to "StopWait" which gets called after "StartWait".
    Here is the error message
    Exception not handled by the Collaxa Cube system.
    An unhandled exception has been thrown in the Collaxa Cube system. The exception reported is: "ORABPEL-08010
    Failed get operation definition.
    Failed to get the WSDL operation definition of "StopWait" in portType "{http://xmlns.oracle.com/CommonAlerter}CommonAlerter".
    Please verify that operation "StopWait" is defined in portType "{http://xmlns.oracle.com/CommonAlerter}CommonAlerter".
    Now I do have this method in my WSDL
    Can some one help.
    My Message part XSD is
         <element name="CommonAlerterProcessInitRequest">
              <complexType>
                   <sequence>
                        <element name="initializeparam" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="CommonAlerterProcessResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="CommonAlerterProcessRequest2">
              <complexType>
                   <sequence>
                        <element name="waittime" type="duration"/>
                   </sequence>
              </complexType>
         </element>
         <element name="CommonAlerterProcessRequest3">
              <complexType>
                   <sequence>
                        <element name="stopargument1" type="string"/>
    <element name="stopargument2" type="string"/>
                   </sequence>
              </complexType>
         </element>

    Here are the steps for multi operation synchronous BPEL process :
    1.     Create a new BPEL process and delete request and response activities.
    2.     Now add the porttype/operation in the BPEL process wsdl.
    3.     Start the Process with a Pick activity and click on Create Instance checkbox. Remove the onAlarm branch as we do not need this. In the onMessage branch specify the name of the operation.
    4. Now add onMessage branches to match the number of operations. The flow for each onMessage branch is different. Just make sure that you create a reply activity at the end with the correct operation chosen. So you might end up having multiple return activities.
    Sometimes, a wsdl with multiple operations might not work as expected if the process version is 1.0. So try changing the process version in case you are not getting the expected results.
    Hitesh

  • I purchased photoshop CS5 for my windows vista operating system. I purchased a canon 7 D some yrs ago no problem. I purchased canon 7D mk 11 in december 2014. The supplied software will not work with vista. Photoshop CS5 will not accept canon7D mk11. Can

    I purchased Photoshop CS5 for my windows vista operating system. I purchased a canon 7 D some yrs ago no problem. I purchased canon 7D mk 11 in December 2014. The supplied software will not work with vista. Photoshop CS5 will not accept canon7D mk11. Can someone please tell me how i process canon 7D mk11 photos ?????. (is it possible to bypass camera raw and open the photo straight into CS5 without using camera raw first. if so how do i do that. if not how do i process pictures).
    Thank you.
    Brian in the UK.

    Photoshop by itself cannot process raw image data. That is why the Camera Raw plug-in was developed. You could try the DNG converter and convert your images to the DNG format and then the Camera Raw that you have would be able to open them. I can't recommend Lightroom because you are using Vista, and Lightroom 5 cannot be used with that operating system. It may be time for you to get a new computer and upgrade your software.

  • Delete operation is not working to delete selected row from ADF table

    Hi All,
    We are working on jdev 11.1.1.5.3. We have one ADF table as shown below. My requirement is to delete a selected row from table, but it is deleting the first row only.
    <af:table value="#{bindings.EventCalendarVO.collectionModel}" var="row"
    rows="#{bindings.EventCalendarVO.rangeSize}"
    emptyText="#{bindings.EventCalendarVO.viewable ? applcoreBundle.TABLE_EMPTY_TEXT_NO_ROWS_YET : applcoreBundle.TABLE_EMPTY_TEXT_ACCESS_DENIED}"
    fetchSize="#{bindings.EventCalendarVO.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.EventCalendarVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.EventCalendarVO.collectionModel.makeCurrent}"
    rowSelection="single" id="t2" partialTriggers="::ctb1 ::ctb3"
    >
    To perform delete operation i have one delete button.
    <af:commandToolbarButton
    text="Delete"
    disabled="#{!bindings.Delete.enabled}"
    id="ctb3" accessKey="d"
    actionListener="#{AddNewEventBean. *deleteCurrentRow* }"/>
    As normal delete operation is not working i am using programatic approach from bean method. This approach works with jdev 11.1.1.5.0 but fails on ver 11.1.1.5.3
    public void deleteCurrentRow (ActionEvent actionEvent) *{*               DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    // Get an object representing the table and what may be selected within it
    ViewObject eventCalVO = dcItteratorBindings.getViewObject();
    // Remove selected row
    eventCalVO.removeCurrentRow();
    it is removing first row from table still. Main problem is not giving the selected row as current row. Any one point out where is the mistake?
    We have tried the below code as well in deleteCurrentRow() method
    RowKeySet rowKeySet = (RowKeySet)this.getT1().getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)this.getT1().ggetValue();
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)cm.getRowData();
    rowData.getRow().remove();
    The same behavior still.
    Thanks in advance.
    Rechin
    Edited by: 900997 on Mar 7, 2012 3:56 AM
    Edited by: 900997 on Mar 7, 2012 4:01 AM
    Edited by: 900997 on Mar 7, 2012 4:03 AM

    JDev 11.1.1.5.3 sounds like you are using oracle apps as this not a normal jdev version.
    as it works in 11.1.1.5.0 you probably hit a bug which you should file with support.oracle.com...
    Somehow you get the first row instead of the current row (i guess). You should debug your code and make sure you get the current selected row in your bean code and not the first row.
    This might be a problem with the bean scope too. Do you have the button (or table) inside a region? Wich scope does the bean have?
    Anyway you can try to remove the iterator row you get
    public void deleteCurrentRow (ActionEvent actionEvent) { DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcItteratorBindings =
    bindings.findIteratorBinding("EventCalendarVOIterator");
    dcItteratorBindings.removeCurrentRow();Timo

  • Why does the new operating system not delete the moved files from their original location - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it

    Why does the new operating system not delete the moved files from their original locations - it seems like an enormous waste of space, time and effort to clean up every file once you've moved it - also, when transferring large amounts of files it becomes a very large problem remembering which files were transferred and which not.

    You're going to need to be more specific, as I'm not quite sure I understand what you're talking about.
    If you're referring to copying from an external hard drive or flash drive, and you want to actually move files rather than copy them, you can hold down the option key to force it to do a "move" rather than a "copy." This is not new behavior, though... the Mac OS has worked this way as long as I can recall (and I've been using it since 1984).
    If you're having a problem with trying to move files from one place to another on a single drive causing them to be copied instead, that is likely because of some permissions issue preventing you from actually being able to move them.

  • The Port : 6001 is not working in the system

    Hi Experts,
    OS   :  AIX 6.1
    SAP :  SAP Netweaver EHP1
    In the OS level the Port : 6001 is not working and giving the out put as...
    pb2adm> telnet abcprdpb2 6001
    Trying...
    telnet: connect: A remote host refused an attempted connect operation.
    Virtual host : abcprdpb2
    As it is the BI java stack system & I configured the SMD & wily in the system. From the BI java stack system the wily agent is not working and it uses the port : 6001.
    Now the issue is regarding to the port : 6001
    when telnet in the same system which is Virtual host : abcprdpb2 is not working and which I have given the output above. It is working when I telnet to the other systems. Please see the output  below...
    pb2adm>  telnet abcprd001 6001
    Trying...
    Connected to abcprd001.
    Escape character is '^]'.
    Connection closed.
    From other system  virtual host : abcprd001
    As I have checked with the firewall team and said it is fine in the system and same us AIX team also. But still port : 6001 issue is not resolved in the Virtual host : abcprdpb2
    Can you please let me know how to open the port : 6001 in the Virtual host : abcprdpb2 and also how we can confirm that port : 6001 is opened or blocked in the Virtual host : abcprdpb2.
    Thanks & Regards,
    Sandeep.

    Hi,
    The both mentioned virtual systems are in different LPAR's (Physical host).
    Already I have checked the /etc/services and looks every thing is fine in the file. I have also checked the file inetd.conf  and I didn't find any thing # on the Telnet.It seems every thing is fine in the both files.
    Can you please look in to it and provide some thing which I have to look in the OS level.
    Thanks & Regards,
    Sandeep

  • LIKE operator is not working in SQL Query in XML file

    Hi Gurus,
    LIKE operator is not working in SQL query in XML template.
    I am creating a PDF report in ADF using Jdeveloper10g. The XML template is as follows
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="catalogDataTemplate" description="Magazine
    Catalog" defaultPackage="" Version="1.0">
    <parameters>
    <parameter name="id" dataType="number" />
    <parameter name="ename" dataType="character" />
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
       SELECT ename, empno, job, mgr from EMP where deptno=:id and ename LIKE :ename || '%']]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="EmployeeInfo" source="Q1">
    <element name="EmployeeName" value="ename" />
    <element name="EMPNO" value="empno" />
    <element name="JOB" value="job"/>
    <element name="MANAGER" value="mgr" />
    </group>
    </dataStructure>
    </dataTemplate>
    if i pass the parameter value of :ename from UI, it doesn't filter. But if I give ename = :ename it retrieves the data. Can anyone help me why LIKE operator doesn't work here?
    Appreciate your help,
    Shyamal
    email: [email protected]

    Hi
    Well for a start, you are doing some very strange conversions there. For example...
    and to_char(a.msd, 'MM/DD/YYYY') != '11/11/2030'
    and to_char(a.msd, 'MM/DD/YYYY') != '10/10/2030'If a.msd is a date then you should e converting on the other side ie.
    and a.msd != TO_DATE('11/11/2030', 'MM/DD/YYYY')
    and a.msd != TO_DATE('10/10/2030', 'MM/DD/YYYY')Also, you may want to take into consideration nothing being input in :P2_ITEM_NUMBER like this...
    AND INSTR(a.item_number,NVL(:P2_ITEM_NUMBER,a.item_number)) > 0Is item number actually a number or char field? If it's a number, you want to explicitly convert it to a string for using INSTR like this...
    AND INSTR(TO_CHAR(a.item_number),NVL(TO_CHAR(:P2_ITEM_NUMBER),TO_CHAR(a.item_number))) > 0?
    Cheers
    Ben

  • SSRS runtime error - The specified operation is not valid

    I found a similar post here, but it didn't solve my problem. so i re-post it.
    i develop a report with vs2008. i have sql 2008 r2 on my local machine. when i preview the report on my local machine all fine. but when i deployed the report to sql 2008 ssrs server, i got "#Error" in my subtotal field. i opened the log file and found the
    error message:
    The specified operation is not valid. , ;
     Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: The specified operation is not valid.
    i used a formular in the expression:
    =Sum(IIf(Fields!flag.Value="S",Fields!Size.Value,0))
    can someone help?
    thanks

    I want to make my problem more clear:
    1. with the original formula: =Sum(IIf(Fields!Fundflag.Value="S",Fields!FundSize.Value,0)) works very well on my local machine with clicking on Preview. Once deploy to server, i got error.
    2.Shahfaisal, your formula works on both side, but not the result i except. because the size field in sp unioned from different source. i only want to subtotal when flag is "S".
    any help will be appreciated!
    Try this
    =Sum(IIF(IsNumeric(Fields!Size.Value)
    AND Fields!flag.Value="S",Fields!Size.Value,0))

  • The update operation is not allowed in the current state of the request

    When users have logged a request through the service manager 2012 portal and they go back in to add user input they sometimes receive a message that says " The update operation is not allowed in the current state of the request." The state of the
    request has not changed it is still Active and has not breached its service level .
    I can't seem to find any information about this error and don't know how to troubleshoot it. Any help and advice would be appreciated.
    Thanks
    Sarah

    ok, so they're adding user comments after creating the service request. looks like this:
    the first thing to check is that the user is added to the default, un-scoped "End User" security role, or the custom end user security role they are added to has a scope that includes all work items. The "user input" field adds a user comment related
    to the SR, so the ability to create user comments is required to use this field.

  • Hi, The Airport Express does not work with iOS 7.0.4, I appreciate your help to resolve this event. Thank you,

    Hi, The Airport Express does not work with iOS 7.0.4, I appreciate your help to resolve this event. Thank you,

    Please locate the model number of the AirPort Express and post back that information.
    The model number is located on the side of the AirPort Express. It begins with an "A" followed by four numbers.
    We are not sure what you mean by "does not work".  Does this mean that the AirPort Express worked at one time and has just recently stopped working?
    Have you installed a newer operating system on your iOS device recently?
    Or, is this a new AirPort Express that you are trying to configure for the first time?
    If yes, what service will the AirPort Express perform on your network?
    Please remember that we cannot see your network, so we only know as much about your problem as you can tell us.

  • Bug: Unhandled Exception: System.IO.IOException: The requested operation could not be completed due to a file system limitation

    Hello, I have a 35GB text file that I'm copying from one folder to another folder via c#
    (I simply open a StreamReader and a StreamWriter and copy line by line (something like sw.WriteLine(sr.ReadLine());)
    If [the destination folder is a "windows compress folder" (right click folder > properties > Advanced > Compress content to save disk space)] then it fails else it works well.
    Any idea how to solve the issue?
    I have windows 8.1 with all latest updates. The ssd is a samsung 850 pro, and I tried on 2 machines, same results.
    So to recap, it seems the issue is with the writing of big files on a compress folder, the reading is fine.
    thanks.
    w
    Error:
    2015.01.08 10:15:27] Unhandled Exception: System.IO.IOException: The requested operation could not be completed due to a file system limitation
    [Err, 2015.01.08 10:15:27] 
    [Err, 2015.01.08 10:15:27]    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    [Err, 2015.01.08 10:15:27]    at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
    [Err, 2015.01.08 10:15:27]    at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
    [Err, 2015.01.08 10:15:27]    at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
    [Err, 2015.01.08 10:15:27]    at System.IO.StreamWriter.Write(String value)
    w.

    Hi w,
    Per my understanding. This is not a C# code issue. I doubt the issue related your OS.
    After search the error info,
    here is a possible solution, please take a look
    “The requested operation
    could not be completed due to a file system limitation.”
    <copied>
    Please use Disk Defragmenter to defrag the NTFS volume on your side, which should fix this issue.
    Please refer to:
    A heavily fragmented file in an NTFS volume may not grow beyond a certain size
    http://support.microsoft.com/kb/967351
    For the limitation of NTFS, please check the following online guide.
    How NTFS Works
    http://technet.microsoft.com/en-us/library/cc781134(WS.10).aspx
    </copied>
    Best of luck!
    Kristin
    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.

  • I downloaded a book in iBooks store.The e-book is not working correct.

    I downloaded a book in iBooks store. Titel: Zeitenzauber from Eva Völler. The e-book is not working correct. There are always errors on most of the pages: error at column, etc. I already downloaded the book again. But still the same problem. Any idea what I can do?

    FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
    Phone: 800-275-2273 How to reach a live person: Press 0 four times
    Hours of Operation: Mon-Fri: 9am-5pm ET
    Email: [email protected]
    How to report an issue with Your iTunes Store purchase
    http://support.apple.com/kb/HT1933
    How to Get a Refund from the App Store
    http://gizmodo.com/5886683/how-to-get-a-refund-from-the-app-store
    Canceling a Digital Subscription
    http://gadgetwise.blogs.nytimes.com/2011/10/14/qa-canceling-a-digital-subscripti on/
     Cheers, Tom

Maybe you are looking for

  • Cannot add new posting period

    Hi All, I get the following message when adding a new posting period : "This entry already exists in the following tables “Posting Period”(OFPR) (ODBC – 2035) [Message 131-183]". We have checked for duplications and inconsistencies in both OFPR and A

  • Application "Icons" no longer showing up in Application Catalog

    We have around 500 "Applications" in our application catalog, and make heavy use of the Application Catalog for user self installations. Additionally, we had painstakingly gone through and added "icons" to every application to show up in Software Cen

  • Cannot recover Windows 8.1 from recovery disks

    Hi I have a Windows 8.1 laptop (recovery disks are for Windows 8, see product details in image 1).  My laptop mouse left click suddenly started acting as right click, the computer froze and started making a noise, and when I restarted it using the po

  • GRC 10 EAM - Unable to assign Firefighter roles to owners

    Greetings SAP gurus, I am currently on a new GRC 10 installation and having issues with the Emergency Access Management (EAM) component previously known as FireFighter or SPM.  Note: We are trying to implement the Firefighter ''Role-Based" Approach.

  • My executable VI runs immediately upon launch. How can I stop this?

    In my application, the operator must enter front panel fields for information such as IP address.  But before that can happen, the VI "auto runs."  Since there is not a valid IP address, the VI starts spewing error messages.  Not cool for a productio