0

Hello,

I have prepared a crystal report (asp.net 3.5 / vs 2008) .

On my web form i have a textbox which accepts a membership number and a View button. When i enter the membership number and click on view my report should be displayed below on the same page with the appropriate details of that member. I have prepares SP for the same.

Below is the code that am trying , I want to know how to proceed further...

ReportDocument RPT = new ReportDocument();
        RPT.Load(Server.MapPath(// path here));   // Here i am getting error Virtual Path Invalid....
        this.CrystalReportViewer1.ReportSource = RPT;
        this.CrystalReportViewer1.DataBind();

My Crystal report name is SampleReport.rpt.

Also please let me know the namespace that we need to use..

i searched enuf for the code that can help me out but in vain..

Please help me to solve this problem... If you have any other method or code please do let me know

Thanks in advance..

Rohan Laghate

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by jbisono
0

this is how i loaded it up.

rpt.Load(Server.MapPath("~/reports/myreport.rpt"));

all my reports are under a folder called reports.
hope that help.

Edited by jbisono: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.