View Single Post
  #1 (permalink)  
Old December 22nd, 2005, 09:22 PM
hwajunsong hwajunsong is offline
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Invalid attempt to FieldCount when reader is close

I am using VS 2005 and created crystal report file abc.rpt and when I choose preview it shows the content correctly (The report was created using calling stored procedure which had 2 params). When I inserted this abc.rpt to one of my asp.net form, I get the following error message after through with Page_Load().

Stack Trace:


[InvalidOperationException: Invalid attempt to FieldCount when reader is closed.]
   System.Data.SqlClient.SqlDataReader.get_FieldCount () +62
   System.Data.Common.DbEnumerator.BuildSchemaInfo() +76
   System.Data.Common.DbEnumerator.MoveNext() +35
   System.Web.UI.WebControls.ListControl.PerformDataB inding(IEnumerable dataSource) +688
   System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +81
   System.Web.UI.WebControls.ListControl.PerformSelec t() +32
   System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +99
   CrystalDecisions.Web.CrystalReportSource.GetContro lParameterValue(ControlParameter parameter) +332
   CrystalDecisions.Web.CrystalReportSource.GetParame terValue(Parameter parameter) +140
   CrystalDecisions.Web.CrystalReportSource.BindContr olParameter(Parameter parameter) +513
   CrystalDecisions.Web.CrystalReportSource.DataBindP arameters() +191
   CrystalDecisions.Web.CrystalReportSource.EnsurePar ameters(Boolean forceDataBind) +90
   CrystalDecisions.Web.CrystalReportSource.LoadCompl eteEventHandler(Object sender, EventArgs e) +47
   System.Web.UI.Page.OnLoadComplete(EventArgs e) +96
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4085

Can anybody tell me how to fix this problem?
Thank you.


Reply With Quote