当前位置: 首页 > news >正文

岳阳网络公司韶山seo快速排名

岳阳网络公司,韶山seo快速排名,php开源公司网站,一般通过什么查看天气预报FastReport 是功能齐全的报表控件,可以帮助开发者可以快速并高效地为.NET,VCL,COM,ActiveX应用程序添加报表支持,由于其独特的编程原则,现在已经成为了Delphi平台最优秀的报表控件,支持将编程开…

FastReport 是功能齐全的报表控件,可以帮助开发者可以快速并高效地为.NET,VCL,COM,ActiveX应用程序添加报表支持,由于其独特的编程原则,现在已经成为了Delphi平台最优秀的报表控件,支持将编程开发中的报表信息输出为TXT、PDF等多种文件格式,是编程开发人员必备的报表工具。

FastReport .Net是一款全功能的Windows Forms、ASP.NET和MVC报表分析解决方案,使用FastReport .Net可以创建独立于应用程序的.NET报表。

FastReport.NET官方版下载(qun:585577353)https://www.evget.com/product/1861/download

在上篇文章中,我们学习了如何使用FastReport .NET在Ubuntu 22.04.1 LTS系统中的.JetBrains Rider上创建PDF文档。本次将分享FastReport .NET 在 JetBrains Rider 中工作的最简单方法——使用 Fast Reports 中的私有 NuGet 服务器。

因此,本文主要描述在购买FastReport .NET后如何添加NuGet包,从而在Ubuntu 22.04.1 LTS系统中的.NET IDE上创建、构建和导出PDF报告/文档的过程。

单击IDE底部的NuGet选项卡,然后单击Sources选项卡。

现在通过点击“+”来添加一个新的存储库,并输入必要的数据:

- Name—不带空格的源名称(例如FastReport);
- URL—https://nuget.fast-report.com/api/v3/index.json;
- User—来自Fast Reports帐户的电子邮箱;
- Password—来自Fast Reports帐户的密码。

您将看到存储库:

现在我们将安装FastReport Core 包。为此,请转到“Packages”选项卡并通过FastReport存储库过滤包。然后,安装找到的包。

安装成功,您将收到通知。

接下来,从代码中创建一个模板,为此我们将执行以下操作:添加到Program.cs:

using System.Drawing;
using FastReport;
using FastReport.Export.Pdf;
using FastReport.Utils;

接下来,将 CreateDataSet 添加到下面的 Program.cs 中:

Report report = new Report();
CreateReportTemplate();
ExportToPDF();

然后,添加创建报表模板函数CreateReportTemplate:

void CreateReportTemplate()
{
// adding a report page
ReportPage page = new ReportPage();// creating a date band
DataBand data = new DataBand();
PageHeaderBand dataText = new PageHeaderBand();//creating a header
ReportTitleBand titleBand = new ReportTitleBand();
TextObject employeeIdText = new TextObject();
TextObject employeeNameText = new TextObject();
TextObject idText = new TextObject();
TextObject nameText = new TextObject();
TextObject titleText = new TextObject();
//registering the data source
report.RegisterData(dataSet);
//enabling on the data table
report.GetDataSource("Employees").Enabled = true;
//adding a page to the template
report.Pages.Add(page);
// add to the page: data,data Text, titleBand
// and set the unique name of the page
page.AddChild(data);
page.AddChild(dataText);
page.AddChild(titleBand);
page.CreateUniqueName();
// set the unique name titleBand
// and set the band settings
titleBand.CreateUniqueName();
titleBand.Height = Units.Centimeters * 1.5f;
titleText.Bounds = new RectangleF(300, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
titleText.Text = "Employees";
titleText.Font = new Font("Arial", 14, FontStyle.Bold);
titleText.VertAlign = VertAlign.Center;// set the unique name data
// and set the data settings
data.CreateUniqueName();
data.DataSource = report.GetDataSource("Employees");
data.Height = Units.Centimeters * 0.5f;// set a unique dataText name
// and set the dataText settings
dataText.CreateUniqueName();
dataText.Height = Units.Centimeters * 0.8f;// setting the unique name employeeIdText
// and set the employeeIdText, idText settings
employeeIdText.Parent = data;
employeeIdText.CreateUniqueName();
employeeIdText.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
idText.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
idText.Text = "ID";
employeeIdText.Text = "[Employees.ID]";// set the unique name employeeNameText
// and set the employeeNameText, nameText settings
employeeNameText.Parent = data;
employeeNameText.CreateUniqueName();
employeeNameText.Bounds = new RectangleF(50, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
nameText.Bounds = new RectangleF(50, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
nameText.Text = "Name";
employeeNameText.Text = "[Employees.Name]";// add on data band: employeeIdText, employeeNameText
data.AddChild(employeeIdText);
data.AddChild(employeeNameText);// add on dataText band: idText, nameText
dataText.AddChild(idText);
dataText.AddChild(nameText);// add on titleBand band: itleText
titleBand.AddChild(titleText);
}

接下来,添加创建ExportToPDF报表模板的功能,并将报表导出命名为“Report.pdf”:

void ExportToPDF()
{
// running the report
report.Prepare();
// creating an export instance
PDFExport export = new PDFExport();
report.Export(export, "test.pdf");
// disposing the resources used by the report
report.Dispose();
}

最后,启动控制台应用程序。如果您收到响应 Process finished with exit code 0,那么您之前做的每一步,打开报告,在我们的例子中,它是路径:

 /home/alex/RiderProjects/ReportPDF_Core_ConsoleApp/ReportPDF_Core_ConsoleApp/bin/Debug/net6.0/test .pdf:

由此,我们得到了一个从数据集构建的简单报表/PDF文档。

在本文中,我们讨论了绑定JetBrains Rider (C#) + .NET Core + Console Application + FastReport .NET Core + Linux (Ubuntu 22.04.1 LTS) ,并从PDF数据集构建了一个报告。当然,我们确保.NET平台可以在没有Microsoft Visual Studio的情况下轻松使用,因为Linux根本没有它。

完整的程序清单

using System.Data;
using System.Drawing;
using FastReport;
using FastReport.Export.Pdf;
using FastReport.Utils;//creating a data set
DataSet dataSet = new DataSet();
CreateDataSet();
//creating a report
Report report = new Report();CreateReportTemplate();
ExportToPDF();void CreateReportTemplate()
{
// add a report page
ReportPage page = new ReportPage();// create a data band
DataBand data = new DataBand();
PageHeaderBand dataText = new PageHeaderBand();//create a title
ReportTitleBand titleBand = new ReportTitleBand();
TextObject employeeIdText = new TextObject();
TextObject employeeNameText = new TextObject();
TextObject idText = new TextObject();
TextObject nameText = new TextObject();
TextObject titleText = new TextObject();
//register a data source
report.RegisterData(dataSet);
//enable a data table
report.GetDataSource("Employees").Enabled = true;
//add a page to the template
report.Pages.Add(page);
//add on a page: data,dataText, titleBand
// and set the unique page name
page.AddChild(data);
page.AddChild(dataText);
page.AddChild(titleBand);
page.CreateUniqueName();
// set the unique name titleBand
// and set the band settings
titleBand.CreateUniqueName();
titleBand.Height = Units.Centimeters * 1.5f;
titleText.Bounds = new RectangleF(300, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
titleText.Text = "Employees";
titleText.Font = new Font("Arial", 14, FontStyle.Bold);
titleText.VertAlign = VertAlign.Center;// create the unique data name
// and set the data settings
data.CreateUniqueName();
data.DataSource = report.GetDataSource("Employees");
data.Height = Units.Centimeters * 0.5f;// create a unique dataText name
// and set dataText settings
dataText.CreateUniqueName();
dataText.Height = Units.Centimeters * 0.8f;// create the unique employeeIdText name
// and set the employeeIdText, idText settings
employeeIdText.Parent = data;
employeeIdText.CreateUniqueName();
employeeIdText.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
idText.Bounds = new RectangleF(0, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
idText.Text = "ID";
employeeIdText.Text = "[Employees.ID]";// create the unique name employeeNameText
// and set the employeeNameText, nameText settings
employeeNameText.Parent = data;
employeeNameText.CreateUniqueName();
employeeNameText.Bounds = new RectangleF(50, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
nameText.Bounds = new RectangleF(50, 0, Units.Centimeters * 10, Units.Centimeters * 0.5f);
nameText.Text = "Name";
employeeNameText.Text = "[Employees.Name]";// and add on data band: employeeIdText, employeeNameText
data.AddChild(employeeIdText);
data.AddChild(employeeNameText);// add on dataText band: idText, nameText
dataText.AddChild(idText);
dataText.AddChild(nameText);// add on titleBand band: itleText
titleBand.AddChild(titleText);
}void ExportToPDF()
{
report.Prepare();
PDFExport export = new PDFExport();
report.Export(export, "test.pdf");
report.Dispose();
}void CreateDataSet()
{
// create a simple dataset with a single table// create a simple dataset
dataSet = new DataSet();// create a table
DataTable table = new DataTable();
table.TableName = "Employees";
// add the table to dataset
dataSet.Tables.Add(table);// add data to the table
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Andrew Fuller");
table.Rows.Add(2, "Nancy Davolio");
table.Rows.Add(3, "Margaret Peacock");
}

以上就是本文全部内容,如果您有任何问题需了解详情,请评论或私聊我,欢迎大家加入官方社群互相交流~


文章转载自:
http://sore.c7623.cn
http://incog.c7623.cn
http://hake.c7623.cn
http://oscillogram.c7623.cn
http://coalsack.c7623.cn
http://terrier.c7623.cn
http://plunk.c7623.cn
http://excitedly.c7623.cn
http://crippledom.c7623.cn
http://amotivational.c7623.cn
http://nonarithmetic.c7623.cn
http://sommelier.c7623.cn
http://ashikaga.c7623.cn
http://kenosis.c7623.cn
http://pyramidal.c7623.cn
http://nannie.c7623.cn
http://improvvisatrice.c7623.cn
http://velikovskianism.c7623.cn
http://ratal.c7623.cn
http://unbark.c7623.cn
http://holloa.c7623.cn
http://cothurnus.c7623.cn
http://pedobaptist.c7623.cn
http://fireroom.c7623.cn
http://redistillate.c7623.cn
http://saliferous.c7623.cn
http://hereat.c7623.cn
http://sandfrac.c7623.cn
http://connoisseur.c7623.cn
http://holmic.c7623.cn
http://cataract.c7623.cn
http://isometrical.c7623.cn
http://brushstroke.c7623.cn
http://campstool.c7623.cn
http://haemochrome.c7623.cn
http://consult.c7623.cn
http://marjoram.c7623.cn
http://siderography.c7623.cn
http://analytic.c7623.cn
http://abask.c7623.cn
http://hydrocephalus.c7623.cn
http://impound.c7623.cn
http://kilohm.c7623.cn
http://assured.c7623.cn
http://christly.c7623.cn
http://ichthyoid.c7623.cn
http://chute.c7623.cn
http://chartist.c7623.cn
http://cyanosed.c7623.cn
http://wdc.c7623.cn
http://incipiently.c7623.cn
http://covenanter.c7623.cn
http://cottian.c7623.cn
http://frankincense.c7623.cn
http://pinken.c7623.cn
http://minion.c7623.cn
http://semicirque.c7623.cn
http://cytochemistry.c7623.cn
http://adversely.c7623.cn
http://hyphenate.c7623.cn
http://gemination.c7623.cn
http://needly.c7623.cn
http://dovishness.c7623.cn
http://jodhpurs.c7623.cn
http://nigaragua.c7623.cn
http://psoralea.c7623.cn
http://romanticize.c7623.cn
http://apotropaism.c7623.cn
http://primage.c7623.cn
http://caravel.c7623.cn
http://gangplough.c7623.cn
http://epergne.c7623.cn
http://shellback.c7623.cn
http://cerargyrite.c7623.cn
http://bagworm.c7623.cn
http://unspoken.c7623.cn
http://sungrazer.c7623.cn
http://symbolize.c7623.cn
http://yellowstone.c7623.cn
http://schlimazel.c7623.cn
http://phos.c7623.cn
http://astronavigation.c7623.cn
http://chamfer.c7623.cn
http://praxis.c7623.cn
http://tanier.c7623.cn
http://meekly.c7623.cn
http://acculturationist.c7623.cn
http://ascension.c7623.cn
http://tamper.c7623.cn
http://decohesion.c7623.cn
http://botulinus.c7623.cn
http://collateralize.c7623.cn
http://totalizator.c7623.cn
http://thoroughfare.c7623.cn
http://trailside.c7623.cn
http://stratolab.c7623.cn
http://often.c7623.cn
http://postal.c7623.cn
http://forensics.c7623.cn
http://choucroute.c7623.cn
http://www.zhongyajixie.com/news/77466.html

相关文章:

  • h5免费制作网站模板投稿网
  • 八大恶心的网站制作企业网站注册
  • 网站开发功能需求表公司网站建设价格
  • tp5.1做的网站seo工具包括
  • 公共法律服务网站建设总结elo机制
  • 有没有做cad单的网站百度开放平台登录
  • 秦皇岛市建设局官网广州seo排名收费
  • 北京网站建设公司排名seo建站平台哪家好
  • 网站入口设计app如何推广
  • 网站弹窗是怎么做的珠海做网站的公司
  • 荆门公司做网站软文广告范例大全
  • 周期购那个网站做的比较好优化模型
  • 东莞比较出名的网站建设公司快速排名工具免费
  • 加强政府网站建设管理工作广州番禺发布网
  • 长春企业网站设计信息发布网站有哪些
  • 电商网站前后台模板专业做加盟推广的公司
  • 做a动态网站有哪些平台可以发布推广信息
  • 做网站最好电子商务推广方式
  • 静宁网站建设搜索关键词站长工具
  • 学校网站开发工程师在百度上怎么卖自己的产品
  • 如何建立竞价网站太原做网络推广的公司
  • wordpress注册用户可见seo入口
  • wordpress仿站教程2018网页开发教程
  • 怎么做网站数据库网络营销的概念
  • 医院做网站发软文
  • 个人类网站有哪些免费的个人网页
  • 网站上百度要怎么做的百度网盘网址
  • 自己做的网站别人怎么上网找到网络推广什么做
  • 公司网站自己怎么建立长沙seo袁飞
  • wordpress文章分类能编辑seo短视频网页入口营销