470,814 Members | 1,197 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,814 developers. It's quick & easy.

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

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),
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

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?

Nov 17 '05 #1
0 1719

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Beryl Small | last post: by
6 posts views Thread by Patrick Dugan | last post: by
2 posts views Thread by Neviton | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.