2011-08-04 95 views
0

请帮我在水晶报告。合并两列

如: -

VAL 1,VAL 2

我要像: -

VAL 1和2

回答

1

插入一个文本框,然后拖动字段到文本框是你想合并。

1

而是在Crystal Reports合并的字段,你可能只是做它在SQL当您选择数据源:

select Column1 + ' and ' + Column2 
from YourTable 

或者是列数字?
如果是,查询将失败,因为SQL Server试图将“和”添加到数字值。
在这种情况下,您需要将列转换为字符串:

select cast(Column1 as nvarchar(100)) + ' and ' + cast(Column2 as nvarchar(100)) 
from YourTable