Hi,
i've created an ado.net Dataset and can show it with the Crystal Reports Viewer.
Now, i will print the report.
I have implemented this code:
PageMargins margins;
margins = oRpt.PrintOptions.PageMargins;
margins.bottomMargin = 350;
margins.leftMargin = 350;
margins.rightMargin = 350;
margins.topMargin = 350;
oRpt.PrintOptions.ApplyPageMargins(margins);
oRpt.PrintOptions.PrinterName = "\\PRNLSHI\\EDVPRN5";
oRpt.PrintToPrinter(1, false,0,0);
oRpt is the report.
The printername is correct. I get this error message:
An unhandled exception of type 'CrystalDecisions.CrystalReports.Engine.InvalidArgumentException' occurred in crystaldecisions.crystalreports.engine.dll
Additional information: Error in File C:\DOCUME~1\Lulli\LOCALS~1\Temp\temp_8606af39-3797-44f0-be9e-748324ac17ac.rpt:
Invalid printer specified.
Thanks,
Stephanie
i've created an ado.net Dataset and can show it with the Crystal Reports Viewer.
Now, i will print the report.
I have implemented this code:
PageMargins margins;
margins = oRpt.PrintOptions.PageMargins;
margins.bottomMargin = 350;
margins.leftMargin = 350;
margins.rightMargin = 350;
margins.topMargin = 350;
oRpt.PrintOptions.ApplyPageMargins(margins);
oRpt.PrintOptions.PrinterName = "\\PRNLSHI\\EDVPRN5";
oRpt.PrintToPrinter(1, false,0,0);
oRpt is the report.
The printername is correct. I get this error message:
An unhandled exception of type 'CrystalDecisions.CrystalReports.Engine.InvalidArgumentException' occurred in crystaldecisions.crystalreports.engine.dll
Additional information: Error in File C:\DOCUME~1\Lulli\LOCALS~1\Temp\temp_8606af39-3797-44f0-be9e-748324ac17ac.rpt:
Invalid printer specified.
Thanks,
Stephanie