Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
Load Report failed. In Crytal Report .. How to solve . ?
Karthik Che
Jan 2 2018 3:14 AM
132
Reply
Hi All ,
I am using crystal report in vs 2008 . When I load the report in cystal viewer.
its shows like Load report failed exception
* I have checked the sql authentication. That's also correct. I am sharing my code.
anybody knows suggest me with example ..
Sample Code :
public
void
loadcry(
string
DCNO,
string
VID)
{
TableLogOnInfos crtableLogoninfos =
new
TableLogOnInfos();
TableLogOnInfo crtableLogoninfo =
new
TableLogOnInfo();
ConnectionInfo crConnectionInfo =
new
ConnectionInfo();
Tables CrTables;
string
q2=
"SELECT * FROM VIEW_DCREPORT WHERE DCNO="
+DCNO +
" AND VID="
+VID +
""
;
Ds = SqlObj.GetData_DS(q2);
rep =
new
ReportDocument();
rep.Load(Server.MapPath(
"~/DCRPT.rpt"
));
rep.SetDataSource(Ds.Tables[0]);
CrTables = rep.Database.Tables;
foreach
(CrystalDecisions.CrystalReports.Engine.Table CrTable
in
CrTables)
{
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = crConnectionInfo;
CrTable.ApplyLogOnInfo(crtableLogoninfo);
}
rep.Refresh();
CrystalReportViewer1.ReportSource = rep;
Session[
"Report"
] = rep;
CrystalReportViewer1.DataBind();
CrystalReportViewer1.RefreshReport();
}
Thanks in advance ,
Karthik k
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
how to send codes via call ?
Can we make the background of a testbox transparent?