彩票走势图

XtraReport使用教程:如何显示打印预览窗体

原创|其它|编辑:郝浩|2012-11-20 12:00:38.000|阅读 8461 次

概述:本实例显示了使用DevExprese子控件XtraReport如何在打印预览窗体中显示报表的具体方法。

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>

作为2012Visual Studio Magazine读者选择奖金奖报表类金奖获得者,DevExprese子控件XtraReports Suite是一个跨平台报表工具,在Windows Forms、ASP.NET、ASP.NET MVC、WPF、Silverlight、LightSwitch等开发环境下都能有优异的表现。本实例显示了使用DevExprese子控件XtraReport如何在打印预览窗体中显示报表的具体方法。

C#

using System;
using System.Windows.Forms;
using DevExpress.LookAndFeel;
using DevExpress.XtraReports.UI;
// ...

private void Form1_Load(object sender, EventArgs e) {
    XtraReport1 report = new XtraReport1();
    ReportPrintTool printTool = new ReportPrintTool(report);

    // Invoke the Print Preview form modally, 
    // and load the report document into it.
    printTool.ShowPreviewDialog();

    // Invoke the Print Preview form
    // with the specified look and feel setting.
    printTool.ShowPreview(UserLookAndFeel.Default);
}

VB

Imports System
Imports System.Windows.Forms
Imports DevExpress.LookAndFeel
Imports DevExpress.XtraReports.UI
' ...

Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
    Dim report As New XtraReport1()
    Dim printTool As New ReportPrintTool(report)

    ' Invoke the Print Preview form modally, 
    ' and load the report document into it.
    printTool.ShowPreviewDialog()

    ' Invoke the Print Preview form
    ' with the specified look and feel setting.
    printTool.ShowPreview(UserLookAndFeel.Default)
End Sub



标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@cahobeh.cn

文章转载自:慧都控件网

为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP