【FastReport教程】如何在Web应用程序中使用在线设计器

本文详细介绍了如何在ASP.NET MVC项目中使用FastReport.Net的在线设计器,包括添加所需库、创建Web报表对象、设置报表数据源、实现报表上传、下载和保存功能。通过示例代码展示如何在Web应用程序中集成和操作报表。
摘要由CSDN通过智能技术生成

下载FastReport.Net最新版本

本文将介绍在MonoDevelop中创建Web应用程序并在其中使用在线设计器的方法。除了online designer这样的按钮,如下载报表给designer并将报表保存到本地计算机将位于页面上 让我们创建一个ASP .Net MVC项目:

我们需要在References中为项目添加库: FastReport Mono,FastReport.Web,System.Net.Http。解压缩归档文件并将WebReportDesigner文件夹添加到项目根目录。

我们还需要一个文件夹,我们将在其中保存报表,存储包含数据的文件。将App_Data文件夹添加到项目根目录。我们将使用FastReport.Mono交付的演示报表,因此我们需要nwind.xml数据库。将其添加到App_Data文件夹。

现在可以开始编程了。在Controller文件夹中是HomeController.cs文件,在使用部分,我们需要库:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.UI;
using System.Text;
using System.IO;
using FastReport;
using FastReport.Web;
using FastReport.Utils;
using System.Web.UI.WebControls;
using FastReport.Export.Html;
using FastReport.Data;
using System.Net.Http.Headers;
using FastReport.Export.Image;
using System.Net.Http;

Web方法索引:

private WebReport webReport = new WebReport(); // Web report object
public ActionResult Index()
 {
 webReport.Width = Unit.Percentage(100);
 webRep
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值