fumasoft 发表于 2022-12-14 08:57:28

升级版本后JS Viewer提示找不到模版

AR从13升级到15后,前端viewer.openReport提示找不到模版,但是指定的文件夹下已存在模版












index.html:

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <!--Add the references to these files to the target HTML page-->
    <link href="vendor/css/materialdesignicons.min.css" rel="stylesheet" />
    <!--<link rel="stylesheet" href="https://cdn.materialdesignicons.com/2.4.85/css/materialdesignicons.min.css">-->
    <link href="jsViewer.min.css" rel="stylesheet" />
    <link href="../icont/iconfont.css" rel="stylesheet" />
    <script src="jquery.js"></script>
    <script src="jsViewer.min.js"></script>
    <style>
      .exportBox {
            width: 150px;
            background-color: #f1f1f1;
            padding: 5px 0;
            line-height: 30px;
            position: absolute;
            top: 65px;
            z-index: 1060;
      }

      .exportItem {
            padding: 5px 10px;
            list-style: none;
      }

            .exportItem:hover {
                cursor: pointer;
                background-color: #e5e5e5;
            }
    </style>
</head>

<body>
    <!--Add the DIV element that will contain the JSViewer in the target HTML page-->
    <div style="width:100%;height:50px;background:#336699;"></div>
    <div class=theme-default id="viewerContainer">Loading Report</div>
    <input type="hidden" id="atttype" value="mail" />
    <input type="hidden" id="btnShow" value="0" />
</body>

