Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forumguidelines
Methoun Ahmed
1.8k
145
59.4k
How to give the path for crystal report in c#
Jan 16 2018 4:58 AM
Hi,
I had created an application in c#.
But when i **move this appication to another drive,folder or PC.
I got error at crystal report **path. and need to change the path at every time when appication moved.
How to fix this problem.
means how to add it into c# resources so that path will be fix.
i will tried
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=ITRDB;Integrated Security=True");
ReportDocument crypt = new ReportDocument();
public ReportViewer()
{
InitializeComponent();
}
private void crystalReportViewer1_Load(object sender, EventArgs e)
{
SqlDataAdapter sda = new SqlDataAdapter("SELECT * FROM tblITReport WHERE Date between'"+fdate+"'and'"+tdate+"'",con);
DataTable dt = new DataTable();
DataSet dst = new DataSet();
sda.Fill(dst, "tblITReport");
crypt.Load(@"D:\My Project\C# Applicatin\ITReport\ITReport\ITReport\ITReport.rpt");
crypt.SetDataSource(dst);
crystalReportViewer1.ReportSource = crypt;
}
Reply
Answers (
3
)
querying Multiple Computer With wmi in c#
CrystalReport error??