public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CRvernumparteslitter rpt = new CRvernumparteslitter(); rpt.Site = this.Site; return(rpt); }
public void crystalrpt(string parametro) { CRvernumparteslitter crystalreport = new CRvernumparteslitter(); crystalreport.SetDatabaseLogon("sa", "Jaguar1", "WIN-SERVER\\JAGUARIRA", "SistemaProduccion"); ParameterFieldDefinitions crParameterFieldDefinitions; ParameterFieldDefinition crParameterFieldDefinition; ParameterValues crParameterValues = new ParameterValues(); ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue(); crParameterDiscreteValue.Value = cbxcliente.Text; crParameterFieldDefinitions = crystalreport.DataDefinition.ParameterFields; crParameterFieldDefinition = crParameterFieldDefinitions[parametro]; crParameterValues.Add(crParameterDiscreteValue); crParameterFieldDefinition.ApplyCurrentValues(crParameterValues); crystalReportViewer1.ReportSource = crystalreport; crystalReportViewer1.Refresh(); crystalReportViewer1.RefreshReport(); }