cancel
Showing results for 
Search instead for 
Did you mean: 

crystal report: client-side printing problem

Former Member
0 Kudos

Hello everyone,

I developed an asp.net web application / c # - VS2012 - crystal Repport (CRforVS_13_0_5) on windows 7 pro 32 bits, everything is ok even print reports.

The problem is that when hosting the web application in IIS on the same machine (Windows 7 pro 32 bit) printing the report (crystal report) does not work;

my code behind:

ReportDocument cryRpt = new ReportDocument;
  string path = "../rpt/demande.rpt";
  cryRpt.Load(Server.MapPath(@path));
  ParameterFieldDefinitions crParameterFieldDefinitions;
  ParameterFieldDefinition crParameterFieldDefinition;
  ParameterValues crParameterValues = new ParameterValues();
  ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
  crParameterDiscreteValue.Value = "value";
  crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
  crParameterFieldDefinition = crParameterFieldDefinitions["val"];
  crParameterValues = crParameterFieldDefinition.CurrentValues;
  crParameterValues.Clear();
  crParameterValues.Add(crParameterDiscreteValue);
  crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
  cryRpt.SetDatabaseLogon(user, pw);
  CrystalReportViewer1.Visible = true;
  CrystalReportViewer1.ReportSource = cryRpt;
  cryRpt.PrintToPrinter(1, false, 0, 0);


how to print the report on the client side?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

The search term 'crystal net client side print' brings up the following (amongst many other):

KBA: 1214466 - How to print a report from a .NET Web application

KBA: 1216932 - How to print directly to a printer instead of PDF in a CR 10 ASP.NET application

KBA: 1983821 - How to achieve client side printing without using the Crystal Reports viewer

The above should help you out. BTW.; the search box is in the top right corner.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Answers (0)