对于字符串而言缓冲区太小或缺少空字节

jokanovic 2010-11-02 01:41:11
[COMException (0x800001f7):
对于字符串而言缓冲区太小或缺少空字节。]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +144
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +528

[Exception: 加载报表失败。]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +627
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +1876
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +185
report_cheshi.Page_Load(Object sender, EventArgs e) in d:\速递业务效益系统\sdfx\KSSEnterprise\KSSWeb\report\cheshi.aspx.cs:42
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +37
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +91
System.Web.UI.Control.OnLoad(EventArgs e) +127
System.Web.UI.Control.LoadRecursive() +92
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3364
...全文
146 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
djzikang 2010-11-04
  • 打赏
  • 举报
回复
看不懂 哈哈哈
jokanovic 2010-11-02
  • 打赏
  • 举报
回复
各位高手 帮我看看
jokanovic 2010-11-02
  • 打赏
  • 举报
回复
CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport.rpt"));
单步调试到这步报 加载报表失败
jokanovic 2010-11-02
  • 打赏
  • 举报
回复
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string strsql = "select jg,dq,round(sum(case when substr(t.rq,1,6)='201010' then sr else 0 end)/sum(case when substr(t.rq,1,6)='201010' then js else 0 end),2),";
strsql += "round(sum(case when substr(t.rq,1,6)='201010' then sr else 0 end)/sum(case when substr(t.rq,1,6)='201010' then weight else 0 end),2) ";

strsql += "from dq_zl t having round(sum(case when substr(t.rq,1,6)='201010' then js else 0 end),2)>0 and round(sum(case when substr(t.rq,1,6)='201010' then weight else 0 end),2)>0 ";
strsql += " group by jg,dq";

string DBConfig_sql = System.Configuration.ConfigurationManager.AppSettings["oracleconn"];
// DataSet6 ds = new DataSet3();
DataSet6 ds = new DataSet6();
OracleConnection OracleCon = new OracleConnection(DBConfig_sql);

OracleDataAdapter OracleAd = new OracleDataAdapter();
// OracleDataAdapter OracleAd1 = new OracleDataAdapter();
OracleCommand OracleCmd = new OracleCommand(strsql, OracleCon);
// OracleCommand OracleCmd1 = new OracleCommand("select ID,name1,name2 from wd where id in(select DQBZ from gn_dq_nj t where RQ='20101010' group by DQBZ ) group by id,name1,name2 ", OracleCon);

OracleAd.SelectCommand = OracleCmd;
// OracleAd1.SelectCommand = OracleCmd1;

OracleAd.Fill(ds, "dq_zl");
// OracleAd1.Fill(ds, "wd");

CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport.rpt"));
CrystalReportSource1.ReportDocument.SetDataSource(ds);
CrystalReportSource1.DataBind();
CrystalReportViewer1.ReportSource = CrystalReportSource1;
CrystalReportViewer1.DataBind();

}
阿泰 2010-11-02
  • 打赏
  • 举报
回复
又是一个没遇到过的问题,呵呵

先贴代码出来看看吧~~ cheshi.aspx.cs这个文件的

4,818

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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