Jaime R

Jaime R

  • NA
  • 3
  • 809

making this report in c # and Crystal report

Aug 9 2015 12:44 PM
Hello everyone.
I have a headache. making this report in C # and Crystal report.
everything is fine. My code displays the serial number on the report, but
when printing, the number of saved job is printed.
 
this is my code.
 
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.
can you can help ?
 
 

Answers (2)