如何将数据从Crystal报表导出到与Crystal报表完全相同的Excel? [英] How to export data from crystal report to excel exactly displayed as in crystal report?

查看:112
本文介绍了如何将数据从Crystal报表导出到与Crystal报表完全相同的Excel?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..

我为用户提供了一个功能,他们可以查看满足其要求的数据(过滤器数据).我已经成功查看了内置水晶报表中的数据.
Visual Studio 2010中内置的水晶报表使用户可以将数据导出到Excel.但是excel中显示的数据并没有完全显示在Crystal报表中.有什么需要做的修改吗?

例如:
在水晶报表中查看:

注册号|登记日期|部门备注|发行人
201201 | 2012年10月17日| ABC | -|约翰

但导出到excel后:

注册号|登记日期|部门备注|发行人
-| 201201 | 2012年10月17日| ABC |约翰

如何将数据导出到与Crystal报表中显示的Excel完全相同的数据?

您的时间的TQ.

hye all..

I have a function for user which they can view the data accroding their requirement (filter data). I have successfully view the data in built-in-crystal report.
The crystal report that is built in the visual studio 2010 enables user to export data to Excel. But the data displayed in excel is not exactly displayed in the crystal report. Is there any modification that need to be done?

For example:
Viewed in crystal report:

Reg.No | Reg.Date | Dept | Remarks | Issuer
201201 | 17/10/2012 | ABC | - | John

but after exporting to excel:

Reg.No | Reg.Date | Dept | Remarks | Issuer
- | 201201 | 17/10/2012 | ABC | John

how can I export the data to excel exactly like displayed in crystal report?

TQ for your time.

推荐答案

可以通过在导出事件期间以编程方式设置参数(即在导出事件集中创建参数@ExportFormat)来解决此问题.此参数取决于导出类型,例如如果要导出到Excel,则设置@ ExportFormat ="Excel".然后,可以使用以下表达式来抑制控件:
It is possible to overcome this problem by setting a parameter programmatically during an export event i.e. create a parameter @ExportFormat and during the export event set this parameter depending on the type of export e.g. if the export taking place is to Excel, set @ExportFormat="Excel". Then the following expression can be used to suppress a control:
if({?@ExportFormat}=''Excel'') then True else False


这篇关于如何将数据从Crystal报表导出到与Crystal报表完全相同的Excel?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