Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing a parameter to Crystal Reports

Status
Not open for further replies.

DotNetDunce

Programmer
Aug 23, 2001
47
0
0
US
I have created a report using Crystal Reports in VS 2005 and everything works great on my local machine. There is a parameter field in the report and before the report is displayed, a prompt is displayed to collect the user data. When I run the application through the web server, all works fine until I get to the prompt. I enter the data for the parameter and click submit and get a javascript error and the page won't submit to run the report. Can this not be done over the web like on the local machine? Since it's a javascript error is there a file missing on the server?

I've looked over a lot of the threads here and can't get any of them to work for me.

Thanks in advance for your help.
 
I'm apologize for not posting sooner.

Here is the example I was given to figure it out.

Code:
ReportDocument doc = new ReportDocument(); string fileName = Server.MapPath("ReportName.rpt");
doc.Load(fileName); 
doc.SetDatabaseLogon("login", "pass"); 
doc.SetParameterValue("param_name", param_value);
doc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "PDFName"); 
doc.Dispose();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top