日期:2014-05-18 浏览次数:20383 次
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default1.aspx.cs" Inherits="Web.Default1" %> <%@ Register Assembly="DevExpress.XtraReports.v11.1.Web, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.XtraReports.Web" TagPrefix="dx" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <dx:ReportViewer ID="rvDemo" runat="server" onload="rvDemo_Load"></dx:ReportViewer> </div> </form> </body> </html>
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using DevExpress.XtraReports.UI; namespace Web { public partial class Default1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void rvDemo_Load(object sender, EventArgs e) { XtraReport xr = new XtraReport(); xr.LoadLayout(@"C:\Users\Default\Desktop\DXexpress Demo\DXexpress\Web\File\Report1.repx"); xr.ShowPreview(); } } }