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
Pravin Ghadge
571
2.1k
586.2k
Database Login
Nov 9 2011 1:10 PM
Dear all.
I have created crystal report.
While opening crystal report through application it shows me Database Login Window.
I have used foll. code:
string reppath = "";
con = oDAL.OpenConnection();
rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
string DOCENTRY = "";
ParameterFields myparam = new ParameterFields();
ParameterField param1 = new ParameterField();
ParameterDiscreteValue dv1 = new ParameterDiscreteValue();
if (DocEntry != null)
{
DOCENTRY = DocEntry;
}
else
{
DOCENTRY = "";
}
con = oDAL.OpenConnection();
param1.ParameterFieldName = "DocEntry";
dv1.Value = DOCENTRY;
param1.CurrentValues.Add(dv1);
//myparam.Add(param1);
//myparam.Add(param2);
myparam.Add(param3);
crystalReportViewer1.ParameterFieldInfo = myparam;
reppath = oDAL.ReportPath + "\\" + ReportName;
// reppath = Application.StartupPath+"\\Reports" + "\\" + ReportName;
rd.Load(reppath);
rd.DataSourceConnections[0].SetConnection(oDAL.servername, oDAL.DatabaseName, oDAL.UserID, oDAL.UserPassword);
rd.SetParameterValue("DocEntry", DocEntry);
crystalReportViewer1.ShowGroupTreeButton = false;
crystalReportViewer1.ReportSource = rd;
crystalReportViewer1.Refresh();
crystalReportViewer1.BringToFront();
crystalReportViewer1.ShowCloseButton = true;
Reply
Answers (
4
)
SSRS
Crystal report objects by their position ?