</html>
<!--Add the code that initializes and passes the parameters in the JSViewer instance. The code might vary depending on the technology used to develop the JSViewer component. The example of code for the pure javascript component:-->
<script type="text/javascript">
    var reportName = "", optCodes = "", IsSpecial = false, exportShow = false, FileName = "", accessToken = "", identField = "", Mould = "", timeCount = 0, hostStrats = "", isPhone="";
    var viewer;
    GetUrlParam();
    $(function () {
      window.addEventListener('message', function (e) {
            if (e.data.reportName != "" && e.data.type != "") {
                console.log("监听点击*****************开始生成附件");
                FileGeneration(e.data.reportName, e.data.type, "attach")
            }

      }, false)
    })
    function showReport() {
      console.log("方法返回00!!!", IsSpecial);
      var otReportSendMail = optCodes.indexOf("otReportSendMail") != -1,
            otReportPrint = optCodes.indexOf("otReportPrint") == -1,
            otReportExport = optCodes.indexOf("otReportExport") == -1;
      timeCount = 40;
      if ($("#btnShow").val() == "1")
            return;
      setingBtn(otReportSendMail, otReportPrint, otReportExport)
    }
    function setingBtn(otReportSendMail, otReportPrint, otReportExport) {
      var Tool = $("div").find("div");
      console.log('Tool', Tool)
      if (isPhone == "1") {
            var btnPrintP = document.getElementsByClassName("ef-toolbar ef-toolbar-lt");
            var btnList = $("div").find("button");
            if (btnList.length > 7)
                btnPrintP.removeChild(btnList);
            var btnExport = $("div").find("div");
            if (btnExport != undefined)
                btnPrintP.removeChild(btnExport);
            return;
      }
      if (timeCount > 0 && Tool && Tool.length > 0) {
            if (otReportSendMail || IsSpecial) {
                var GetTool = $("div").find("div");
                GetTool.before("<div class='ef-inline-block ef-dd ef-dd-chevron ef-dd-offset'><buttononclick='openAtion()'class='btn ef-block ef-btn ef-btn-transparent ef-btn-icon ef-rounded' title='写邮件' style='text-align: center;'><span>写邮件</span></button><i style='left: 12px;' class='iconfont iconxitongshezhi-youjian mdi-18px ef-abs-icon ef-pos-top ef-pos-lt'></i></div>");
            }
            var btnPrintP = document.getElementsByClassName("ef-toolbar ef-toolbar-lt");
            if (otReportPrint && btnPrintP != undefined) {
                var btnPrintC = $("div").find("button");
                btnPrintP.removeChild(btnPrintC);
            }
            //移除自带导出
            if (btnPrintP != undefined) {
                var btnExport = $("div").find("div");
                btnPrintP.removeChild(btnExport);
            }

            //添加自定义导出
            if (!otReportExport) {
                var GetTool = $("div").find("div");
                console.log('GetTool', GetTool)
                GetTool.before("<div class='ef-inline-block ef-dd ef-dd-chevron ef-dd-offset' id='exportId'><buttononclick='CreatExport()' class='btn ef-block ef-btn ef-btn-transparent ef-btn-icon ef-rounded' title='导出' style='text-align: center;'><span>导出</span></button><i style='left: 12px;' class='iconfont iconxiazaifujian mdi-18px ef-abs-icon ef-pos-top ef-pos-lt'></i></div>");
            }

            if (!otReportExport && Mould.indexOf("New")==-1) {
                GetTool.before("<div class='ef-inline-block ef-dd ef-dd-chevron ef-dd-offset' id='transknowledge'><buttononclick='TransKnowledge()' class='btn ef-block ef-btn ef-btn-transparent ef-btn-icon ef-rounded' title='转存到知识库' style='text-align: center;'><span>转存到知识库</span></button><i style='left: 12px;' class='iconfont iconxiazaifujian mdi-18px ef-abs-icon ef-pos-top ef-pos-lt'></i></div>");
                GetTool.before("<div class='ef-inline-block ef-dd ef-dd-chevron ef-dd-offset' id='transattachment'><buttononclick='TransAttachment()' class='btn ef-block ef-btn ef-btn-transparent ef-btn-icon ef-rounded' title='转存到单据附件' style='text-align: center;'><span>转存到单据附件</span></button><i style='left: 12px;' class='iconfont iconxiazaifujian mdi-18px ef-abs-icon ef-pos-top ef-pos-lt'></i></div>");
            }
            $("#btnShow").val(1);
      } else if (timeCount > 0) {
            timeCount--;
            setTimeout(function () {
                setingBtn(otReportSendMail, otReportPrint, otReportExport)
            }, 500);

      }

    }
    function CreatExport() {
      if (exportShow == false) {
            exportShow = true
            var Y = $('#exportId').offset().left;
            $("#dropdown-root").append("\<div class=\"exportBox\" style=\"left:" + Y + "px\"><li class=\"exportItem\" onclick = \"exportData('Doc')\" >Word</li ><li class=\"exportItem\" onclick=\"exportData('Pdf')\">PDF</li><li class=\"exportItem\" onclick=\"exportData('Xlsx')\">Excel</li></div >");

      } else {
            removeExport()
      }
    }
    function removeExport() {
      exportShow = false
      $("#dropdown-root").empty();
    }
    function exportData(val) {
      var name = FileName + "." + val;
      name = encodeURI(name);
      switch (val) {
            case "Xlsx":
                //viewer.export('Xlsx', null, true, { FileName: name, Multisheet: false, LayoutMode: "Galley" })
                FileGeneration(FileName, val, "dowlaod")
                break;
            case "Doc":
               // viewer.export('Docx', null, true, { FileName: name, Multisheet: false, LayoutMode: "Galley" })
               FileGeneration(FileName, val, "dowlaod")
                break;
            case "Pdf":
                FileGeneration(FileName, val, "dowlaod")
                //viewer.export('Pdf', null, true, { FileName: name, Multisheet: false, LayoutMode: "Galley" })
                break;
      }
      // FileGeneration(FileName, val, "dowlaod")
      removeExport()
    }
    function InitRepoert(reportName, accessToken, identField, Mould, hostStrats) {
      var key = accessToken + "_" + identField + "_JSONDataUrlDataJSON"
      console.log("key:", key)
      viewer = GrapeCity.ActiveReports.JSViewer.create({
            element: '#viewerContainer',
            availableExports: ['Pdf', 'Doc', 'Docx', 'Xls', 'Xlsx'],
            reportService: {},
            documentLoaded: (res) => {
                showReport()
                $(".gces-rv-params.gces-rv-params-open").css("display", "none");
                console.log("===" + res)
            },
            error: (error) => {
                $(".gces-rv-params.gces-rv-params-open").css("display", "none");
                if (error.message) {
                  alert(error.message);
                }

            }
      });
      console.log("hostStrats:", hostStrats)
      viewer.openReport(reportName, [{ name: 'p1', values: }, { name: 'p2', values: }]);

    }

    function GetUrlParam() {
      getCurrentTime("GetUrlParam 页面加载开始");
      var url = document.location.search.substring(1);
      var arrObj = url.split("&");
      var data = {};
      for (var i = 0; i < arrObj.length; i++) {
            var par = arrObj.split("=");
            data] = par;
            if (par == "reportName") {
                reportName = decodeURI(par);
            }
            if (par == "accessToken") {
                accessToken = decodeURI(par);
            }
            if (par == "identField") {
                identField = decodeURI(par);
            }
            if (par == "Mould") {
                Mould = decodeURI(par);
            }
            if (par == "optCodes") {
                optCodes = par;// "otReportSendMail,otReportPrint,otReportExport"; //par
            }
            if (par == "IsSpecial") {
                IsSpecial = par.toString() == "true";
                console.log("IsSpecial", IsSpecial)
            }
            if (par == "filedName") {
                FileName = decodeURI(par);
            }
            if (par == "hostStrats") {
                hostStrats = decodeURI(par);
            }
            if (par == "isPhone") {
                isPhone = par;
            }
       }
      if (reportName == "") {
            reportName = "未命名.rdlx";
      }
      if (FileName == "") {
            FileName = Mould + identField;
      }
      getCurrentTime("接口请求前时间:");
      $.ajax({
            url: '../Handler1.ashx?action=InitPage',
            data: data,
            ataType: 'json',
            success: function (json) {
                getCurrentTime("接口返回前时间:");
                console.log("JSViewer.create");
                timeCount = 0;
                if (json.toString() == "1") {
                  InitRepoert(reportName, accessToken, identField, Mould, hostStrats)
                }
                if (IsSpecial == false) {//合盛没有发前端版本,要注意
                  if (json.toString() != "1") {
                        alert(json.toString())
                        window.parent.postMessage({ "str": "cyy&stting*$#", action: "closeLoading" }, '*')
                  } else {
                        getCurrentTime("加载完成!!!");
                        window.parent.postMessage({ "str": "cyy&stting*$#", action: "openView" }, '*')
                  }
                } else if (json.toString() != "1") {
                  alert(json.toString())
                }
            },
            error: function (err) {
                alert(err.toString())
            }
      });
    }
    function getCurrentTime(str) {
      var myDate = new Date();
      var mytime = myDate.toLocaleTimeString();   //获取当前时间
      console.log(str + mytime);
    }
    function showTime() {
      debugger
      console.log($(".gces-rv-params.gces-rv-params-open"));

    }
    function openAtion() {
      console.log("打开生成附件类型弹框");
      window.parent.postMessage({ "str": "cyy&stting*$#", action: "open" }, '*')
      $("#atttype").val("mail");
    }
    function TransKnowledge() {
      console.log("打开转存到知识库");
      window.parent.postMessage({ "str": "TransferredToKnowledgeBase", action: "open" }, '*')
      $("#atttype").val("knowledge");
    }

    function TransAttachment() {
      console.log("打开转存到单据附件");
      window.parent.postMessage({ "str": "TransferredToAttachment", action: "open" }, '*')
      $("#atttype").val("attachment");
    }

    function FileGeneration(FileName, type, ActionType) {
      getCurrentTime(ActionType+"请求开始:");
      console.log("请求了", FileName, type, ActionType);
      if (FileName == undefined || type == undefined) {
            return
      }
      $.ajax({
            timeout: 1000 * 60 * 5,
            async: false,
            url: '../Handler1.ashx?action=FileGeneration',
            type: 'POST',
            data: { reportName: reportName, name: FileName, type: type, accessToken: accessToken, identField: identField, Mould: Mould, IsSpecial: IsSpecial, ActionType: ActionType, hostStrats: hostStrats },
            success: function (data) {
                var resource = JSON.parse(data);
                getCurrentTime(ActionType + "请求返回:" + resource);
                var atttype = $("#atttype").val();
                var vuestr = "cyy&stting*$#";
                if (atttype == "knowledge")
                  vuestr = "TransferredToKnowledgeBase";
                if (atttype == "attachment")
                  vuestr = "TransferredToAttachment";
                console.log(vuestr);
               if (ActionType == "attach") {
                  if (resource.Message != "") {
                        window.parent.postMessage({ "str": vuestr, urlId: "", "Message": resource.Message }, '*')
                  } else {
                        var fileurl = resource.urlId.substring(0, resource.urlId.lastIndexOf("_"));
                        var filesize = resource.urlId.substring(resource.urlId.lastIndexOf("_")+1);
                        window.parent.postMessage({ "str": vuestr, urlId: fileurl, size: filesize, name: FileName + "." + type }, '*')
                  }
                } else {
                  if (resource.Message == "") {
                        var arrystr = resource.urlId.substring(0, resource.urlId.lastIndexOf("_"));
                        var url = arrystr; //测试"https://aapi.laifuyun.com/v2/download/" + arrystr
                        //var url = "https://up.fumamx.com/v2/download/" + arrystr//线上
                        console.log(FileName, url);
                        //var arrystr = resource.urlId.split("_");
                        var a = document.createElement('a');
                        a.download = encodeURI(FileName + "." + type);
                        a.href = url
                        document.body.appendChild(a);
                        a.click();
                        document.body.removeChild(a);

                  }

                }
            },
            complete: function (XMLHttpRequest, status) { //请求完成后最终执行参数
                getCurrentTime(ActionType + "请求状态:" + status);
                if (status == "error") {
                  getCurrentTime(ActionType + "二次请求:");
                  $.ajax({
                        timeout: 1000 * 60 * 5,
                        async: false,
                        url: '../Handler1.ashx?action=FileGeneration2',
                        type: 'POST',
                        data: { reportName: reportName, name: FileName, type: type, accessToken: accessToken, identField: identField, Mould: Mould, IsSpecial: IsSpecial, ActionType: ActionType, hostStrats: hostStrats },
                        success: function (data) {
                            var resource = JSON.parse(data);
                            getCurrentTime(ActionType + "二次请求返回:" + resource);
                            var atttype = $("#atttype").val();
                            var vuestr = "cyy&stting*$#";
                            if (atttype == "knowledge")
                              vuestr = "TransferredToKnowledgeBase";
                            if (atttype == "attachment")
                              vuestr = "TransferredToAttachment";
                            console.log(vuestr);
                            if (ActionType == "attach") {
                              if (resource.Message != "") {
                                    window.parent.postMessage({ "str": vuestr, urlId: "", "Message": resource.Message }, '*')
                              } else {
                                    var fileurl = resource.urlId.substring(0, resource.urlId.lastIndexOf("_"));
                                    var filesize = resource.urlId.substring(resource.urlId.lastIndexOf("_") + 1);
                                    window.parent.postMessage({ "str": vuestr, urlId: fileurl, size: filesize, name: FileName + "." + type }, '*')
                              }
                            } else {
                              if (resource.Message == "") {
                                    var arrystr = resource.urlId.substring(0, resource.urlId.lastIndexOf("_"));
                                    var url = arrystr; //测试"https://aapi.laifuyun.com/v2/download/" + arrystr
                                    //var url = "https://up.fumamx.com/v2/download/" + arrystr//线上
                                    console.log(FileName, url);
                                    //var arrystr = resource.urlId.split("_");
                                    var a = document.createElement('a');
                                    a.download = encodeURI(FileName + "." + type);
                                    a.href = url
                                    document.body.appendChild(a);
                                    a.click();
                                    document.body.removeChild(a);

                              }

                            }
                        },
                        complete: function (XMLHttpRequest, status) { //请求完成后最终执行参数
                            getCurrentTime(ActionType + "二次请求状态:" + status);
                        }
                  });
                }
            }
      });
    }



