Hello There,
I have created a project in C#, Hospital Management System,
In this project to display patient information from MS Access database I have used Crystal Report "CrystalReport.rpt", to this report I have declared database location in Design View by creating Connection String.
Now my problem is as this connection string is created in design view I have to give the exact location of my "Hospital_Management_System.mdb" file like "C:\Firdaus\Hospital Management System\App_Data\Hospital_Management_System.mdb", whenever I change location of my project I have to change connection string also, this is OK with code, but When I have created setup file I can't do the same after installing it.
I have added this file in App_Data folder and given path as
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\\Hospital_Management_System.mdb"); for entire project except in connection string of crystalreport.rpt as this is not possible!
It works properly even after changing location as expected...
What can I do with connection string for crystal report?
Thanks in Advance,
Firdaus Shaikh