Null Value in Crystal reports

Dear all,
I have a SQL report created in SAP, which has "where " condition to only show records having null in a field.
i.e.
Select  Field1, Field2, Field3
from T0
where Field1 is null
The query works fine in SAP and SQL server management studio.
I am trying to create the report in Crystal reporter, but the syntax of Null is not accepted.
I have tested that
Field1=""
Isnull(Field1)=True
Isempty(Field1)=True
Those records with no value in the field just didn't display ...
What is the right Syntax to use?
Many thanks
Yang

Hi Gordon and Mark,
Thank you for both of your suggestions.
At the end, I found out that "convert Null to default" had been ticked in report options. I unticked it, and isnull() condition worked.
But I was surprised that with the option ticked the conditions of "equal to 0/""/" " "all didn't work ...
Many thanks
Yang

Similar Messages

  • Suppressing NuLL values in Crystal Report

    Hi....
    I m facing a problem,i use asp.net and  I have designed a Crystal Report.I had to place Text Objects in the the details section along with the corresponding Records from Database as per the Reports Design needed. Now i want that the NULL values in the report should be suppressed and should be disappeared  along with the static Text Objects. Like as it happens in Grid view in ASP .net
    Please Help me to solve this issue..
    Thank you

    I think i have been able to do it with little compliated suppress logic.
    When i design the report this is how it looks in design mode:
    Line1  Field1
    Line2  Field2
    Line3  Field3
    and when Field 2 is null or contains a blank string the output should look like:
    Line1  Field1
    Line3  Field3
    1. Initially just design the text fields and db fields without any suppress.
    2. Check Suppress for Line 2 and use the formula: isnull({Table.Field2}) . Do nothing to Field2. This should suppress Line2 when Field2 is null, you can also add StrCmp({Table.Field2}, "") = 0 for checking blank strings.
    3. Now copy Object Line3 and Field3 and place on top of Line2 and Field2 respectively so that their positions match. Let these newly copied objects be Line3_1 and Field3_1 respectively.
    4. Line3_1 and Field3_1 should be suppressed if Field2 contains a non null value. So for both of them Click Suppress checkbox and add the following in the format formula editor not isnull({Table.Field2})
    5. If Line3_1 and Field3_1 are visible = Field2 is null\empty -> Line3 and Field3 should be suppressed or the output would be like:
    Line1 Field1
    Line3 Field3
    Line3 Field3
    So to remove the duplicate:
    For both of them Click Suppress checkbox and add the following in the format formula editor isnull({Table.Field2})
    Hope this helps. I will see if I can attach a sample report based on xtreme here.

  • Display null values in crosstab report.

    I have a crosstab that will be sparsely populated.  The datatype of the cells in the crosstab are numeric.  I would like to have the cells that contain no data to have no value, but Crystal Reports inserts a zero there instead.
    Is there anyway to tell CR that I want nulls to be treated as nulls and not zeros?
    Thanks.
    Regards,
    Thanh

    There is a Display String formula for fields, accessed by right-clicking the field and selecting Format Field.  This is used to tell Crystal exactly what should be displayed for the field.  Add the following logic (basic syntax):
    if CurrentFieldValue = 0 then
      formula = ""
    else
      formula = cstr(CurrentFieldValue, "0.00")
    end if
    This will cause all zero values to display as blank.  I added the "0.00" parameter to the cstr() function to show that's how you tell cstr() how you want the number formatted.  See the online help for cstr() for details.
    HTH,
    Carl

  • Passing Value from Crystal Report (special function) to Business View parameter

    Friends,
                 Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
    Eg : CurrentCEUsername (func in crystal report)-- gives login user  which i should pass to parameter in a Business view (used in the same report).
    Will be able to explain more if required.
    Thanks in Advance,
    Bharath

    I guess you got the picture wrong.  User_id is not a report_level parameter .
    In Data Foundation, below query is used..
    select Acc_Number, Account_Group,User_id  from Accounts where user_id={?User_id}
    where in {?User_id}  is the BV parameter...
    The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
    How do i pass the CurrentCEUsername to {?User_id}
    Value should ve CurrentCEusername always. so that query will be
    select Acc_Number, Account_Group,User_id  from Accounts where user_id=CurrentCEusername
    It will restrict the data pulled from DB to BV .. right?

  • How to assign a variable value to crystal report viewer formula with CR2008

    Hi ,
    I am using crystal reports 2008 and i am not able to find how to assign  variable value  to crystal report viewer formula.
    In CR 8.5 , i used to have crystalreport1.Formulas(0) = variable1
                                             crystalreport1.Formulas(1) = variable2
    but, i don't find similar kind  in crystal reports 2008.
    How can i achieve the same functionality using crystal reports 2008.
    Thanks in Advance
    Regards,
    Ramnath

    Hi,
    Can i anyone help me out with this.
    I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
    CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
    CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
    CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
    Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
    Any code snippet would be of great Help.
    Thanks in Adnvance.
    Ramnath

  • Range Value in Crystal Report

    Hello Experts,
    I want to include a range value in crystal report. Currently the report is used for printing AR invoice with one invoice at time, wherein user inputs invoice number which he wants to print. I want to include invoice number range in the report, but that option is disabled in the parameter field. In present report Invoice number is taken as static value and then connected to db to get the data of that AR invoice number, advise how to
    - Activate "Allow Range Value option"
    - How to set up the multiple invoice printing
    Setup details : SBO 2007B, CR 2008, SQL 2005
    Regards
    Deepak

    Hi Deepak........
    Sure........
    Hope your query report is perfect and for Parameter Range goto Report Expert in Tool Bar of the Crystal Report you can find it by yellow coloured Flask Symbol. Click on that and just define the range of parameters........
    Regards,
    Rahul

  • Restricting Null Values in the report

    Hi All,
    I have a aggregated feild displayed in the bottom of the report and sorted on the report on that field to show me top results.
    When I try to run the report, Null values are coming first in the report (Displayed as NaN).
    I want to restrict these null values from the report.
    Please guide me on this.
    Thanks in advance,
    Imtiaz.

    Okay. If you are using sum, you could use the following: <?sum(Petrofac-ECRevenue[.!=''])?>
    ensure that the path to the element is correct. Are you using a syntax like <?sum(current-group()/Petrofac-ECRevenue)?>
    Send me an email to [email protected] with your xml data and RTF if you can't make it work.

  • Freed goods item too in Value in crystal report

    Hi,
    iam invoicing SAP out put in Crystal format, now i required the free goods item  too in value( only in crystal report).
    Pls throw some light on this issue.
    Regards
    Shafique

    you need to total the pricing good and free goods? correct
    you should use manual running totals to calculate the values
    RESET               whileprintingrecords;
                   Numbervar  X := 0;
    CALCULATION          whileprintingrecords;
                   Numbervar  X := x + ;
    DISPLAY               whileprintingrecords;
                   Numbervar  X;
                   X
    im sure you have a group by invoice number in there.
    you will need to create 1 set of the above formulas for each total. (1 pricing, 1 free)
    reset placed in group header or report header dependent on where you want the values displayed
    calculation placed where it should be calc, details usually unless you have a group by goods
    display where you want the values to display in the report.
    the calculation formula may need to use a formula to capture good type

  • How to set Default DateTime values in Crystal Reports 2008

    Hi All,
    I'm using Crystal Reports 2008. I have two fields FromDate and ToDate in reports. While running report, FromDate field should be displayed with CurrentDate + 00:00:00 in the UI and for ToDate it should be displayed with CurrentDate + 23:59:59 format.
    I have tried the below things, But still I want to set CurrentDate + 00:00:00 time in DateTime field.
    "In CR 2008 you would set the time portion to 00:00:00 in this way:
    1) Edit the date/time parameter and look for the 'Default Value' option; it would be blank
    2) Set this to 00:00:00
    This would default the calendar to 12/30/1899 00:00:00. The only worry here is, when you click on the calendar icon you would be presented with the calendar for the year 1899 and it is painstaking to scroll all the way to the current year."
    I found one solution in SAP forum and I have added the below lines in Record Selection formula,
    {@FromDate} = date(@CurrentDate)+time(00,00,00)
    {@ToDate} = date(@CurrentDate)+time(23,59,59)
    When I run the report, I still getting the empty values in the input parameters screen.
    Am I missing anything? Kindly help
    Thanks,
    Ramesh Kumar G.

    See the following for samples:
    Java (Crystal Reports for Eclipse) SDK - Business Intelligence (BusinessObjects) - SCN Wiki
    BusinessObjects Enterprise / SAP BusinessObjects Business Intelligence Platform 4.x Java SDK Applications
    Business Objects / BI Unmanaged Java RAS SDK Sample Applications
    Developer Help Files:
    Crystal Reports SDK
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Getting only Blank Values in Crystal Reports

    Hello Experts,
    I have crystal Reports on top of R/3. I am using table called EKKO, When I dragged the LIFNR (Vendor Number) in the report, It's bringing only blank values, I checked in SAP and it has 7000 records.
    For testing I created report with only this EKKO table, but the same thing, it's bringing only 91(Blank) records, I don't have any conditions or anything in my report.
    We are using Business Objects XI3.1, Crystal Reports 2008.
    Could anyone please help me?
    Thanks
    Ravi

    Yes, I created crystal report with only EKKO table. I haven't used any conditions or any parameter, I just dragged LIFNR (vendor Number) in the report and I see only blank values. When I checked in SAP, I have around 8000 records out of 91 records are blank values. So It is bringing only blank values.
    Thanks,
    Ravi

  • Sum duplicate values in crystal reports XI

    Post Author: Stuart
    CA Forum: Formula
    Hi All
    As you probably know I'm very new to crystal reports.
    Apologies but it seems my previous question was unclear as no one has been able to respond.
    What I need is a formula that can recognise a name in field1 is a duplicate and then the amount in field2 for both rows should be sum together thus creating only one row with the same name in field1 but with the two values sum in field2.
    I've had a look around and I can see how to remove the duplicates but I want to sum the duplicates into one row not two or three, etc.
    Hope to hear from you,
    Kind Regards,
    Stuart

    Post Author: Stuart
    CA Forum: Formula
    Hi
    Thanks for your assistance,
    There could be several duplicates,
    My data will look like as follows;
    Firstname    Surname     Amount
    Thomas       Brown        $100
    Thomas       Brown        $200
    Andrew       Slater          $400
    Andrew       Brown          $100
    Kelly           Smith         $50
    With the formula which I hope you can help me with I would expect the results to be;
    Firstname    Surname     Amount
    Thomas       Brown        $300
    Andrew       Slater          $400
    Andrew       Brown          $100
    Kelly           Smith         $50
    Notice in the above the first and surname have to be unique in order to sum.
    There are alot more names hence I cannot list everything,
    hope you can help me further,
    Kind Regards,
    Stuart

  • Passing formula values to Crystal Reports from c#

    in an old vb 6 application we used to be able to call a function called PESetFomula in the Crystal Reports viewer and pass it the name of the parameter and the value.
    How do we do that now using Crystal Reports for VS 2013. I don't mean to set the criteria just to pass over parameters and values.
    Bill

    Hi Bill,
    Moving the thread to Crystal reports for Visual Studio Space.
    Using the .net SDK you could use the ReportDocument class to pass the parameter values to the report.
    See the sample applications here:
    http://scn.sap.com/docs/DOC-6929
    http://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+.NET+SDK+Samples
    The developer guide and the API reference guide is here.
    http://scn.sap.com/docs/DOC-7824
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Pass querystring parameter value to crystal report

    Post Author: hani1426
    CA Forum: .NET
    Hi all,
    I am new in using crystal reports
    I want to print an invoice with it's items in a crystal report,I have aseparated page which contains a GridView of invoices and it has a hyperlink field column which parse the ID of the invoice to the page of the crystal report
    In my crystal report I am using "Microsoft OLE DB Provider for SQL Server" Connection which connects to my local instance of SQL server express edition and then add a "command" to obtain the invoice details
    BUT: when adding a parameter to my command it gives an error which description is: "Must declare the scalar variable @ID"
    please how can I add this parameter
    thanks for any help
    bye

    I responded to your other thread:
    pass parameters from vb.net to crystal report
    Please do not cross post. See the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
    Closing and locking this thread.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How sum values on crystal report?

    hi,
    i want sum same values on my report for example
    for display like this
    page 1
    hi1 = 100
    hi2 = 150
    hi3 = 300
    hi1 = 100
    hi2 = 150
    hi3 = 300
    hi1 = 100
    total of page=1200
    page2 & final page
    hi2 = 150
    hi3 = 300
    hi1 = 100
    hi2 = 150
    hi3 = 300
    total of all = 2200
    i have tryed this:
    sum({total.count})
    but i have the total of values in first page the solution is using this line
    if PageNumber<>TotalPageCount then
    but even using this i get the total of values on first page 
    how can i do that?
    anyone?
    thanks a lot for your help

    You should be able to just drag your running total to the page footer to get it to display for each page.

  • Print Multiple Parameter Value in Crystal Report 2008

    Hello and Hi
    i want to select multiple warehouse  in a pramater , i select and report working but parameter print only first parameter  value on report.how can print all selected values on report

    Hi
    I am assuming you select warehouses  WH1,WH2,WH3,.......
    You have to create a formula in Crystal
    It should look like this
    Join({?YourParamaterName},",")
    Place the formula on your report.
    The last Part of the formula is the "notation break"  between every parameter returned. In this case a >   ,   <
    Return would be WH1,WH2,WH3,.......
    Join({?YourParamaterName},"#")  would return  WH1#WH2#WH3#.......
    Hope you get the idea
    If this solution helps, please rate me.
    Regards
    Burger

Maybe you are looking for