/* static void test_detectRptAttrsByCode() { String descFilePath = null; String shrtCode = null; String throwCode = null; CXLReportConfig.detectRptAttrsByCode( @"D:\data\prjs\bioSys-8\Bio.Helpers\Bio.XLFRpt2\Bio.XLFRpt2.Srvc\bin\test\root\", "connLog.report", ref descFilePath, ref shrtCode, ref throwCode); } static void testCQueueRemote() { //// Create the channel. //IpcChannel channel = new IpcChannel(); //// Register the channel. //ChannelServices.RegisterChannel(channel); //// Register as client for remote object. //WellKnownClientTypeEntry remoteType = new WellKnownClientTypeEntry( // typeof(RemoteObject), // "ipc://*****:*****@"D:\data\prjs\bioSys-8\Bio.Helpers\Bio.XLFRpt2\Bio.XLFRpt2.Srvc\bin\test\root\", "connLog.Cat.CatS.back_door", "admin"); String r = dc.InnerXml; Console.WriteLine(r); } */ static void testReport() { CXLReportConfig rptCfg = CXLReportConfig.LoadFromFile( null, "report", null, "logs", null, null, null, null, new Params(new Param { Name = "rpt_bgn", Value = "20100714" }, new Param { Name = "rpt_end", Value = "20100716" }), false ); CXLReport rptBuilder = new CXLReport(rptCfg); //rptBuilder.DataSources. String vrsltFileName = rptBuilder.BuildReportSync(); }
/// <summary> /// Синхронный вызов построителя отчета /// </summary> /// <param name="cfg"></param> /// <returns></returns> public static String BuildReportSync(CXLReportConfig cfg) { String vResult = null; //String vRptDefDoc = BuildReportConfigXml(rpt_title, rpt_desc, rpt_template, null, dataFactoryTypeName, reportResultFileName, dss, connStr, debug); //CXLReport xlReportDocument = new CXLReport(null, vRptDefDoc, null, null); CXLReport xlReportDocument = new CXLReport(cfg); try { //xlReportDocument.DataSources.Add("cdsRpt", "mRng", null, dataFactoryTypeName); //xlReportDocument.RptDefinition.RptParams.AddRange(rpt_params); //xlReportDocument.RptDefinition.InParams.AddRange(rpt_params); xlReportDocument.BuildReportSync(); vResult = xlReportDocument.LastResultFile; } finally { xlReportDocument.Dispose(); } return vResult; }