繁体   English   中英

可以将Crystal Reports导出到Excel

[英]Crystal Reports Exporting to Excel with Can Grow

我正在使用带有C#的Crystal Reports 2008和Visual Studio 2008。 我在Crystal中使用多个列构建报告,其中一些是叙述性的,可能会很长。 每个领域都有“可以增长”的信息。

我还有一个网页,可通过查看器显示报告,看起来很棒:

Web Page / Crystal Viewer
Date            Narrative                                     Region
08/16/2010      It was a rough day for several Chase          USA
                contenders. Kurt Busch blew an engine, 
                Mark Martin damaged his car early and 
                spent most of the afternoon running 
                outside the top 30, and Jeff Gordon was in 
                the top 10 then he had a flat tire with 47 
                laps to go.

Excel输出示例:

ROW
1 Date          Narrative                                    Region
2 08/16/2010    It was a rough day for several Chase         USA
3               contenders. Kurt Busch blew an engine, 
4               Mark Martin damaged his car early and 
5               spent most of the afternoon running 
6               outside the top 30, and Jeff Gordon was in 
7               the top 10 then he had a flat tire with 47 
8               laps to go.

客户端导出到Excel时会出现问题:“可以增长”叙述列变为多行,而不是我需要的单行。

由于叙述位于多行中,因此该报表无法排序。 我可以通过“仅数据”选项将其导出到Excel,但随后需要用户进行操作才能读取。

有人知道我该怎么做吗? 我知道Crystal Export to Excel不会这样做。

我是SQL / Crystal Developer,对此Web / C#部分知之甚少。 我可以通过C#导出到模板吗? 还是有一些第三方软件可以做到这一点?

我有同样的问题。 一列可能包含回车符,例如:

“-文字1
-文字2
-文字3“

我使用了马克的建议,并试图替换回车。

我使用以下公式代替单元格值:Replace({cell},“ \\ n”,“”);

当我将报表导出到Excel(使用Excel,而不仅是Excel数据)时,它工作得很好。

我本来希望显示诸如“-text1-text 2-text 3”之类的内容(按照上面的示例)。 但是,它甚至更好:如果我在Excel中选择列并启用自动换行文本功能,它将正确显示内容:

“-文字1
-文字2
-文字3“

Crystal字段未选中“可以增长”单选按钮。 这将导致报告不显示所有行。 不过,可以导出到Excel。

假设“叙述”字段是一个数据集行,由于该字段中有回车符,该行已导出到多个Excel行,您是否尝试过在该字段中替换回车符?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM