简体   繁体   English

报告查看器导出和打印事件

[英]Report viewer export and print events

I need to catch the exporting and printing activities of a report viewer because I need to log the username and the time/date of such activity. 我需要捕获报表查看器的导出和打印活动,因为我需要记录该活动的用户名和时间/日期。 I have had a look at the telerik report viewer events and as well as at the standard asp report viewer but I do not see any of the events that may help me in these regards. 我看过telerik报表查看器事件和标准的asp报表查看器,但是我看不到任何可以在这些方面帮助我的事件。

How can I catch the printing and export activity of the report viewer to embed my code: 如何捕获报表查看器的打印和导出活动以嵌入我的代码:

 Utilities.Record_Transaction("Report_xxx-Exported to Excel " + cname, (string)Session["userName"]);

Any hint? 有什么提示吗?

For export you can hide Export control and implement your own adding code you need. 对于导出,您可以隐藏“导出”控件并实现所需的自己的添加代码。 Here is first example of doing this from google: http://dinesql.blogspot.co.uk/2010/05/report-viewer-control-exporting-reports.html 这是从Google进行此操作的第一个示例: http : //dinesql.blogspot.co.uk/2010/05/report-viewer-control-exporting-reports.html

Same approach you can use for printing - How to call print from asp.net on a reportviewer control? 您可以使用相同的方法进行打印- 如何在reportviewer控件上从asp.net调用打印?

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

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