Select Expert using ISNULL

I am using Crystal Reports XI and I have a table that has customer names with "NULL" values. I am wanting to print all of those records in the table with the NULL value. Can someone help me with this issue.
Thanks Jim

Just to throw my $.02 in, I never turn on the report option to change null values to default. it vastly complecates any other forumla you might want to write in the report, and can cause performance issues under certian circumstances.
I use 'default values for null' in the formula workshop for the select expert, or explicitly in formulas where I need that functionality.
Also, just a picky point, but asing "isnull() = true" is redundant. if the field is null, isnull evaluates to true, and then you're asking if true = true. If it isn't null you're asking if false=true which is clearly false. In cases such as these isnull() alone will suffice.

Similar Messages

  • Discrepancy between Select Expert and SQL Query

    Greetings.  I am having an issue with a report, but I think it's more cosmetic and may not be causing a functional issue...
    When I go into the Report...Select Expert...Record, I see that my criteria for the report is .AND. logic.
    When I go into the SQL Query view, it shows .OR. logic...
    After I verify the database, the SQL query still does not get updated.  Saving and re-opening the report still does not update. 
    Is there any reason this will never match?  Thanks in advance.

    Sorry.  I am on Crystal 12.  Database is SQL 2005.
    I didn't think the detail mattered much, but the select expert shows:
    isnull({NONCONFORMANCE.CLOSED_DATE}) and
    not isnull({NONCONFORMANCE.PRODUCT_ID}) and
    not({NONCONFORMANCE.PRODUCT_ID}= '') and
    not({NONCONFORMANCE.PRODUCT_ID}= ' ')
    SELECT N.NCM_ID, N.NCM_DATE, N.PRODUCT_ID, N.CLOSED_DATE, N.ENTITY_ID
    FROM   NONCONFORMANCE N
    WHERE  N.CLOSED_DATE IS  NULL  AND N.PRODUCT_ID IS  NOT  NULL  AND  NOT (N.PRODUCT_ID='' OR N.PRODUCT_ID=' ') AND N.ENTITY_ID='CHI'
    Now that I look at how the SQL is generated (after cleaning up the statement), it's the negatives that got me.  I originally had a problem with the report that was pulling back blanks and spaces.  I made changes and I didn't pay close enough attention to what exactly changed in the SQL...  It appears to be the way the logic in the Select Expert is converted to SQL.
    I just need to start using Command more often and write my own SQL instead of using the Select Expert!!!

  • Crystal Reports XI:  Using Wilcards with the Select Expert

    I have a field with 10 numbers.  There are several of them that start with three numbers and end in all zeros.  I want to make sure these are not in my report.  I have been successfully able to do this using the select expert, but it requires a lot of manual entry:
    {@Phone Number} <> "4090000000" and
    {@Phone Number} <> "2810000000" and
    {@Phone Number} <> "8320000000" and
    {@Phone Number} <> "5120000000" and
    {@Phone Number} <> "9999999999" and
    {@Phone Number} <> "9760000000" and
    {@Phone Number} <> "9360000000" and
    {@Phone Number} <> "6010000000" and
    {@Phone Number} <> "8150000000" and
    {@Phone Number} <> "7130000000"
    I need to find a way to do this without having to enter each code by itself.  I tried using a wilcard, but it appears that I am not using it correctly.
    {@Phone Number} <> "***0000000"
    Please help.  Thanks!

    Nevermind   Just needed a simple: 
    not ({@Phone Number} like "*0000000")

  • CRViewer XI R2 Select Expert error when using dates

    I am using RDC.  CR XI R2 w/ SP2/3.  When I open any report with dates in the output and then use Select Expert and choose a date from the browse or dropdown list I get an error.
    "Error - the ) is missing"
    -Thanking you in advance.... Brent
    Edited by: Brent Lawrence on Jun 11, 2008 2:15 PM
    Edited by: Brent Lawrence on Jun 11, 2008 2:18 PM

    Hello Brent,
    I'm sorry the RDC viewer and the Select Expert do not meet your expectations.  The RDC was deprecated with the release of Crystal Reports 10.  Once the RDC was deprecated it stopped receiving development focus for issues like this.  The RDC remained available for two more versions (XI / XI R2) but it has now been retired with the release of CR 2008 a few months ago.
    I'm surprised to hear that the Select Expert wasn't showing this issue in CR XI (v11.0), unfortunately I won't be able confirm this.
    If you want to roll back to the viewer for CR XI (v11.0) you have to roll back entirely to work with CR XI (v11.0).  You should not mix versions of DLLs (e.g crviewer.dll v11.0 and craxdrt.dll v11.5).  This may work, but it would not be supported for any issues you might encounter.  You indicated in your post that you moved to CR XI R2 (v11.5) to get past another issue that was resolved in CR XI R2, so rolling back entirely won't be a solution.
    With the retirement of the RDC the recommended upgrade path for Windows application development is to move to the Crystal Reports .NET SDK.  The Crystal Reports .NET SDK is available in CR XI R2 so if you want to explore this SDK as well you can visit the online developer library for additional information.  Here's the link:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
    Sincerely,
    Dan

  • Using Select Expert Criteria in a Report Title

    Post Author: kevinday17
    CA Forum: Formula
    Hello,
    I can't quite figure out how to get a select expert criteria in my report title.
    My title is "Sales by Customer from Jan 1, 2007 to Aug 31, 2007"  but I want to be able to have the dates in that title reflect what the user has given as parameters.
    So if the user selects July 31, 2007 as the end date, I would like the title to reflect that.  I'm less concerned about the format of the date that how to bring it into that text area.
    Thanks,
    Kevin

    Post Author: yangster
    CA Forum: Formula
    oh you are not using parameters to do the date selection (i'm guessing you have a reason for this)simplest way for you to achieve what you want would be to create a couple of formula within your report and use those instead of your hard coded dates@begin_dateDATETIME(2007, 08, 01, 00, 00, 00)@end_dateDATETIME(2007, 08, 31, 00, 00, 00)@report_title"Sales by Customer from "& @begin_date &" to "&@end_datein the selection expert put in{SOP30200.DOCDATE} in @begin_date to @end_dateso if you wanted to modify the start and end range change the values inside the 2 formulas, your report title will reflect the changes but this really should be done with parameters to allow more flexibility (but i leave that up to you to decide)

  • Using Select Expert Inserts Blank Section

    I'm using Crystal Reports XI Developer Edition and it recently started to display some strange behavior. Every time I use the Select Expert to add a parameter, Crystal adds in an empty ghost section. I refer to it as a ghost section because you can see it in preview mode as an unlabeled, blank section between the report footer and the page footer, but when I go into design view it's not there. How can I make this section not appear?

    Hello Mary,
    I can't explain why it would do that but here are some things to try;
    1) Ensure you are patched up with the latest service pack, SP4
    2) Try lowering the screen resolution
    3) Try lowering the hardware acceleration
    4) If you are using dual monitors only use Crystal Reports on the primary
    5) Have someone else try logging onto your machine and see if they receove the same behaviour
    Some questions if the above does not resolve the issue;
    1) Is this happening on other machines?
    2) What Operating System is CR installed on
    3) Could you please detail the exact workflowif the following statement is incorrect > go into the Select Expert, select a field to filter on, select a parameter from the drop down list of values.
    4) What happens if you manually create the record selection formula where field = parameter?
    5) Does this happen with any field type or is limited to a specific type?

  • Select expert - 'A string is required here'

    Post Author: greg_zen
    CA Forum: Formula
    Hi All,
    in select expert I put code like below:
    1)
    '{sp.ContractNo} like {?ContractNo}' 
              where ?contractNo is a parameter declared as a 'string'
    It worked fine with Crystal Enterprise 10 SP3
    After coping all reports and stored procedures to another server and installing SP6  for Crystal Enterprise 10 it stopped working.No idea why.
    So I tried to replace select formula like this:
    2)
    if cstr({?ContractNo})="" or cstr({?ContractNo})="*" or IsNull({?ContractNo}) then True
    first I used it without cstr function but after running there was always 'A string is required here' error message. Adding cstr didn't helped. Still the same.
    Original select was based on 'like' keyword to make it possible to enter starting character or just a part of string.
    As because users in most cases want to select data for all Contracts, select 2) was acceptable or at least I wanted to see anything. No way,
    still the same error 'A string is required here' during the runtime.   
    Any idea what's going on ?
    I'd appreciate any suggestions and comments.
    Regards,
    greg_zen 

    Post Author: SKodidine
    CA Forum: Formula
    For your first formula, why not try with wildcards and see if it works, since you mentioned that the intent was for the user to enter a part of a string?
    Try one of these:
    {sp.ContractNo} like {?ContractNo} & '*'     // for any number of characters
    {sp.ContractNo} like {?ContractNo} & '?'    // for a single character
    For the second (re-write) formula, make sure that the NULL condition is always checked first.
    if IsNull({?ContractNo}) or cstr({?ContractNo})="" or cstr({?ContractNo})="*" then True

  • Boolean value from Select Expert being ignored on some machines?

    Hi,
    We have a fairly simple report which lists open calls within our support system.  The 'open' field is just a boolean true / false value.
    From the 'select expert' in Crystal, I just have this simple formula to only display the records I need:
    {support.open} and
    {status.unique} <> 99.00
    On most of the users PCs, the report displays as it should.  However, on other users the report shows headings but no data.  After some investigation, if I remove the check for the 'open' flag, the report will display records on these PCs, so it seems that on certain computers the boolean flag is being read somehow differently.
    Does anybody have any ideas as to why this may be?

    Need more info. Depending on the version of CR you can use isnull()
    Also check the version of your DB client or MDAC version, may be the cause why it works on some PC's

  • Using ISNULL in CASE statement

    Hi,
    I need to write a query that will gimme the resultsets based on a data comparison with some values, Those values that are null in the result set needs to be replaced with an empty string which can be obtained using ISNULL function. My question here is,
    how to incorporate this in a SELECT statement that has CASE expression. I coded some thing like this but the result set for the column is returning zero instead of an empty string. The data type for this column ABC is varchar(10)
    SELECT top 20
    ABC
    ,CASE
    WHEN ABC IN (8,9,10,13,14,15,16,17,19,20,21) THEN 10
    WHEN ABC IN (31,32,33) THEN 30
    WHEN ABC IN (53,52,54,55) THEN 50
    WHEN ABC IN (61,62) THEN 60
    WHEN (ABC IS NULL AND DEF IS NOT NULL) THEN 99
    else ISNULL(ABC,'')
    END
    FROM XYZ
    Any help is appreciated
    Many Thanks,
    Bhanu

    SELECT top 20
    ABC
    ,CASE
    WHEN ABC IN (8,9,10,13,14,15,16,17,19,20,21) THEN '10'
    WHEN ABC IN (31,32,33) THEN '30'
    WHEN ABC IN (53,52,54,55) THEN '50'
    WHEN ABC IN (61,62) THEN '60'
    WHEN (ABC IS NULL AND DEF IS NOT NULL) THEN '99'
    else ISNULL(ABC,'')
    END
    FROM XYZ

  • Select expert and dates

    Post Author: barflyz
    CA Forum: Crystal Reports
    Hi, I am using Crystal 11. I connect to Oracle. My report pulls a date field which displays correctly and can be formatted. However, when I use the select expert and select "equal to", the drop down list does nor display the correct dates stored in this field. Any idea on how to solve this issue? thanks!

    Post Author: SKodidine
    CA Forum: Crystal Reports
    Some sample data might prove useful in understanding what exactly is happening.  Barring that, have you tried clicking on 'Show Formula' in the select expert and then just typing in the date instead of choosing it from the drop down list?

  • Crystal 2008 problem with Record Select Expert

    I had a Crystal 10 report that worked fine where the Record Select Expert had a database table ID equal to a parameter... it was only supposed to report on 1 record.  After using Crystal 2008 on the same report it completely ignores this Select Record Expert setting.  I have tried deleting and re-adding the parameter.  It acts like there is no record select setting.
    Here is the formula that it shows me it is using:    {Components.ID} = {?@ID}
    If I go to the application opening the same record on a different machine using the old crystal, it works fine.
    This used to only show me the 1 record, now it shows me the report on every record in the table.  I tried upgrading the report to a 2008 report and it still does the same thing.  The report filter no longer works.   Do I need to do something different to select only 1 record in 2008 ?
    After installing Crystal 2008 on my computer none of my reports work correctly anymore - all of them are ignoring my Record Select ...they worked fine before I installed 2008.  The reports are older reports... they worked fine when I had Crystal XI R2 installed.  This all started after installing Crystal 2008
    Thanks,
    Jeff
    Edited by: Jeff Dressing on Aug 27, 2008 12:06 PM

    Hello, Jeff;
    I noticed the Record Selection Formula uses a Stored Procedure parameter:
    {Components.ID} = {?@ID}
    A parameter created in the report (not by a stored procedure) would be:
    {Components.ID} = {?ID}
    A report based on a Stored Procedure does not need a Selection formula for the Stored Procedure parameter. Connecting to the Stored Procedure automatically creates the parameter in the report and the value is passed automatically when the report is run.
    Does the report work in the Crystal Reports 2008 designer?
    Open the report in the designer. Go to Database Set Datasource location. Are the properties of the database at runtime still the same as what is saved in the report.
    If the database is different at runtime, just as a test, change to the new database in a copy of your original report. Do a Database|Verify Database. Does it come back the "Database is uptodate" or are there changes?
    Elaine

  • Crystal Report - Title from Select Expert.

    Hi Experts !
    I need some help here. Recently I have build a new crystal on the production analysis. Part of the select expert for record is between posting date A and posting date B.
    Below is the code I uesd for the select expert whereby Posting Date 1 is a parameter with range that I have defined.
    {ODLN.DocDate} = {?Posting Date1}
    I am interested to have this 2 date from the parameter to appear on my report. For example :
    Date: A date till B date.
    I have tried picking up this data from the parameter, but failed to get what I want. Anyone have syntax for this ??
    Best Regards,
    Alex

    Hi Gordon,
    Yeah, I know the syntax to do this. The real problem lies as I have stated on my first post - I want the date that I have entered on the parameter during the filtering process, to appear on the report itself. I have tried it before, but all that appears is only True value, not date.
    So If, I am about to use two parameter date instead of parameter range with selection expert, will I be able to pull the two parameter date into the report, so that I can print it out with the date on the report itself. It's important for the report to have date because not everyone knows the report is from when to when.
    Best Regards,
    Alex

  • Number fields in select expert

    I am currently using Crystal 2008 and I am having issues with numeric values entered in the select expert.
    The record selection criteria that I have entered is
    {HSP_BKT.BKT_ID} in [94633, 94920]
    however, crystal defaults/converts to these numbers with 8 decimal places (.000001)
    {HSP_BKT.BKT_ID} in [94633.00000001, 94920.00000001]
    94633 and 94920 are valid numeric values with data but because crystal is converting it to 94633.000001, I am not getting any records back.
    Any help is very much appreciated.

    You didn't mention the data type of the field.  If it is integer, then one way to work around this might be to define an integer array, put your values in that, and use it in place of the constants.  (Crystal really shouldn't be converting the constants to a decimal in this case, so you might wanna let SAP know about it...)  If it is a floating point type, then you may need to use CInt() to convert the field to integer.
    HTH,
    Carl

  • Select Expert data field

    Post Author: ckaesche
    CA Forum: Older Products
    I am using Crystal 8.5. I'm running a query to find database entry errors in a particular field, i.e. "country", &#91;such as 'britin'&#93; and then correcting the database record.
    Even though the data has been removed from the database, the value listed in the drop down within crystal reports is retained and not reflecting the actual values of the field in the database.  Any suggestions?
    Thanks for any help,  ckaesche

    Post Author: pandabear
    CA Forum: Older Products
    Ok,
        Sorry, when I heard "drop down" I immediately saw "parameter" so "Action" is the wrong direction for you.  
        You don't need the "Select Expert" to see a field.  You can just drag the field on to the report.
        If you know all the valid country names, you can do this:
        Make a formula:  @GoodCountry  -  If UpperCase(table.emp_ad_country) IN ("USA","ENGLAND" etc) Then "" Else table.emp_ad_country
    That way you'll get a complete list of all the countries that are not 'IN' the list (of properly spelled countries).  After the changes,
    you should see the new values when you run (F5) the report again.
    If it doesn't show the changes, you need to check that the database.table.field you are looking at is the same one you are changing.
    Sounds basic, but it's certainly happened (many times) before    
    Hope this helps,
    The Panda

  • Select Expert or SQL Expression Fields help

    I am trying to do something I would consider very simple but can figure it out.
    I have two tables.  FDC_Trips & Facility.  On the report I can get the FDC_Trips.DivertedbyFacility field to populate a number value because that field is an integer.  But we need the name to show up.  That field is the ID (foreign key) of a Facilty which matches with the field Facility.Code.  Instead of it displaying the DivertedbyFacility number/ID I would like it to be able to show the Facility.Name value.  If I place the filed Facility.Name field on my report it is blank. 
    How can I write a where clause to query the Name of the Facility where the Facility.Code = FDC_Trips.DivertedbyFacility?
    Do I use the Select Expert or SQL Expression Fields.
    Please advise.

    Actually you'll use the Links tab in the Database Expert. If CR did it's stupid auto linking thing... delete them. It usually get's it wrong.
    Now just link the fk field in FDC_Trips to the pk field in Facility. Once you have that done you'll be able to simply drop Facility.FacilityName directly onto the report.
    HTH,
    Jason

