zoukankan      html  css  js  c++  java
  • FastReport使用

    1、控件、参数赋值

                try
                {
                    FastReport.Report report = new FastReport.Report();
                    string filename = @"C:UsersAdministratorDesktopTemplatedcqzs.frx";
                    report.Load(filename);
    
                    string textBarcode = "ceshi001";
                    FastReport.TextObject pTextPrint = report.FindObject("txtqlr") as FastReport.TextObject;
                    pTextPrint.Text = textBarcode;
    
                    report.SetParameterValue("gyqk", "gyqk");
    
                    report.Show();
    
                }
                catch (Exception err)
                {
                    MessageBox.Show(err.Message);
                }

    2、报表打印

                    FastReport.Report report = new FastReport.Report();
                    string filename = @"C:UsersAdministratorDesktopTemplatedcqzs.frx";
                    report.Load(filename);
    
                    string textBarcode = "ceshi001";
                    FastReport.TextObject pTextPrint = report.FindObject("txtqlr") as FastReport.TextObject;
                    pTextPrint.Text = textBarcode;
    
                    report.SetParameterValue("gyqk", "gyqk");
    
                    report.PrintSettings.ShowDialog = false;      //不弹出打印设置框
                    report.PrintSettings.Printer = "Microsoft XPS Document Writer";   // 设置默认打印机. 
                    report.Print();
    本博客有部分内容来自网络,如有问题请联系:hebeilijianghua@qq.com,并注明来自博客园。
  • 相关阅读:
    Java面试之最常见的十道面试题(超经典)
    hdu 3939(勾股+容斥)
    poj 1845 (逆元 + 约数和)
    hdu 5607 BestCoder Round #68 (矩阵快速幂)
    中国剩余定理
    Math
    (⊙o⊙)…
    lucas定理
    hdu 5600 BestCoder Round #67 (div.2)
    hdu5601 BestCoder Round #67 (div.2)
  • 原文地址:https://www.cnblogs.com/leebokeyuan/p/7510757.html
Copyright © 2011-2022 走看看