Current path of the crystal report,
-
hi,i have created one project its working fine on my machine but when it is installed on some other machine it gives the error Loading report failed because i am loading my reports dynamically through code and i have specified the address of local machine(i.e. d drive).Tell me how te get the path of report file so that i dont have to specify the path manually. Thanx. GIRISH
-
hi,i have created one project its working fine on my machine but when it is installed on some other machine it gives the error Loading report failed because i am loading my reports dynamically through code and i have specified the address of local machine(i.e. d drive).Tell me how te get the path of report file so that i dont have to specify the path manually. Thanx. GIRISH
ShuklaGirish wrote:
hi,i have created one project its working fine on my machine but when it is installed on some other machine it gives the error Loading report failed because i am loading my reports dynamically through code and i have specified the address of local machine(i.e. d drive).Tell me how te get the path of report file so that i dont have to specify the path manually. Thanx. GIRISH
Maybe you can try specifying the path of the report as relative to where your application is?
-
hi,i have created one project its working fine on my machine but when it is installed on some other machine it gives the error Loading report failed because i am loading my reports dynamically through code and i have specified the address of local machine(i.e. d drive).Tell me how te get the path of report file so that i dont have to specify the path manually. Thanx. GIRISH
Depending on where your report is stored relative to your app's .EXE file, you might want to start with something like this:
Dim appPath As String = Application.StartupPath Dim reportPath As String = Path.Combine(appPath, "somereport.rpt") ' Load your report from the path in "reportPath".
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007