Crystal report; Combining rows of data into a single value

前端 未结 3 976
醉酒成梦
醉酒成梦 2021-01-05 10:32

I have a data in rows like this for id 1

id1 a1

id1 b2

id1 c3

id1 d4

id1 e5

I like to combine it as \"a1b2c3d4e5\" into a sin

3条回答
  •  悲哀的现实
    2021-01-05 10:43

    It will depend on the data type for the columns a1-e5 and what you're trying to do with the single value.

    If you're just trying to display the value, you can create a formula that uses Crystal's ToText() function to first convert them to strings and then concatenate them together using '+'.

    ToText({id1.a1}) + ToText({id1.b2}) + ToText({id1.c3}) + ToText({id1.d4}) + ToText({id1.e5})

    You could accomplish the same thing on the DBMS side, also.

    If you can provide more info, we might be able to come up with a better solution.

提交回复
热议问题