FastReport中国社区FastReport联系电话 联系电话:023-68661681

数据分析工具FastCube.Core如何组装.NET 5.0

来源:   发布时间:2021-05-24   浏览:次

FastReport.Mono 是一种为Mono Framework设计的功能全面的报表生成工具。FastReport.Mono是一个多平台的报表解决方法。它可以用于Windows,Linux,Mac OS X,以及任何支持Xamarin Mono的操作系统。

在FastReport Mono 2021.1的新版本中,添加了新版本-Deutsche Post Leitcode。将RTF转换为报告对象的算法已获得显着改进。并且还添加了使用转换数字的新功能。欢迎下载体验。按钮下载)

点击下载FastReport.Mono v2021.1新版本

如今,对OLAP多维数据集等分析工具的需求极为迫切。快速报告拥有这样的系统,并允许在.NET应用程序(例如,NET 5.0)中显示带有切片的数据多维数据集。在您的报告中使用它。

要使用FastCube.Core库,必须先从源代码中编译它们。要为.NET 5.0组装FastCube.Core,请使用FastCube.Core.sln解决方案。

启动此解决方案后,更改.NET 5.0的目标操作环境。然后组装项目;您将在我们的工作目录中看到FastCube.Core.2020.2.1.nupkg。顶级源的文件夹中。

现在,我们可以开始创建.NET Core项目。

首先,将FastCube.Core库添加到创建的项目中。然后,请使用NuGet程序包管理器。由于库包放在本地光盘上,因此我们必须添加包的本地源。角的齿轮图标,然后添加一个新的源,指向指向包含您的nupkg程序包的本地文件夹:

在此阶段,您可以在下拉列表中选择添加的源并设置细分:

我们已经在项目中添加了一个库,现在应该通过写入文件.cs来连接它:

使用FastReport.Olap

要检查其工作方式,请使用以下代码:

班级计划
 {
 私有静态字符串FindDataFolder()
 {
 字符串dataFolder =“”;
 字符串thisFolder = Config.ApplicationFolder;
 
 对于(int i = 0; i <6; i ++)
 {
 字符串dir = Path.Combine(thisFolder,“ Data”);
 如果(Directory.Exists(dir))
 {
 字符串data_dir = Path.GetFullPath(dir);
 如果(File.Exists(Path.Combine(data_dir,“ config.xml”)))
 {
 dataFolder = data_dir;
 休息;
 }
 }
 thisFolder += ".." + Path.DirectorySeparatorChar;
 }
 
 if (dataFolder == "")
 {
 thisFolder = Config.ApplicationFolder;
 for (int i = 0; i < 6; i++)
 {
 string dir = Path.Combine(thisFolder, "Demos", "Data");
 if (Directory.Exists(dir))
 {
 string data_dir = Path.GetFullPath(dir);
 if (File.Exists(Path.Combine(data_dir, "config.xml")))
 {
 dataFolder = data_dir;
 break;
 }
 }
 thisFolder += ".." + Path.DirectorySeparatorChar;
 }
 }
 
 if (dataFolder == "")
 throw new Exception("Could not locate the Data folder.");
 return dataFolder;
 }
 
 static void Main(string[] args)
 {
 string dataFolder = FindDataFolder();
 // create cube and slice
 Cube cube = new Cube();
 Slice cubeSlice = new Slice();
 cubeSlice.Cube = cube;
 // load cube
 cube.Load(Path.Combine(dataFolder, "Cubes", "2_0_sample_en1.mdc"));
 // open cube
 cube.Active = true;
 // export slice
 HTMLExport导出=新的HTMLExport();
 export.Slice = cubeSlice;
 export.Export(Path.Combine(Config.ApplicationFolder,“ export.html”));;
 }
 }
}

之后,在我们应用程序的目录中,我们将看到一个.html格式的文件。在任何编辑器中将其打开,并获得以下信息:

因此,我们已经在控制台应用程序中使用FastCube.Core库进行了查看。可以看到,该库与NET 5.0完美配合。现在,您可以在应用程序中使用数据多维数据集。


如果您对FastReport感兴趣,欢迎加入FastReport QQ交流群:801349317

还想要更多吗?您可以点击阅读【FastReport报表2020最新资源盘点】,查找需要的教程资源。让人兴奋的是FastReport.Mono正在慧都网火热销售中!>>查看价格详情

本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:FastReport控件中文网 [https://www.fastreportcn.com/]
本文地址:https://www.fastreportcn.com/post/3074.html

联系我们
  • 重庆总部 023-68661681
购买
  • sales@evget.com
合作
  • business@evget.com


在线
客服
微信
QQ 电话
023-68661681
返回
顶部