zoukankan      html  css  js  c++  java
  • Crystal Report

    水晶报表工具栏分页按钮响应事件:  

    水晶报表中有自带的分页功能,在设置好每页显示的记录后会自动分页,并自动记录总页数和保存当前页,在工具栏可以通过“首页”“尾页”“下一页”“上一页”和“跳页”进行页面跳转。如果需要自定义分页按钮或需要调用分页实现的方法,可以调用以下的方法。

    CrystalReportViewer1.ShowFirstPage();     //首页  
    CrystalReportViewer1.ShowLastPage();      //末页  
    CrystalReportViewer1.ShowNextPage();      //下一页  
    CrystalReportViewer1.ShowPreviousPage();  //上一页  
    CrystalReportViewer1.ShowNthPage(N);      //跳转到第 N 页
    crystalReportViewer1.GetCurrentPageNumber().ToString();    //获取数据显示的当前页

    设置水晶报表加载时,默认缩放比例:

    在绑定水晶报表数据源crystalReportViewer1.ReportSource之后,设置水晶报表的Zoom属性为0或1或其他数值

    crystalReportViewer1.Zoom(0); //页宽
    crystalReportViewer1.Zoom(1); //整页
    crystalReportViewer1.Zoom(400); //400%
    //...以此类推
    crystalReportViewer1.Zoom(25); //25%

    如果在绑定数据源之前就设置Zoom属性,默认缩放比例可能无效

  • 相关阅读:
    SQL中的数字格式化 (收藏)
    read about用法
    run into用法
    shoot for用法
    take off用法
    英语成语
    bring up用法
    satisfy with用法
    spend用法
    Linux环境进程间通信:共享内存
  • 原文地址:https://www.cnblogs.com/tracine0513/p/3606344.html
Copyright © 2011-2022 走看看