Link to home
Create AccountLog in
Avatar of hariprasadere

asked on

crystal report path on the target machine

hi i have a project where i am using crystalreports.I have a problem when i deployee my application into the target the code i have written

cr1.reportsource="c:\ems\Reports\test.rpt".It works fine on my machine but in the target machine i have an errors"Loadreport failed".

how can i view the reports in the target know there is a app.path in vb6  where you can find the file .
how do i use in
Avatar of nayernaguib
Flag of Egypt image

Use System.Windows.Forms.Application.StartupPath. Don't forget to append a backslash "\" to the end of the path. For example:

  cr1.reportsource=System.Windows.Forms.Application.StartupPath + "\test.rpt"


  Nayer Naguib
Avatar of hariprasadere


again i have same problem here is my code
cr1.ReportSource = System.Windows.Forms.Application.StartupPath + "\shiphari.rpt"
After Salutation

Did you create your report by the Wizard?
yes i did
If so,

Sure,the proplem not where are the report , BUT

where are the database where can i get the table(query/view) which the report depend on it.

if so i can help you with the code instead to solve the problem.
Avatar of M3MM

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks ,

i'm glad you accppted my answer, so you had solved your problem

thanks for the points.........