</script>


Startup1:

using System;
using System.Collections;
using System.Data;
using System.IO;
using System.Net;
using System.Text;
using GrapeCity.ActiveReports;
using GrapeCity.ActiveReports.Aspnet.Viewer;
using GrapeCity.ActiveReports.PageReportModel;
using Microsoft.Owin;
using Microsoft.Web.Infrastructure;
using Newtonsoft.Json;
using Owin;
using WebDesigner_MVC.Implementation;
using GrapeCity.Enterprise.Data.Expressions;
using GrapeCity.Enterprise.Data.DataEngine.Expressions;



namespace jsViewdemo
{
    public class Startup1
    {
      public static string EmbeddedReportsPrefix = "JSViewer_MVC_Core.Reports";
      string resources = System.Configuration.ConfigurationManager.AppSettings["resources"].ToString();
      string keyJSON = "";
      string Mould = "";
      public object GetReport(string P)//获取报表名称和报表参数,进行一个对应的报表名称和参数的分割
      {
            string reportName = P.Split(';');
            PageReport rep = new PageReport();
            rep.Load(new FileInfo(resources + reportName));
            ReportParameter para = new ReportParameter();
            para.Name = "p1";
            para.UsedInQuery = ReportParameterUsedInQuery.True;
            para.DataType = ReportParameterDataType.String;
            rep.Report.ReportParameters.Add(para);

