VS2010的水晶报告中的打印按钮和导出按钮不起作用 [英] Print Button and export button is not working in crystal report for VS2010

查看:84
本文介绍了VS2010的水晶报告中的打印按钮和导出按钮不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Every One,



我在asp.net网络应用程序中工作。我在水晶报告中显示记录。但在运行时打印按钮和导出按钮不起作用。我正在使用visual studio 2010.



请给我任何解决方案。它们将如何工作。

Hello Every One,

I am working in asp.net web application. I am showing records in crystal report. but at run time print button and export buttons are not working. I am using visual studio 2010.

please give me any solution. how they will work.

推荐答案

ASP.NET的Crystal Reports工具栏导出和打印功能由javascript函数驱动。您收到的错误是因为服务器上没有javascript文件。

检查此目录路径: aspnet_client\system_web\2_0_50727\CrystalReportWebFormViewer3\JS

您将在虚拟目录所在的父网站下找到 aspnet_client 目录。 CrystalReportWebFormViewer3 目录包含images,html,css和js的子目录。如果服务器没有这些目录或者它们不完整,那么从本地开发服务器复制这些文件以重新创建这些目录和服务器中的文件。



了解更多信息,请看以下链接:

http://forums.asp.net/t /992330.aspx [ ^ ]

http://stackoverflow.com/questions/1898590/crystal-report-viewer-print-export-buttons-not-working-in-asp-net-mvc-app [ ^ ]

水晶报告查看器导出&打印按钮在VS 2008中无效 [ ^ ]



另外请搜索谷歌 [ ^ ]在此论坛中发布任何问题之前。
The Crystal Reports toolbar export and print functions for ASP.NET are driven by javascript functions. The error you are receiving is because the javascript files are not present on the server.
Check this directory path: aspnet_client\system_web\2_0_50727\CrystalReportWebFormViewer3\JS.
You will find the aspnet_client directory under the parent website that your virtual directory is in. The CrystalReportWebFormViewer3 directory contains subdirectories for images, html, css, and js. If the server does not have these directories or they are incomplete then copy these files from your local development server to recreate these directories and the files in your server.

For more information, have a look at following links:
http://forums.asp.net/t/992330.aspx[^]
http://stackoverflow.com/questions/1898590/crystal-report-viewer-print-export-buttons-not-working-in-asp-net-mvc-app[^]
Crystal Report Viewer Export & Print buttons are not working in VS 2008[^]

Also please do search Google[^] before you post any questions here in this forum.


简单地说你可以做一件事。在page_load检查Page.isPostBack事件是true还是false。如果为true则表示将代码加载到crytal报告中。问题将得到解决。



protected void Page_Load(object sender,EventArgs e)

{

if( !Page.IsPostBack)

{

//你在这里代码

}

其他

{

generate-report();

}



}

它对我有用。试试吧
Simply you can do one thing. on page_load check Page.isPostBack event is true or false. If true means put the code to load crytal report. problem will be solved.

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// you code here
}
else
{
generate-report();
}

}
it works for me. try it


这篇关于VS2010的水晶报告中的打印按钮和导出按钮不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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