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.

Recommended Answers

All 2 Replies

Hi jbisono.

I hope you solved your problem. I think it is a problem due to parameters.

Ok. definitely was a parameter problem. thanks adatapost.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.