XtraReport.ShowPreview()使用这个方法时报"The method or operation is not supported"的错误

小威廉 2011-10-27 11:11:50
我用的Devexpress 11.1.8的开发工具设计的repx文件,设计报表时没有绑定数据源,下面是我的代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default5.aspx.cs" Inherits="Web.Default5" %>

<%@ 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 Default5 : 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();
}
}
}


代码运行到xr.ShowPreview();时报"The method or operation is not supported"错误

这个错误本人纠结了很久,求高人指点,谢谢!
...全文
371 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
Web的程序是不能用@"C:\Users\Default\Desktop\DXexpressDemo\DXexpress\Winform\File\Report1.repx"
这样的绝对路径的,因为你的网站是挂到服务器上的,只能用服务器路径,不然就会报错
nimeide1234567890 2012-03-31
  • 打赏
  • 举报
回复
DevExpress XrtaReport 报表用过吗?

XtraReport.ShowPreview()使用这个方法时报"The method or operation is not supported"的错误
月落夜黄昏 2011-11-09
  • 打赏
  • 举报
回复
已经解决,可以看官方网站的文档。。。有web相应的做法。。。

[Quote=引用 5 楼 yhngjiol 的回复:]
此问题暂时还没解决,因为本人现在的任务不在这个方向了,以后是否还否还会继续这方面的研究还不知道
根据我一些朋友的回复和留言,我的repx文件是用winform的Designer设计器设计的,在winform程序中能够正常显示,但是在Web中是否能够解析repx文件并把报表显示出来,这个就有待研究了
[/Quote]
小威廉 2011-11-04
  • 打赏
  • 举报
回复
此问题暂时还没解决,因为本人现在的任务不在这个方向了,以后是否还否还会继续这方面的研究还不知道
根据我一些朋友的回复和留言,我的repx文件是用winform的Designer设计器设计的,在winform程序中能够正常显示,但是在Web中是否能够解析repx文件并把报表显示出来,这个就有待研究了
月落夜黄昏 2011-11-03
  • 打赏
  • 举报
回复
UP。。。。。。。。偶也是这个问题。。。请问你解决了嘛
小威廉 2011-10-27
  • 打赏
  • 举报
回复
怎么没人回答了呢,难道这种问题没人遇到过吗?
小威廉 2011-10-27
  • 打赏
  • 举报
回复
谢谢1楼的帮助。

刚刚本人做了个测试,在Winform中使用这个方法可以通过,而且报表也正常的显示出来了;还一个我要补充的是我的devexpress工具已经破解了

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

}

private void printControl1_Load(object sender, EventArgs e)
{
XtraReport xr = new XtraReport();
xr.LoadLayout(@"C:\Users\Default\Desktop\DXexpress Demo\DXexpress\Winform\File\Report1.repx");
xr.ShowPreview();
}
}
十二点咖啡 2011-10-27
  • 打赏
  • 举报
回复
帮顶
Twitter Digg Facebook Del.icio.us Reddit Stumbleupon Newsvine Technorati Mr. Wong Yahoo! Google Windows Live Send as Email Add to your CodeProject bookmarks Discuss this article 85 Print Article Database » Database » Other databasesLicence CPOL First Posted 19 Jan 2012 Views 24,219 Downloads 992 Bookmarked 74 times RaptorDB - The Key Value Store V2 By Mehdi Gholam | 8 Mar 2012 | Unedited contribution C#.NETDBABeginnerIntermediateAdvanceddatabase Even faster Key/Value store nosql embedded database engine utilizing the new MGIndex data structure with MurMur2 Hashing and WAH Bitmap indexes for duplicates. See Also More like this More by this author Article Browse Code Stats Revisions (8) Alternatives 4.95 (56 votes) 1 2 3 4 5 4.95/5 - 56 votes μ 4.95, σa 1.05 [?] Is your email address OK? You are signed up for our newsletters but your email address is either unconfirmed, or has not been reconfirmed in a long time. Please click here to have a confirmation email sent so we can confirm your email address and start sending you newsletters again. Alternatively, you can update your subscriptions. Add your own alternative version Introduction What is RaptorDB? Features Why another data structure? The problem with a b+tree Requirements of a good index structure The MGIndex Page Splits Interesting side effects of MGIndex The road not taken / the road taken and doubled back! Performance Tests Comparing B+tree and MGIndex Really big data sets! Index parameter tuning Performance Tests - v2.3 Using the Code Differences to v1 Using RaptorDBString and RaptorDBGuid Global parameters RaptorDB interface Non-clean shutdowns Removing Keys Unit tests File Formats File Format : *.mgdat File Format : *.mgbmp File Format : *.mgidx File Format : *.mgbmr , *.mgrec History Download RaptorDB_v2.0.zip - 38.7 KB Download RaptorDB_v2.1.zip - 39 KB Download RaptorDB_v2.2.zip - 39 KB Download RaptorDB_v2.3.zip - 39.6 KB D

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