• 设置打印有没有导出功能


    1.设置打印只有打印或者打印及导出功能

            /// <summary>
            /// 药卫模板预览
            /// </summary>
            /// <param name="lstDicCircp">打印单据列表</param>
            /// <param name="dataSource">数据源</param>
            /// <param name="paramater">打印参数,可以为空</param>
            /// <param name="reportInEntity">AR报表实体</param>
            /// <param name="erroMsg">返回错误信息</param>
            /// <returns></returns>
            public bool DemPreview(List<DicCircp> lstDicCircp, Dictionary<string, object> dataSource, Dictionary<string, object> paramater, MzReport.ReportEntity reportInEntity, ref string erroMsg)
            {
                if (lstDicCircp?.FirstOrDefault() == null)
                {
                    erroMsg = "未获取到预览信息";
                    return false;
                }
                if (reportInEntity == null)
                {
                    reportInEntity = reportEntity;
                }
                var PreviewCircps = lstDicCircp.Where(d => d.DcrPrtoptCode == PrintingOpportunity.OnlyPreview.GetHashCode().ToString()).ToList();
                if (PreviewCircps?.FirstOrDefault() != null)
                {
                    foreach (var circpItem in PreviewCircps)
                    {
                        //只打印传MzReport.ToolStripMenus.Print; 打印及导出功能MzReport.ToolStripMenus.PrintAndExport
                        FrmReportPreview.Preview(reportInEntity, circpItem, dataSource, paramater, circpItem.DcrName + "预览", MzReport.ToolStripMenus.PrintAndExport);
                    }
                }
                return true;
            }
    
    

    2.打印窗体位置:程序集CoreX.Components;

    窗体FrmReportPreview

  • 相关阅读:
    Java学习心得16
    Java学习心得15
    Java学习心得14
    Java学习心得13
    Java学习心得12
    Java学习心得11
    Java学习心得10
    Java学习心得09
    Java学习心得08
    JVM垃圾回收
  • 原文地址:https://www.cnblogs.com/yuanshuo/p/12567640.html
Copyright © 2020-2023  润新知