ASP.NET - Crystal Report Viewer Print Button Not Working In ASP.NET(ASP.NET - Crystal Report Viewer 打印按钮在 ASP.NET 中不起作用)
问题描述
我正在使用 Visual Studio 2008,但水晶报告有问题.当我单击打印按钮时,它会将我带到没有找到页面的弹出窗口.弹出网址是
I am using visual studio 2008 and i am having issue with crystal reports. When i clicks on print button it takes me to the popup with no page found. Popup url is
http://localhost/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer4/html/crystalexportdialog.htm
我已检查该路径上是否存在 crystalexportdialog.htm 文件:C:WindowsMicrosoft.NETFrameworkv2.0.50727ASP.NETClientFilesCrystalReportWebFormViewer4htmlcrystalexportdialog.htm
I have checked that crystalexportdialog.htm file exists on this path: C:WindowsMicrosoft.NETFrameworkv2.0.50727ASP.NETClientFilesCrystalReportWebFormViewer4htmlcrystalexportdialog.htm
这是我在 page_load 事件上的代码.
This is my code on page_load event.
ReportDocument rptDoc = new ReportDocument();
ReportProjectProperties ds = new ReportProjectProperties();// .xsd file name
DataTable dt = DbUtility.GetProjectWorksheets(15);
ds.Tables[0].Merge(dt);
// Your .rpt file path will be below
rptDoc.Load(Server.MapPath("../Reports/report1.rpt"));
//set dataset to the report viewer.
rptDoc.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rptDoc;
谢谢.
推荐答案
我已经解决了这个问题.您还可以在 Crystal Report Viewer 打印/导出按钮在 ASP.NET MVC 应用程序中不起作用
I have solved this issue. you can also see my same comments on this Crystal Report Viewer print/export buttons not working in ASP.NET MVC app
Crystal Report 使用 javascript 文件进行打印,其自身的图像应包含在网站的根目录中.我已经通过在我网站的根目录上创建文件夹解决了这个问题
Crystal Report uses javascript files to print and its own images that should be included on root directory of the website. I have solved this issue by creating folers on root directory of my website
aspnet_client/system_web/2_0_50727/
aspnet_client/system_web/2_0_50727/
并从此路径复制文件夹 CrystalReportWebFormViewer4
and copied the folder CrystalReportWebFormViewer4 from this path
C:WindowsMicrosoft.NETFrameworkv2.0.50727ASP.NETClientFilesCrystalReportWebFormViewer4
C:WindowsMicrosoft.NETFrameworkv2.0.50727ASP.NETClientFilesCrystalReportWebFormViewer4
在我创建的 2_0_50727 文件夹中.现在显示打印图像和打印/导出按钮,打印和导出功能也正常工作.
in 2_0_50727 folder i have created. Now print images and print/export buttons are displayed and also print and export functionality is working fine.
谢谢.
这篇关于ASP.NET - Crystal Report Viewer 打印按钮在 ASP.NET 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ASP.NET - Crystal Report Viewer 打印按钮在 ASP.NET 中不起作用
基础教程推荐
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 如何激活MC67中的红灯 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01