zoukankan      html  css  js  c++  java
  • Ms rdlc 打印

      

      
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using Microsoft.Reporting.WinForms;

    using Microsoft.Practices.EnterpriseLibrary.Data;
    using Microsoft.Practices.EnterpriseLibrary.Common;
    using System.Data.Common;
    namespace Client
    {
        
    public partial class Form3 : Form
        
    {
            
    public Form3()
            
    {
                InitializeComponent();
            }


            
    private void Form3_Load(object sender, EventArgs e)
            
    {   
                
               
                 
                
    this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("RailwayDataDataSet_BridgeList", ReturnData()));
                
    this.reportViewer1.LocalReport .ReportPath=@"D:\铁路\Client\Client\Report1.rdlc";
        
                
    this.reportViewer1.RefreshReport();
                 
    this.reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
              
               
               
            }

          
            
    public DataTable ReturnData()
            
    {
                
    string sql = "select   * from BridgeList";
                Database db 
    = DatabaseFactory.CreateDatabase();
                DbCommand dc 
    = db.GetSqlStringCommand(sql);

                
    return db.ExecuteDataSet(dc).Tables[0];
            }


        }

    }




  • 相关阅读:
    c#中跨线程调用windows窗体控件
    像职业选手样编码:地道Python
    数据挖掘笔记 第一章:引言
    SVN使用教程(基于SAE)
    常用的js函数
    linux服务之tuned
    PHP 开启短标签
    如叶梦想!
    分布式控制系统Git学习
    LabVIEW(十六):多列列表框控件
  • 原文地址:https://www.cnblogs.com/gwazy/p/987758.html
Copyright © 2011-2022 走看看