• [Epicor原创] 如何在Epicor二次开发中 多途径使用 SSRS 报表


    本文为原创,转载请注明:[Epicor原创] - 博客园 - 辉创1989 - 如何在Epicor二次开发中 多途径使用 SSRS 报表

    一、在客户化界面中调用Epicor自带的SSRS报表窗口:

      下面是我在销售订单追踪界面做的一个案列,首先要想在其他功能界面用代码调用Epicor的SSRS窗口,要对比下图添加Dll引用

      

      之后就是我的案例代码:  

    // **************************************************
    // Custom code for SalesOrderTrackerForm
    // Created: 2017-09-27 09:38:35 By 张昭辉 QQ : 929412592
    // **************************************************
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Windows.Forms;
    using Erp.UI;
    using Ice.Lib.Customization;
    using Ice.Lib.ExtendedProps;
    using Ice.Lib.Framework;
    using Ice.Lib.Searches;
    using Ice.UI.FormFunctions;
    //---------------------------------------------------------------//
    using System.IO;
    using Epicor.ServiceModel.Channels;
    using Erp.Adapters;
    using Ice.Adapters;
    using Ice.BO;
    using Ice.UI;
    using Ice.Core;
    using Ice.Contracts;
    using Ice.Proxy.Lib;
    using Ice.Lib.BOReader;
    using Ice.Lib.Report;
    
    public class Script
    {
        // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
        // Begin Wizard Added Module Level Variables **
        private Ice.Core.Session Session;
    
        // End Wizard Added Module Level Variables **
    
        // Add Custom Module Level Variables Here **
    
        public void InitializeCustomCode()
        {
            // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
            // Begin Wizard Added Variable Initialization
            this.Session = (Ice.Core.Session)this.oTrans.Session;
    
            // End Wizard Added Variable Initialization
    
            // Begin Wizard Added Custom Method Calls
    
            // End Wizard Added Custom Method Calls
        }
    
        public void DestroyCustomCode()
        {
            // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
            // Begin Wizard Added Object Disposal
    
            // End Wizard Added Object Disposal
    
            // Begin Custom Code Disposal
    
            // End Custom Code Disposal
        }
    
        public string GetSSRSURL()
        {
            DataSet set = WCFServiceSupport.CreateImpl<BOReaderImpl>(this.Session, ImplBase<BOReaderSvcContract>.UriPath).GetRows("Ice:BO:Company", "Company = '" + this.Session.CompanyID + "'", "SSRSURL");
            if (set.Tables.Contains("Company") && !string.IsNullOrEmpty((string) set.Tables["Company"].Rows[0][0]))
            {
                return (string) set.Tables["Company"].Rows[0][0];
            }
            return "";
        }
    
        private void SalesOrderTrackerForm_Load(object sender, EventArgs args)
        {
            // Add Event Handler Code
            string rptPath = "/EPICOR10/reports/CustomReports/PackJobPic/PackJobPic_Base";
            string url = GetSSRSURL() + "?Report=" + rptPath;
            new EpiSSRSBrowser(rptPath, url).Show();
        }
    }
    查看代码
    博客标明【原创】的文章都是本人亲自编写内容! 如有需要转载, 请标明出处:辉创1989(http://www.cnblogs.com/ahui1989/),届时非常感谢! 文章分享在此,希望我之原创有帮到你们! 如有不足之处也可联系我,以便我们共同探讨! 本人现职为Epicor10 系统 开发维护工作,如有需要可共同探讨相关技术知识及经验总结! QQ:929412592
  • 相关阅读:
    ueditor 视频上传 cookie丢失问题
    asp分块读取解决ueditor 上传文件200K限制问题
    thinkcmf上传到阿里云虚拟主机后报错
    TP5 apache服务器fastcgi模式下rewrite重写
    Nginx实战之反向代理WebSocket的配置实例
    CentOS7安装Supervisor
    webservice发送带有头信息的数据
    分布式系统 杂记
    docker网络学习笔记
    php 跨域处理
  • 原文地址:https://www.cnblogs.com/ahui1989/p/7699599.html
Copyright © 2020-2023  润新知