            ReportParameter para2 = new ReportParameter();
            para2.Name = "p2";
            para2.UsedInQuery = ReportParameterUsedInQuery.True;
            para2.DataType = ReportParameterDataType.String;
            rep.Report.ReportParameters.Add(para2);

            //ReportParameter para3 = new ReportParameter();
            //para3.Name = "p3";
            //para3.UsedInQuery = ReportParameterUsedInQuery.True;
            //para3.DataType = ReportParameterDataType.String;
            //rep.Report.ReportParameters.Add(para3);


            // 为数据集1添加数据集参数
            QueryParameter qr = new QueryParameter();
            qr.Name = "p1";
            // 将数据集参数与报表参数关联,设置数据集参数等于报表参数
         qr.Value=ExpressionInfo.FromString("=Parameters!p1.Value");

            QueryParameter q2 = new QueryParameter();
            q2.Name = "p2";
            // 将数据集参数与报表参数关联,设置数据集参数等于报表参数
            q2.Value = ExpressionInfo.FromString("=Parameters!p2.Value");

            //QueryParameter q3 = new QueryParameter();
            //q3.Name = "p3";
            //// 将数据集参数与报表参数关联,设置数据集参数等于报表参数
            //q3.Value = ExpressionInfo.FromString("=Parameters!p3.Value");


