Pankaj  Kumar Choudhary

Pankaj Kumar Choudhary

  • 69
  • 26.6k
  • 13.4m

Crytal Report

Aug 11 2015 12:08 AM
Hello I making this report in C # and Crystal report. everything is fine. My code displays the order number on the report, but when printing, is the number of saved job is printed. not print the current order number order
 
can any one help me? 
 code is>
 
private void imprimir_pedido()
{ CrystalDecisions.CrystalReports.Engine.ReportDocument rptDoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
ParameterFields paramFields = new ParameterFields();
ParameterField paramField = new ParameterField();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@Id_Pedido";
paramDiscreteValue.Value = _numero_despacho; paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewerPedidos.ParameterFieldInfo = paramFields; rptDoc.Load("D:/xxxxxxxxxxxx.rpt"); rptDoc.SetDatabaseLogon("xxxxxxxx", "xxxxxxxxxxxxxx"); crystalReportViewerPedidos.ReportSource = rptDoc; rptDoc.PrintToPrinter(1, false, 0, 0); }
 
 
Note:. I in crystal report is marked with check the option "save data in the report". with the order number "always prints". But if I recall check, nothing prints.
 

Answers (1)