on 08-29-2014 3:37 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.