ASP.NET - 水晶报表查看器打印按钮不工作在ASP.NET [英] ASP.NET - Crystal Report Viewer Print Button Not Working In ASP.NET

查看:394
本文介绍了ASP.NET - 水晶报表查看器打印按钮不工作在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

<一个href=\"http://localhost/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer4/html/crystalexportdialog.htm\" rel=\"nofollow\">http://localhost/aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer4/html/crystalexportdialog.htm

我已签了crystalexportdialog.htm文件存在这条道路上: C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\ASP.NETClientFiles\\CrystalReportWebFormViewer4\\html\\crystalexportdialog.htm

I have checked that crystalexportdialog.htm file exists on this path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\CrystalReportWebFormViewer4\html\crystalexportdialog.htm

这是我的code在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;

感谢。

推荐答案

我已经解决了这个问题。你也可以看到我对这个相同的注释<一个href=\"http://stackoverflow.com/questions/1898590/crystal-report-viewer-print-export-buttons-not-working-in-asp-net-mvc-app\">Crystal在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

水晶报表使用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:\\ WINDOWS \\ Microsoft.NET \\框架\\ V2.0.50727 \\ ASP.NETClientFiles \\ CrystalReportWebFormViewer4

C:\Windows\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\CrystalReportWebFormViewer4

在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 - 水晶报表查看器打印按钮不工作在ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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