将Crystal报表中的两列合并为一个

时间:2015-07-26 09:20:27

标签: c# sql asp.net crystal-reports

我是Crystal Report Development的新手。我有一个数据集,其数据表包含我数据库中各种表的值。对于单值列,我没有问题,他们成功地在报告上显示。这是我的SQL查询:

SELECT Product.Image, Product.Model_No, Order_Detail.Quantity, Product.Title, Order_Detail.Selected_Warehouse, Order_Header.Order_No, Order_Header.Order_Date, " +
                        "Order_Shipping_Detail.Collector_Name, " +
                        "Order_Shipping_Detail.Address_Line + Order_Shipping_Detail.Collector_Number AS shipping " +
                        "FROM " +
                    "Order_Detail INNER JOIN Order_Header ON Order_Detail.Order_Id = Order_Header.Id INNER JOIN Product ON Order_Detail.Order_Product_Id=Product.Id " +
                    "INNER JOIN Order_Shipping_Detail ON Order_Detail.Order_Id = Order_Shipping_Detail.Order_Id " +
                    "WHERE Status=@Status AND Selected_Warehouse=@Selected_Warehouse

最后一部分

Order_Shipping_Detail.Address_Line + Order_Shipping_Detail.Collector_Number AS shipping

是两个字段的串联。但是,我没有理解如何在单个标题下一起显示它们。我在水晶报告中添加了哪个字段才能使其正常工作。

0 个答案:

没有答案