TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bhavesh Prajapati
NA
7
599
How to slove out_of_Memory_Exception error in asp.net C#
Dec 29 2020 7:39 AM
public partial class MF_168 : System.Web.UI.Page
{
ReportDocument Rptdoc = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
con.ConnectionString = ConfigurationManager.AppSettings["Connection"];
SqlCommand cmd = new SqlCommand("select Plant_Name from Format_Mechanical_List_Of_Misc_Equipments where id=1", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
Rptdoc.Load(Server.MapPath("~/CR_Reports/Mechanical/MF-168.rpt"));
Rptdoc.SetDataSource(ds.Tables[0].Rows.Count);
CrystalReportViewer1.RefreshReport();
CrystalReportViewer1.ReportSource = Rptdoc;
ds.Clear();
ds.Dispose();
}
protected void Page_Unload(object sender, EventArgs e)
{
Rptdoc.Close();
Rptdoc.Dispose();
GC.Collect();
}
}
i am loading crystal report in C# .this code build than not page load and direct show memoryException error.
my report is 32bit .than selected 64 bit iis and build project .
This line Show error => Rptdoc.SetDataSource(ds.Tables[0].Rows.Count);
error => 'CrystalDecisions.CrystalReports.Engine.DataSourceException' occurred in CrystalDecisions.CrystalReports.Engine.dll but was not handled in user code '
Reply
Answers (
2
)
Make A Web API in .net
drop down index changed page is refreshed i use ipdate panel also but