tags:

views:

131

answers:

1

hi, I have created reports using crystalreports in my asp.net application(vb).It was fine.But when i run it in another system, the report loading fails.so i modified my code like this.

sub Loadreport()
try
Dim sreport as new ReportDocument
sreport.Load(Server.MapPath("ClientList.rpt"))
sreport.FileName=Server.MapPath("ClientList.rpt")

catch(ex.exception)

end try
End sub

When i control comes to the line:-

sreport.Load(Server.MapPath("ClientList.rpt"))

it jumps to the catch block showing that "Invalid Report path".But initially, the code was not showing any error.what happened to it after a while.i havent changed the path.then whats wrong?

A: 

Log the path to the trace file or an error log or reponse.write it and see if the path on the "other system" is the correct path where the ClientList.rpt is stored.

abmv