By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,824 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,824 IT Pros & Developers. It's quick & easy.

Error when using PrintToPrinter method - "Invalid report file path"

P: n/a
Hi all,

I hope someone can help me as I'm going a bit metal with this problem.

I have a project in ASP.NET, within this project I have Crystal Report
called Catalogue. On an asp page I have a report viewer control
(vwrReportViewer) and a report document control (reportDocument1). On
the load of the page I have the following code.

reportDocument1 = GetCatalogueSampleReport(DBConnectionString(this.S ession),
int.Parse(Request.QueryString["CatalogueID"]));
vwrReportViewer.ReportSource = reportDocument1;

GetCatalogueSampleReport returns a report document. I am able to view
the report perfectly.

On this asp page I also have a button, when this is pressed I'd like
to print the report using the PrintToPrinter method of
reportDocument1. Below is the code behind the click event of that
button.

this.reportDocument1.PrintOptions.PrinterName = "\\\\BIGBOSS\\HP
LaserJet 2100 Series PS";
this.reportDocument1.PrintToPrinter(1, false, 0, 0);

I get the following error on calling the PrintToPrint method.

Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveRep ortException:
Invalid report file path.

I can't hard code the report path because I want to be able to use
this viewer for all the reports in this project.

Can anyone help?

Nicola
Nov 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.