Hi all, i have a little problem here trying to print a crystal report document using the PrintToPrinter method. This process is trigger by the event click in a asp:button control, basically i just saying this.
rpt.PrintOptions.PrinterName = @"PathToPrinter";
rpt.PrintToPrinter(1, false, 0, 0);
this solution works fine if the report does not have any parameter, once a report has one or more parameters i have this error "System.Runtime.InteropServices.COMException: Missing parameter values."
I also tried to add the parameters again to the report so that my code lookslike this
Add parameters in here
rpt.PrintOptions.PrinterName = @"PathToPrinter";
rpt.PrintToPrinter(1, false, 0, 0);
Same error.
If someone can provide me any idea what am i missing, i will really appreciate it. thanks for reading.