reportviewer打印问题 [英] reportviewer print problem

查看:70
本文介绍了reportviewer打印问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此代码

i have this code

using System;
using System;
using System.IO;
using System.Data;
using System.Text;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.Collections;
using System.Printing;
using System.Printing.Activation;
using System.Windows.Forms;
using System.Web.UI;
using Microsoft.Reporting.WinForms;
using Microsoft.ReportingServices;
using Microsoft.CSharp;
namespace nancymoneytrs
{
    public partial class AccountDetail : System.Web.UI.Page
    {
        string reportPath = "repTransfer.rdlc";
        
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        #region
        protected void ButtonPrint_Click(object sender, EventArgs e)
        {
            ReportViewer rView = new ReportViewer();
            rView.Dock = DockStyle.Fill;
            rView.LocalReport.ReportPath = reportPath;
            rView.Print();
            
        }
        protected void Calendar3_SelectionChanged(object sender, EventArgs e)
        {
        }
        #endregion
    }
}}



我的问题是在rView.Print();
或运行所需的语法

请修复它.

Thanks



my problem is in rView.Print();
or what syntax needed to run

please fix it .

thanks

推荐答案

打印是用户打印报告时发生的事件.您想做什么?您是否希望在报告查看器中显示报告.如果是的话,这是一个示例

http://msdn.microsoft.com/en-us/library/ms252073 (v = vs.80).aspx [
Print is an event that occurs when the user prints the report. What do you wish to do? Do you wish to display the report in the report viewer. If so here is a sample

http://msdn.microsoft.com/en-us/library/ms252073(v=vs.80).aspx[^]


这篇关于reportviewer打印问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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