清高手指点!!

sylx1115 2005-02-28 10:58:20
报表运行时报错!
Server Error in '/WebApplication1' Application.
--------------------------------------------------------------------------------

文件 C:\DOCUME~1\SYLX\ASPNET\LOCALS~1\Temp\temp_d78dc583-0fa0-4aee-9a36-f6c0bb822fcb.rpt 内出错:无效组条件。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.InvalidArgumentException: 文件 C:\DOCUME~1\SYLX\ASPNET\LOCALS~1\Temp\temp_d78dc583-0fa0-4aee-9a36-f6c0bb822fcb.rpt 内出错:无效组条件。

Source Error:

源文件:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
namespace WebApplication1
{
/// <summary>
/// QueryReport 的摘要说明。
/// </summary>
public class QueryReport : System.Web.UI.Page
{
protected CrystalDecisions.Web.CrystalReportViewer CrystalReportViewer1;
public CrystalReport1 myrpt=null;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
DataSet1 myset=new DataSet1();
string conn="server=localhost;uid=sa;pwd=;database=Northwind";
string sqlstr="select * from Suppliers";
SqlConnection sqlconn=new SqlConnection(conn);
SqlDataAdapter myadapter=new SqlDataAdapter(sqlstr,conn);
myadapter.Fill(myset,"Suppliers");
CrystalReport1 myrpt=new CrystalReport1();
myrpt.SetDataSource(myset);
CrystalReportViewer1.ReportSource=myrpt;





}

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion
}
}
...全文
139 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
sylx1115 2005-02-28
  • 打赏
  • 举报
回复
sylx1115 2005-02-28
  • 打赏
  • 举报
回复
我订一下

6,107

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 数据库报表
社区管理员
  • 数据库报表社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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