繁体   English   中英

在Winforms中单击按钮时,Crystal Reports可以独立导出为pdf和excel吗?

[英]Can Crystal Reports be exported as pdf and excel independently on button click in Winforms

我必须将数据库记录导出到pdf和excel中。导出选项我需要在单独的按钮单击上执行,即如果我单击export2Excel按钮,则excel文件应使用OpenWithSaveAs Dialogue box生成,反之亦然。 Windows窗体应用程序中不知道。 是否可以在Windows窗体应用程序中使用C#。请帮帮我。

您可以尝试以下代码:

Response.Buffer = false;
Response.ClearContent();
Response.ClearHeaders();
oRpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat,Response,true,"COUNTRIES");

还要在这里这里检查参考。

暂无
暂无

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

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