CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 15th, 2004, 02:53 PM
    cmpgeek's Avatar
    cmpgeek cmpgeek is offline
    Junior Member
     
    Join Date: Mar 2004
    Location: NE georgia USA
    Posts: 5
    cmpgeek is an unknown quantity at this point (<10)
    blocking items dependent on words within a field

    I am sitting here with both my Crystal 8.5 and my SQL guides out and still can not find the answers I am looking for...

    I know that if I want to block an item that starts with a certain phrase I can use the code
    Code:
    --------------------------------------------------------------------------------

    not({item.itm_desc} startswith ["cement","interpore","collagraft","mesh"])
    --------------------------------------------------------------------------------
    ... however, my problem is that the items that I want to block do not START the description... the words are within the description - just not at the beginning of it . I know it is still possible to block items based on those words, but I can not remember how to code the report to do so...

    Also - just to make life a little more interesting - there is 1 item that begins with the word "mesh" that i DO want to show up on this report. is there coding that says something to the effect of "ignore all items beginning with "mesh" EXCEPT item # 54446" ?


    Does anyone have any ideas? Any suggestions would be greatly appreciated...
    __________________
    i run crystal 8.5 on an Oracle 8 database...

    cmpgeek
    Reply With Quote
      #2    
    Old March 15th, 2004, 03:59 PM
    cmpgeek's Avatar
    cmpgeek cmpgeek is offline
    Junior Member
     
    Join Date: Mar 2004
    Location: NE georgia USA
    Posts: 5
    cmpgeek is an unknown quantity at this point (<10)
    i just wanted to let yall know someone gave me the following suggestion in regard to the second question and it worked great:
    Code:
    --------------------------------------------------------------------------------

    If {Item_no}="54446" then {item.itm_desc}={item.itm_desc} elsenot({item.itm_desc}startswith "mesh")
    --------------------------------------------------------------------------------


    i am still searching for the first answer, but at least the second one has been put to rest...

    thanks
    __________________
    i run crystal 8.5 on an Oracle 8 database...

    cmpgeek
    Reply With Quote
      #3    
    Old January 3rd, 2008, 04:06 PM
    Crystal Fire Crystal Fire is offline
    Junior Member
     
    Join Date: Dec 2007
    Posts: 13
    Crystal Fire is an unknown quantity at this point (<10)
    Re: blocking items dependent on words within a field

    TRY

    {item.itm_desc}like ("cement"," interpore",collagraft","mesh")

    Put this in the required field Format editor in the suppress formula box or in the section expert suppress formula box.
    Reply With Quote
      #4    
    Old January 3rd, 2008, 10:12 PM
    JaganEllis JaganEllis is offline
    Member
     
    Join Date: May 2006
    Posts: 324
    JaganEllis is on a distinguished road (20+)
    Re: blocking items dependent on words within a field

    I think you'll need wildcard characters too for Like, i.e.
    "*cement*" etc.

    or look at the InStr() function
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 01:49 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009