SAP Knowledge Base Article - Public

1688710 - When printing a Crystal report with parameters using 'PrintToPrinter' method, report does not prompt for parameter values.

Symptom

  1. In a custom Crystal Reports .NET application to print a report using 'PrintToPrinter' method, report does not prompt for parameters.
  2. A Crystal reports .NET application to print a report with parameters using 'PrintToPrinter' method fails with below error message.

Error : "Missing parameter values"

Environment

  • Visual Studio 2003 / Visual Studio 2005 / Visual Studio 2008 / Visual Studio 2010
  • Crystal Reports for Visual Studio 2005 / Crystal Reports for Visual Studio 2008 / Crystal Reports 2008 / Crystal Reports for Visual Studio 2010

Cause

  • The parameter prompts are provided by 'Crystal Reports Viewer'.
  • Report prompts for parameters values only when the 'Crystal Reports Viewer' is used.
  • When the 'PrintToPrinter' method (SDK API) is used to print the report (and not 'Crystal Reports Viewer'), report will not prompt for parameters.

Resolution

  • This is a default or by design behavior of Crystal Reports .NET SDK.
  • When printing the report with SDK API methods (PrintToPrinter, PrintOutputController) the parameter values should be passed through code.

See Also

Crystal Reports.NET SDK sample applications.

Keywords

CR2010, 2010, CR4VS2010, CR4VS, VS2010, NET2010, Crystal Reports for .NET Framework 4.0, CR2008, CR12, CRVS2008, CR.NET

, KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

Crystal Reports 2008 V1