无法将名称设置为水晶查看器导出 [英] Unable to set name to crystal viewer export

查看:73
本文介绍了无法将名称设置为水晶查看器导出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为visual studio 2010使用水晶报告。在一个网站上,我开发了一个报告,通过水晶报告查看器点击按钮显示。当我尝试使用导出按钮导出时默认显示我的水晶报表查看器的名称或ID。我的Crystal报表查看器名称控件是Reportviewer,它显示名称为Reportviwer.pdf或.xls。我想动态设置名称我该如何实现?提前致谢



代码:

I am using crystal reports for visual studio 2010. In a website I developed a report which get displayed on a button click through crystal report viewer. When I try to export using export button by default it shows name or ID of my crystal report viewer For e.g. My name of Crystal report viewer Control is Reportviewer it displays name as Reportviwer.pdf or .xls. I want to set name dynamically how can I achieve this? Thanks in advance

Code:

ReportDocument cryRpt = new ReportDocument();

string report = "reportLocation";

cryRpt.Load(Server.MapPath(report));

CrystalReportViewer1.ReportSource = cryRpt;

推荐答案

请动态设置ReportViewer.LocalReport.DisplayName属性名称和测试。希望它会有所帮助。
Please set "ReportViewer.LocalReport.DisplayName" property with dynamically name and test. Hope it will help.


我禁用了水晶报表查看器的导出按钮并使用ExportHttpResponse导出
I disabled the export button of crystal report viewer and exported using ExportHttpResponse


这篇关于无法将名称设置为水晶查看器导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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