            for (int i = 0; i < rep.Report.DataSets.Count; i++)
            {
                rep.Report.DataSets.Query.QueryParameters.Add(qr);
                rep.Report.DataSets.Query.QueryParameters.Add(q2);
                //rep.Report.DataSets.Query.QueryParameters.Add(q3);
            }         
            return rep.Report;

      }
      public void Configuration(IAppBuilder app)
      //public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
      {

            // 有关如何配置应用程序的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkID=316888
            //app.UseErrorPage();
            try
            {
                app.UseReporting(settings =>
                {
                  try
                  {
                     
                        settings.UseCustomStore(GetReport);//使用UseCustomStore来自定义一些需要的值
                        settings.UseCompression = true;
                        settings.UseFileStore(new DirectoryInfo(resources));
                        SourceClass sc = new SourceClass();
                        settings.SetLocateDataSource(args =>
                        {
                            try
                            {
                              stringkey1 = args.Parameters.Value.ToString();
                              var ping= args.Parameters.Value.ToString().Split('_');
                              string Mould = ping;
                              string hostStrats = ping.Length==2? ping:"";// args.Parameters.Value.ToString();
                              string name = args.DataSet.Name;
                              //WriteLog.WriteLogs( name + ":********************" + key1+"请求时间:"+DateTime.Now);
                              GrapeCity.ActiveReports.PageReportModel.FieldCollection fields = args.DataSet.Fields;
                              System.Data.DataSet data1 = (System.Data.DataSet)sc.getDataSetData(name, fields, key1, Mould, hostStrats);
                              //WriteLog.WriteLogs( name + ":********************" + key1 + "返回时间:" + DateTime.Now);
                              return data1;

                            }
                            catch (Exception ex)
                            {

                              WriteLog.WriteLogs("args error 渲染出错");
                              WriteLog.WriteLogs(ex.ToString());
                              return null;
                            }
                        });
                  }
                  catch (Exception ex)
                  {
                        WriteLog.WriteLogs("settings error 渲染出错2");
                        WriteLog.WriteLogs(ex.ToString());
                  }
                });


            }
            catch (Exception ex)
            {

                WriteLog.WriteLogs("start error");
                WriteLog.WriteLogs(ex.Message);
            }
      }      
    }
}


Felix.Li 发表于 2022-12-14 08:57:29

fumasoft 发表于 2022-12-19 16:45
我这边不是MVC;就是一个简单的Html页面上create然后预览。对比了start up 该加的都有。我这边源码也提供 ...

目前我看的是有一些控制层的接口没有加:


你可以把这个加进去,然后都打上断点,理论上你浏览器访问的时候这些接口都会被请求一次

Felix.Li 发表于 2022-12-14 09:58:40

您好,我们的UseCustomStore和UseFileStore是不能重复的,都是去指定报表的返回结果,如果您的UseCustomStore在前面,后面的就不会生效,所以您这个得具体看您的getReport返回的是什么报表,如果您不需要自定义(UseCustomStore),把这个注释就可以


fumasoft 发表于 2022-12-14 10:08:18

Felix.Li 发表于 2022-12-14 09:58
您好,我们的UseCustomStore和UseFileStore是不能重复的,都是去指定报表的返回结果,如果您的UseCustomSto ...

