Hi Guys
I write this problem in under ASP category,but i didnt have any reply,anywya i think coz anyone cant uderstand what iam saying,but today I found that kind of request in another forum.So i write copy it into here. My problem and this one also same .Please help me
I have a crystal report that is bound to a dataset/tableadapter in a Data Access Layer. Using the code below I have got the report to display correctly - however when you use any of the buttons in the Crystal Report Viewer the page goes blank unless the code is in the Page_Load ie it re-loads the report everytime someone flicks onto the next page.
I am wondering if this is the correct behaviour when using a crystal report with a dataset (that it has to reload) or am I missing something.
Any pointers would be appreciated
if this is not in the Page Load then only the first page will display
dsStaffTableAdapters.PeopleTableAdapter ta = new dsStaffTableAdapters.PeopleTableAdapter();
dsStaff.PeopleDataTable dt;
dt = ta.GetPeople();
ReportDocument report;
report = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
string rptFile = Server.MapPath("cr1.rpt");
report.Load(rptFile);
report.SetDataSource((DataTable)dt);
CrystalReportViewer1.ReportSource = report;
Thanks
Tank50