private void button
{
try
{
if(openFileDialog
this
//加載水晶報表
}
catch(Exception error)
{
MessageBox
}
}
可以浏覽你系統內現有的報表實例
using System;
using System
using System
using System
using System
using System
namespace WindowsApplication
{
/// <summary>
/// Form
/// </summary>
public class Form
{
private CrystalDecisions
private System
private System
/// <summary>
/// 必需的設計器變量
/// </summary>
private System
public Form
{
//
// Windows 窗體設計器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 調用後添加任何構造函數代碼
//
}
/// <summary>
/// 清理所有正在使用的資源
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components
}
}
base
}
#region Windows Form Designer generated code
/// <summary>
/// 設計器支持所需的方法
/// 此方法的內容
/// </summary>
private void InitializeComponent()
{
this
CrystalDecisions
this
this
this
//
// crystalReportViewer
//
this
this
this
this
this
this
this
this
this
this
//
// button
//
this
this
this
this
this
this
//
// openFileDialog
//
this
this
//
// Form
//
this
this
this
this
this
this
this
this
this
}
#endregion
/// <summary>
/// 應用程序的主入口點
/// </summary>
[STAThread]
static void Main()
{
Application
}
private void button
{
try
{
if(openFileDialog
this
//加載水晶報表
}
catch(Exception error)
{
MessageBox
}
}
}
}
From:http://tw.wingwit.com/Article/program/net/201311/14646.html