N
Nicola George
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.Session),
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.LoadSaveReportException:
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
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.Session),
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.LoadSaveReportException:
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