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
Minh
NA
5
21.4k
Load report failed
Nov 26 2010 12:50 PM
Hi friends, I tried two ways to create a crystal report :
The first, i create a class of report programmatically and give it resourcename="rpt1.rpt", fullresourcename="report.rpt1.rpt"
The second , i create a class of report manually : rpt1.rpt (full path : report/rpt1.rpt)
They seem to be same but the result is not .
In way 1 , error is returned with : Report load failed
In way 2 , report is successful .
So , can you give me the key that lead to the difference here .
Thanks so much .
---------------------------------------------------------------------------------------------------------------------------------------------------------
cReport = "rpt1.rpt";
SqlConnection cnnt = Class.ConnectDatabase.CreateConnection();
string sl = "Select * from tb_sanpham";
SqlDataAdapter data = new SqlDataAdapter(sl, cnnt);
DataSet ds = new DataSet();
data.Fill(ds);
this.ds = ds;
//-----------------------------------------------------------1------------------------------------------------------------
CrystalDecisions.CrystalReports.Engine.ReportClass oReport = new CrystalDecisions.CrystalReports.Engine.ReportClass();
oReport.ResourceName = cReport;
oReport.FullResourceName = "ASIANSTAR.Report.rpt1.rpt";
oReport.SetDataSource(ds.Tables[0]);
cReportViewer.ReportSource =oReport;
//--------------------------------------------------------end of 1-----------------------------------------------------------
//-----------------------------------------------------------2----------------------------------------------------------------
Report.rpt1 repo = new ASIANSTAR.Report.rpt1();
repo.SetDataSource(ds.Tables[0]);
cReportViewer.ReportSource = repo;
//----------------------------------------------------end of 2----------------------------------------------------------------
Reply
Answers (
0
)
Problem with sending mail
Calling a method that plays sound, mega troubles, please help!