Getting null fields in crystal reports

穿精又带淫゛_ 提交于 2019-12-12 01:31:27

问题


I have a customer name with first name, last name, middle name. I want to concatenate these fields. When I concatenate these fields I am getting some of the fields as null cause as it contains at least one null value field. I have tried with this formula.

{FIRST_NAME}&","&{MIDDLE_NAME}&","&{LAST_NAME}

Ex: I have first name, last name but middle name is null then I am getting entire field as null. Please help me how to resolve this.


回答1:


You'll probably want to wrap each field with a formula to adjust for nulls:

// {@FIRST_NAME}
If Isnull({table.FIRST_NAME}) Then "" Else {table.FIRST_NAME}

Then create a formula to concatenate them

// {@FULL_NAME}
{@FIRST_NAME} + "," + {@MIDDLE_NAME} + "," + {@LAST_NAME}


来源:https://stackoverflow.com/questions/23910950/getting-null-fields-in-crystal-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!