Remove null & empty values

I created a report with multiple fields. I would like to create a generic formula in which it evaluates all the values and if it found a null or empty value it will be replaced by a 'N/A'. I was searching in the forums and I found the following formula
if  (isnull() or ( ='')) then
       "Display the required text"
else
when I tried to use it i had an error that the value must be boolean. Is there is a way where  I can change all the fields as string?? and a assign "N/A"
or
how can I assign a "N/A"to a boolean field??
also  I have approx. 140 fields to evaluate, does the formula can be generic or I will need to create a formula for each variable??
thanks

Usually when Crystal runs across a field that is NULL, it immediately stops executing the formula, unless the field is enclosed within IsNull().  However, I'm not sure if that is the case for a parameter being passed to a function.  So, you may be able to create a function like (Formula Workshop -> Create Custom Functions -> Add; basic syntax):
function DisplayString (inVal as string) as string
if (isnull(inVal) or (inVal ='')) then
  DisplayString = "N/A"
else
  DisplayString = inVal
end if
If Crystal does stop when passing a NULL value as a parameter, then you could code a similar function (without the isnull()), and check the Convert NULL Database Values to Default option on the File -> Report Options panel.
You would need to create one such function for each data type that you want to show "N/A" for, and for data types other than string, convert the value to a string when it is not null.
These functions could then be used in the Display String formula for the field on the report.
The only other way I can think of achieving this would be to base the report(s) on an SQL Command and convert NULL values to "N/A" there.  It might be a bit easier to do in an SQL Command, but probably not a whole bunch.
Or, educate your users that when nothing is printed, it means that it's not applicable! 
HTH,
Carl