最开始只有settings.UseCustomStore(GetReport); 也是提示找不到模版。
然后才加的UseFileStore;去掉UseFileStore还是提示找不到
public object GetReport(string P)//获取报表名称和报表参数,进行一个对应的报表名称和参数的分割
      {
            string reportName = P.Split(';');
            PageReport rep = new PageReport();
            rep.Load(new FileInfo(resources + reportName));
            ReportParameter para = new ReportParameter();
            para.Name = "p1";
            para.UsedInQuery = ReportParameterUsedInQuery.True;
            para.DataType = ReportParameterDataType.String;
            rep.Report.ReportParameters.Add(para);

            ReportParameter para2 = new ReportParameter();
            para2.Name = "p2";
            para2.UsedInQuery = ReportParameterUsedInQuery.True;
            para2.DataType = ReportParameterDataType.String;
            rep.Report.ReportParameters.Add(para2);

            //ReportParameter para3 = new ReportParameter();
            //para3.Name = "p3";
            //para3.UsedInQuery = ReportParameterUsedInQuery.True;
            //para3.DataType = ReportParameterDataType.String;
            //rep.Report.ReportParameters.Add(para3);


            // 为数据集1添加数据集参数
            QueryParameter qr = new QueryParameter();
            qr.Name = "p1";
            // 将数据集参数与报表参数关联,设置数据集参数等于报表参数
         qr.Value=ExpressionInfo.FromString("=Parameters!p1.Value");

            QueryParameter q2 = new QueryParameter();
            q2.Name = "p2";
            // 将数据集参数与报表参数关联,设置数据集参数等于报表参数
            q2.Value = ExpressionInfo.FromString("=Parameters!p2.Value");

            //QueryParameter q3 = new QueryParameter();
            //q3.Name = "p3";
            //// 将数据集参数与报表参数关联,设置数据集参数等于报表参数
            //q3.Value = ExpressionInfo.FromString("=Parameters!p3.Value");


            for (int i = 0; i < rep.Report.DataSets.Count; i++)
            {
                rep.Report.DataSets.Query.QueryParameters.Add(qr);
                rep.Report.DataSets.Query.QueryParameters.Add(q2);
                //rep.Report.DataSets.Query.QueryParameters.Add(q3);
            }         
            return rep.Report;

      }

Eden.Sun 发表于 2022-12-14 18:16:06

fumasoft 发表于 2022-12-14 10:08
最开始只有settings.UseCustomStore(GetReport); 也是提示找不到模版。
然后才加的UseFileStore;去掉Us ...

这个问题我们先看一下再给您回复。

Felix.Li 发表于 2022-12-16 15:23:13

fumasoft 发表于 2022-12-14 10:08
最开始只有settings.UseCustomStore(GetReport); 也是提示找不到模版。
然后才加的UseFileStore;去掉Us ...

您好,这个应该是中间转义符的转化问题:


如果使用useCustomer
还想使用resource目录下的,需要这么写
将报表名称里面的这个替换一下就可以

fumasoft 发表于 2022-12-19 08:42:09

Felix.Li 发表于 2022-12-16 15:23
您好,这个应该是中间转义符的转化问题:




可是我这边路径里面没有出现过%2F啊!,我这边路径:            
无论是写在配置文件里面直接读取string resources = System.Configuration.ConfigurationManager.AppSettings["resources"].ToString();还是直接写程序里面 resources= "D:\\MyWorks\\45.ActiveReport\\jsviewdemo\\resources\\";
都还是提示找不到模版;就算是把路径发到根目录下resources= "D:\\MyWorks\\resources\\";也还是这个提示。

另外就是在调试的时候,断点始终无法进入到GetReport方法。

Felix.Li 发表于 2022-12-19 09:53:14

fumasoft 发表于 2022-12-19 08:42
可是我这边路径里面没有出现过%2F啊!,我这边路径:            
无论是写在配置文件里面直接读取str ...

这样,您看方便一下远程吗,远程看一下是不是哪里写法还是有问题

fumasoft 发表于 2022-12-19 10:03:47

本帖最后由 fumasoft 于 2022-12-19 10:18 编辑

Felix.Li 发表于 2022-12-19 09:53
这样,您看方便一下远程吗,远程看一下是不是哪里写法还是有问题
可以的,或者我提供完整的源码?

Felix.Li 发表于 2022-12-19 12:09:41

fumasoft 发表于 2022-12-19 10:03
可以的,或者我提供完整的源码?

13到15后start up里面有很多需要增加的,您对比一下,把缺少的都加一下


页: [1] 2
查看完整版本: 升级版本后JS Viewer提示找不到模版