zoukankan      html  css  js  c++  java
  • FastReport.Net 无限页高(连续纸小票)

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Drawing;
    using System.Data;
    using FastReport;
    using FastReport.Data;
    using FastReport.Dialog;
    using FastReport.Barcode;
    using FastReport.Table;
    using FastReport.Utils;
    
    namespace FastReport
    {
      public class ReportScript
      {                                  
        private float reportTitle1Height;
        private float pageHeader1Height;
        private float groupHeader1Height;
        private float data1Height;  
        private float data2Height; 
        private float groupFood1Height;
        private float pageFooter1Height;
        
        private void Page1_StartPage(object sender, EventArgs e)
        {
          if(Engine.FinalPass)
          {     
            if(Report.GetParameterValue("TitleName").ToString().Contains("并单"))
            {
              Text12.Visible=true;
              Text13.Visible=true;
            }
            Page1.PaperHeight = (reportTitle1Height + pageHeader1Height+groupHeader1Height+data1Height+data2Height+groupFood1Height+pageFooter1Height)/Units.Millimeters+ Page1.TopMargin +Page1.BottomMargin;  
          }
        }
        //报表标题的高度
        private void ReportTitle1_AfterLayout(object sender, EventArgs e)
        {
          reportTitle1Height=ReportTitle1.Height;
        }
        //页眉区的高度
        private void PageHeader1_AfterLayout(object sender, EventArgs e)
        {
          pageHeader1Height=PageHeader1.Height;
        }
        //GroupHeader1的高度
        private void GroupHeader1_AfterLayout(object sender, EventArgs e)
        {
          groupHeader1Height+=GroupHeader1.Height;
        }
        //Data1的高度
        private void Data1_AfterLayout(object sender, EventArgs e)
        {
          data1Height+=Data1.Height;  
        }     
        //Data2的高度
        private void Data2_AfterLayout(object sender, EventArgs e)
        {
          data2Height+=Data2.Height;
         
        }
        //GroupFooter1的高度
        private void GroupFooter1_AfterLayout(object sender, EventArgs e)
        {
          groupFood1Height+=GroupFooter1.Height;
        }
        //页脚区高度
        private void PageFooter1_AfterLayout(object sender, EventArgs e)
        { 
          pageFooter1Height=PageFooter1.Height;              
        }      
      }
    }
  • 相关阅读:
    OGG常用命令
    postgres psql常用命令学习笔记
    oracle DG搭建方式两种总结
    配置rhel系统kdump安装RHEL的debuginfo软件包
    oracle开机自启,监听自启,任意秒crontab
    cx_Oracle.DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded 解决方法
    rhel | centos7上配置python3环境和pip
    shared_pool知识点整理
    记一次性能测试实践3-单接口压测
    我是如何做性能测试-文档收集并深入学习
  • 原文地址:https://www.cnblogs.com/MuNet/p/6952015.html
Copyright © 2011-2022 走看看