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];
            }


        }

    }




  • 相关阅读:
    Objective-C-使用NSMutableURLRequest发送POST请求,使用NSJSONSerialization解析JSON字符串
    js showModalDialog打开新的页面给原页面传值问题
    svn2git使用小记
    模拟等待事件row lock waits
    URAL 1994 The Emperor's plan 求组合数 大数用log+exp处理
    struts总结
    URAL 1992 CVS 链表
    android游戏物理引擎开发——粒子系统(三)
    状态模式与上机
    OpenCV——凸包
  • 原文地址:https://www.cnblogs.com/gwazy/p/987758.html
Copyright © 2011-2022 走看看