Maybe you are looking for

  • Win 8.1 forcing switch to online account

    Just installed 8.1.  I'm using local accounts.  I'm not a fan of my business files being uploaded to some SkyDrive location out of my control.  I went to the Windows Store just to look around.  I went to install the first app I saw, Movie Moments or

  • Plsql dynamic region with more than the maximum number of items

    Hi, I need suggestions! :) I have to make a page with many many items. We have a table storing the content of a SQL script, each statement is an individual row in the table. The page I'm trying to make must display each statement in an individual tex

  • Dead Lock occured while Sync index in oracle text

    Hi All, We are facing dead lock issue which syncing the oracle text index . The index is built on the local partitioned table and the sync index has the parameters below, parallel - 4 memory - 20M the error message is, System error: Plsql job executi

  • CREATE TYPE address_type AS OBJECT - ERROR

    I am not able to create type objects tried with different versions of oracle too. Currently I am using Oracle 11g enterprise edition (2.9GB). The problem is when i create a TYPE object and when i terminate the command with a semicolon ';',oracle sql

  • Changing Payment Methods

    Hello, I am wanting to gift a movie to my sister for her new iPad but do not want to use my gift card balance I have loaded. I would like to pay by my credit card for this one transaction. Does anyone know if this is possible or do gift card balances