Similar Messages

  • Passing null/empty values from a actionscript VO to a Coldfusion ORM object

    This is the situation.
    If you have an actionscript VO that binds to a Coldfusion ORM object via the RemoteClass metadata and some of the values are not set, null, or empty strings and you pass it from Flex to Coldfusion then the Coldfusion deserialization barfs saying the values are not acceptable date values (for type="date") or valid emails (for validation="email") or other such validations, even if required="false" on the property.
    For instance, if you have the following actionscript VO:
    package vo
        [RemoteClass(alias="com.companyname.Person")]
        [Bindable]
        public class Person
            public var person_id:Number;
            public var last_name:String;
            public var first_name:String;
            public var email:String;
            public var created_date:date;
         public function Person() {}
    And you have the corresponding Coldfusion component:
    <cfcomponent displayname="person" output="false"
        alias="com.companyname.Person"
        schema="dbo" persistent="true"
        table="PERSON">
        <cfproperty name="person_id" type="numeric" fieldtype="id" validate="integer" required="true" column="PERSON_ID"/>
        <cfproperty name="last_name" type="string" column="LAST_NAME" required="true"/>
        <cfproperty name="first_name" type="string" required="true" column="FIRST_NAME"/>
        <cfproperty name="email" type="string" validate="email" required="false" column="EMAIL"/>
        <cfproperty name="date_created" type="date" required="false" column="DATE_CREATED"/>
    </cfcomponent>
    Then if you pass the actionscript VO as is to Coldfusion, the deserialization complains that you do not have a valid email or a valid date for date_created.  This is bad, bad, bad.  Essentially if you have a validation of certain types (email being one) or a date property, or probably some other cases, then you essentially can not make it not required, it automatically makes it required because the Coldfusion serializer considers null/empty values as invalid dates or emails.  But the serializer should not care for values that are not required, there has to be a way to pass null/empty values to these data types, but apparently there's not.  If you pass an empty string ("") you still have the same problem.  I know Coldfusion does not have null values, but there has to be a way to do this, otherwise it defeats the purpose of having required="false" and some kind of validation on the property.
    There seems to be two ways around it.  One is to override the implicit setters for the properties on the Coldfusion side and check for 0 length values yourself, then set the property if it is not, or create your own validation routine.  I ended up creating my own validation function since I didn't want to have to write a setter function for everyone of these cases and I can pass back user friendly validation messages.
    Have other people encountered this problem?  How have you gotten around it?  Thanks.

    I realize that I didn't clarify that I am using ColdFusion
    for getting the data. This class was generated by the Create CFC
    wizard in Flex Builder.
    package com.generated
    [Managed]
    [RemoteClass(alias="components.generated.clients.Clients")]
    public class Clients
    public var clientid:Number = 0;
    public var clientfirstname:String = "";
    public var clientlastname:String = "";
    public var clientaddress1:String = "";
    public var clientaddress2:String = "";
    public var clientcity:String = "";
    public var clientstate:String = "";
    public var clientzip:String = "";
    public var clientphone:String = "";
    public var clientemail:String = "";
    public function Clients()
    }

  • Passing null/empty values from Flex to a Coldfusion ORM object

    This is the situation.
    If you have an actionscript VO that binds to a Coldfusion ORM object via the RemoteClass metadata and some of the values are not set, null, or empty strings and you pass it from Flex to Coldfusion then the Coldfusion deserialization barfs saying the values are not acceptable date values (for type="date") or valid emails (for validation="email") or other such validations, even if required="false" on the property.
    For instance, if you have the following actionscript VO:
    package vo
        [RemoteClass(alias="com.companyname.Person")]
        [Bindable]
        public class Person
            public var person_id:Number;
            public var last_name:String;
            public var first_name:String;
            public var email:String;
            public var created_date:date;
         public function Person() {}
    And you have the corresponding Coldfusion component:
    <cfcomponent displayname="person" output="false"
        alias="com.companyname.Person"
        schema="dbo" persistent="true"
        table="PERSON">
        <cfproperty name="person_id" type="numeric" fieldtype="id" validate="integer" required="true" column="PERSON_ID"/>
        <cfproperty name="last_name" type="string" column="LAST_NAME" required="true"/>
        <cfproperty name="first_name" type="string" required="true" column="FIRST_NAME"/>
        <cfproperty name="email" type="string" validate="email" required="false" column="EMAIL"/>
        <cfproperty name="date_created" type="date" required="false" column="DATE_CREATED"/>
    </cfcomponent>
    Then if you pass the actionscript VO as is to Coldfusion, the deserialization complains that you do not have a valid email or a valid date for date_created.  This is bad, bad, bad.  Essentially if you have a validation of certain types (email being one) or a date property, or probably some other cases, then you essentially can not make it not required, it automatically makes it required because the Coldfusion serializer considers null/empty values as invalid dates or emails.  But the serializer should not care for values that are not required, there has to be a way to pass null/empty values to these data types, but apparently there's not.  If you pass an empty string ("") you still have the same problem.  I know Coldfusion does not have null values, but there has to be a way to do this, otherwise it defeats the purpose of having required="false" and some kind of validation on the property.
    There seems to be two ways around it.  One is to override the implicit setters for the properties on the Coldfusion side and check for 0 length values yourself, then set the property if it is not, or create your own validation routine.  I ended up creating my own validation function since I didn't want to have to write a setter function for everyone of these cases and I can pass back user friendly validation messages.
    Have other people encountered this problem?  How have you gotten around it?  Thanks.

    Looks like a known workaround to this issue is to wrap the Flex object in an array.
    The ColdFusion CFC will accept that as an array, with the first an only element being a struct, which is the object you built in Flex.

  • Removing an empty value for a imported table shown in a slicer

    Hi,
    I've imported a table and I've put the related code field in a slicer for a my pivot table. In the slicer I can see an empty box that I want to eliminate. I've tried to apply a filter for original data and powerpivot data from the powerpivot window. Moreover
    I've tried to uncheck the showing elements without data, but unsuccessfully. I've tried to update the imported tables after each applied change but no results.
    Any suggests to me, please? Thanks

    Hi there,
    i'm facing a similar problem which i find it hard to understand.
    1x fact table with 2 columns (to keep it simple):
       + col.1 - id_Division
       + col.2 - Sales_Amout
    1x dimension table with the the Company Business Organization (Departments, Business Units, etc) with 3 columns:
       + col.1 - id_Division
       + col.2 - Business_Unit
       + col.3 - Business_Area
    If i just load these two tables in my PowerPivot, then go to a worksheet and create a pivot table, selecting just the dimension table col.1 to the Values and col.2 to a slicer, i get the correct situation = 10x slicers corresponding to the 10x Business Units
    existing in the table, as you can see in the imagem attached.
    If i create a relationship between the fact table col.1  (id_Divion) with the dimension table col.1 (id_division), and then refresh the same pivot i've just created before, i get an extra empty slicer with no values in it. IS there any reason for this
    to appear?
    Appreciate your kind help and inputs. IF required i can share my workbook in order to get some further help.
    Regards
    Felino ([email protected])

  • Error while trying to assign an empty value

    Hi ,
    In my bpel process i get an error while trying to assign an empty output to a variable. It occurs in assign activity copy operation. What can i do? How can i skip this? Sometimes there may be null /empty values ...below is the error message
    Error in evaluate <from> expression at line "146". The result is empty for the XPath expression : "/ns5:getAccessSwitchResponse/SwitchPortInfo/SwitchID
    Thanks in advance
    Edited by: Turkmen Mustafa on 27.Haz.2011 04:08

    Hi,
    No it is not possible. However this issue is resolved in SOA Suite 11g PS3. Where it uses BPEL WS 2.0 standards.
    Edited by: user9285225 on Jun 27, 2011 4:42 AM

  • How to remove asterix symbol which appears in report for empty values?

    Hi Experts,
    I have designed a querry wherein I am getting all the values correctly. But, for certain cells - I am getting the asterix symbol which the user does not wants.
    Now, how to remove the asterix symbol which appears in report for empty values?
    Thanking you in advance,
    Waiting for your reply,
    With Kind Regards,
    Shreeem.

    check if following thread helps you;
    # in report when null in the cube
    Regards,
    Gaurav

  • System.Exception: null or empty values

    Have designed a 4 part form Using DW MX, ASP.NET C# and MySQL
    and currently getting the below error when moving from one page to
    the next.
    The web.config file is on the server, there are no null or
    empty values, and the key tags match.
    I am new to applicaiton development in DW and am now stuck -
    any suggestions?
    System.Exception: This page has a MM:DataSet, MM:Insert,
    MM:Update or MM:Delete tag with a null or empty value for the
    ConnectionString and DatabaseType attributes.
    Often, such values come from application settings in the
    web.config file. That file might be missing from the server
    executing this page. Or, it might be missing the particular add key
    tags for the database connection this page uses. If you are using
    Dreamweaver, look for the web.config file in the local root folder
    of your Dreamweaver site. Once you find this file, you can either:
    Put this file onto the server that is executing this page.
    Copy the add key tags from the web.config in the local root
    folder of your Dreamweaver site and paste them into the web.config
    file in the server that is executing this page.
    at DreamweaverCtrls.DataSet.DoInit()
    Text

    http://java.sun.com/docs/books/tutorial/uiswing/components/spinner.html#model
    Might be a good start.

  • How to define null or empty value in BAPI function modules?

    Hi,
    I have problem with BAPI functions, where some parameters are mandatory.
    For example: when I try to use HR BAPI's(BAPI_PERSDATA_CHANGE, etc.) I have to insert parameters like SUBTYPE,OBJECTID,LOCKINDICATOR. The PA0002 table that is used from this BAPI doesn't have SUBTYPE, OBJECTID, LOCKINDICATOR, for any of the records that I would like to select.
    So what I tried, was to put a ' ', to indicate that is empty. It returned an error message saying "Make an entry in all required fields". Next tried to put in some values for these fields -- and it returned an error message saying "No data selected from 0002 for this period".
    I also tried to run BAPI_FAMILY_CHANGE that uses data from table PA0021. Here I found some records with  SUBTYPE, OBJECTID fields that were not empty, but LOCKINDICATOR was still missing. So I tried to put LOCINDICATOR value directly in to database (with MS SQL Enterprise Manager).  After that I was able to use BAPI_FAMILY_CHANGE.
    I think that manually inserting data in database is not normal procedure.
    Is there something that I have missed out?
    I mean -- how can I get this to work without inserting data directly in database?
    How can I define null or empty value in BAPI function modules?
    Thank you in advance.
    Best regards,
    Mihail

    Defining an empty value for a parm in a table is easy.
    First get the function's definition from the SAP system
    Second only populate the fields for which you have a value to set
    Third execute the function.
    The JCO takes care of the rest.
    Enjoy

  • How to remove null values from list?

    I had created a list in forms 6i and I am getting list values at run time using add_list_item function. The problem is I am getting null value at end of the list. In the property pallet I kept required yes and set the initial value but it is not removing null value. Can any one help me. Thank you.......

    Hello
    Sorry mis-read question on first reply.
    1. Have you set a default value?
    2. Is this default value still in your list?
    3. What happens if you default the list's value to a value you know exists after you have populated it?
    Cheers
    Q
    Message was edited by:
    Q_STEPHENSON

  • Removing Null values from character string

    Hi All,
    Can i remove NULL values (hexadecimal - 0000) from character string. I am uploading a file from presentation layer (shared server) and getting NULL values in many fields which i want to remove.
    please assist.
    Thanks for you help..
    Regards,
    Mohaiyuddin

    Hi,
    Most likely, nobody needed it, but if anybody in future will need the solution for related problem  - here's solution:
    data: lv_nullchar type xstring value '0'.
    shift lv_xstring right deleting trailing lv_nullchar in byte mode.
    shift lv_xstring left deleting leading lv_nullchar in byte mode.
    This hack deleting null chars in lv_xstring at end file and at begining of file. Works perfect for me, where i also worked with files.

  • Remove null values from query

    Hi All;
    Below is my query and the output and i need to remove null values from the output
    Any help regarding same is much appreciated
    Thanks
    ; WITH CTE AS
    select a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,c.fullname,a.new_mainprogramme_idname,
    a.new_subprogramme_idname,
    a.owneridname,
    a.new_dateofapplication,count(appt.activityid) as NoOfAppointments,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    from opportunity a
    left join contact c on (c.contactid = a.parentcontactid)
    inner join activitypointer ap on ( ap.regardingobjectid = c.contactid )
    inner join appointment appt on (appt.activityid = ap.ActivityId)
    where
    appt.new_didmeetingtakeplace = 1
    and appt.statecode = 1 and
    (a.SCRIBE_DELETEDON is null and c.SCRIBE_DELETEDON is null and ap.SCRIBE_DELETEDON is null and appt.SCRIBE_DELETEDON is null)
    group by a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid, c.contactid,c.fullname,a.owneridname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,
    a.new_dateofapplication,ap.scheduledstart,
    ap.scheduleddurationminutes
    union
    select a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,c.fullname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,a.owneridname,
    a.new_dateofapplication,count(appt.activityid) as NoOfAppointments,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    from opportunity a
    left join contact c on (c.contactid = a.parentcontactid)
    inner join activitypointer ap on (ap.regardingobjectid = a.opportunityid)
    inner join appointment appt on (appt.activityid = ap.ActivityId)
    where
    appt.new_didmeetingtakeplace = 1
    and appt.statecode = 1 and
    (a.SCRIBE_DELETEDON is null and c.SCRIBE_DELETEDON is null and ap.SCRIBE_DELETEDON is null and appt.SCRIBE_DELETEDON is null)
    group by a.opportunityid,a.new_entrypoint_displayname,c.parentcustomerid,c.contactid,a.owneridname,
    a.new_mainprogramme_idname,a.new_subprogramme_idname,
    c.fullname,a.new_dateofapplication,
    ap.scheduledstart,
    ap.scheduleddurationminutes
    CTE2 As
    select opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte.owneridname,
    ac.new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    case when ac.new_businessstartdate > = CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end as PreStartHours,
    case when ac.new_businessstartdate < CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end as PostStartHours
    pp.new_outputs,
    case when po.new_outputsname = 'Pre Start Assist'
    then 'Yes' else 'No' end as Precheck,
    case when po.new_outputsname = 'Business Assist'
    then 'Yes' else 'No' end as Buscheck
    from CTE
    join account ac on (ac.accountid = CTE.parentcustomerid)
    join dbo.new_programmeoutput as po on (CTE.opportunityid = po.new_relatedopportunity)
    join dbo.new_programmeprofile pp on (
    po.new_mainprogrammeid = pp.new_mainprogrammeid and
    po.new_subprogrammeid = pp.new_subprogrammeid
    and pp.new_claimstartdate = po.new_claimdate
    and pp.new_outputsname = po.new_outputsname)
    where (ac.SCRIBE_DELETEDON is null)
    group by opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,ac.new_businessstartdate,new_dateofapplication,NoOfAppointments,
    scheduledstart,new_mainprogramme_idname,new_subprogramme_idname,cte.owneridname,scheduleddurationminutes
    select opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte2.owneridname,
    new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    PreStartHours, PostStartHours,po.new_programmeoutputid,
    case when (new_outputsname) = 'Pre Start Assist'
    then 'Yes' else 'No' end as Precheck,
    case when (new_outputsname) = 'Business Assist'
    then 'Yes' else 'No' end as Buscheck --po.*
    from cte2
    left join dbo.new_programmeoutput as po on (cte2.opportunityid = po.new_relatedopportunity)
    where po.new_claimmonthidname is not null and po.statuscode_displayname = 'claimed'
    group by opportunityid,parentcustomerid,new_entrypoint_displayname,contactid,fullname,
    new_mainprogramme_idname,new_subprogramme_idname,cte2.owneridname,
    new_businessstartdate,new_dateofapplication,(NoOfAppointments),
    PreStartHours, PostStartHours,po.new_programmeoutputid,new_outputsname
    --where new_claimmonthidname is not null --and CTE2.PreStartHours is not null and CTE2.PostStartHours is not null
    Pradnya07

     i need to remove null values from the output
    Hello,
    What exactly do you mean with "remove", to filter the rows out from result set or to replace the null value by an other value e.g. 0? This can be done with the
    ISNULL function:
    ISNULL(case when ac.new_businessstartdate > = CTE.scheduledstart
    then (CTE.scheduleddurationminutes) end, 0) as PreStartHours, ...
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Data Object Fields on MI Client 7.1: Null value instead of empty value

    Hi,
    We are migrating an application from Mobile 7.0 to 7.1 and we don´t know if our Data Objects are missing some configuration, but when a field is sent to MI Client with empty (blank) value, we get this field in the application with a null value instead of an empty value.
    This same application works fine in Mobile 7.0 and when a field with empty value is sent to MI Client, a empty value is get by the application.
    Has anyone any idea?
    Thanks.

    Hi,
    SAP has solved the issue. They told us to add the following parameter in defaults.properties:
    com.sap.tc.mobile.bc.string.trim=false
    Thanks.

  • Report - empty value problem (-)

    Hey
    When I have me report, I have a few fields who are empty but displayed with a '-'.
    Is there any way I could remove this?
    I'm asking because in the report is a link that passes back 3 values together, if one is empty i have a '-' that is passed back.
    Thanks in advance.
    OLI

    You can set the null display value In your report attributes. Look in the "Layout and Pagination" section for "Show Null Values As".

  • How to Remove an Empty spca in Dropdown , data coming from R3

    Hi Frndz..
    There was a Dropdown in my view which is gettiing data from R3, but in the 1st place an Empty Space is coming but this is not the case in R3(in R3 there is no Space).
    Whenever am trying to get the value from that Empty Space is throwiing an Null Pointer Exception,can any one tell me how can i remove this Empty Space in my Dropdown.
    Thanks in Advance
    Rgards
    Rajesh

    Hi
    Thanks for ur prompt reply , in my case am getting the data from R3 to Portal View, suppose in dropdowm if i have 22 element in R3 , these 22 am getting but in addtion am gettiing an empty space in WDP View.
    Am concern to how to remove this empty spce in WDP View, this spcae is not there in R3
    Thnaks in Advance
    Regards
    Rajesh

  • Want to remove the default value of a column in a table

    HI
    I have a table called User_ind. This table columns have default values as 'n' like
    create table user_ind(
    ind_num varchar2(1)
    ,group_allowed varchar2(1) default 'y'
    ,view_allowed varchar2(1) default 'y'
    now i want to remove the default values How can i procede with this.
    Urgent .
    Thanks in advance.
    Chaitanya.

    In Oracle 9i you cannot remove the DEFAULT, you can only change it to null:
    alter table user_ind modify group_allowed varchar2(1) default null
    You can check it using this one:
    select table_name,column_name,data_default
    from user_tab_columns
    where table_name = 'USER_IND'
    Best Regards
    Krystian Zieja / mob

Maybe you are looking for

  • Change IP for 10.5.8 Server

    I need the change the IP address of a 10.5.8 Server. DNS will follow the IP address change. DNS is managed by a Windows '03 Server. I have tried on a test server to use changeip. I have read the threads and the man pages. It seems unbinding a server

  • Unfair blocking of my Skype Account

    Yesterday morning I received a fair usage policy violation warning from Skype. Firstly there is no explanation of why was there a policy violation.  My usage of skype has been the same across the last 3 years.  I have an unlimited subscription for ca

  • Trying to texture my UV map

    Hi, I'm trying to texture my UV map (Maya 2011) but after I'm done painting and I save and use my image as a texture it only shows up in maya as a wire frame. The colors I have been using are in the wire frame so its kind of like im only painting ove

  • Bulkload utility

    hii all, can you tell me what is the Loading Role, Role Hierarchy, Role Membership, and Role Category Data mean in bulkload.! my qustion is 1) Is this used to create roles in oim or for assigining these roles to existing users in oim. 2)my use case i

  • I am trying to create a new Apple password but Apple does not recognize my one and only email so stuck on a merry-go-round. Any suggestions?

    I am trying to create a new Apple password but Apple doe not recognize my one and only email address, so I'm stuck on this merry-go-round. Any suggestions?