public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CRvernumparte rpt = new CRvernumparte(); rpt.Site = this.Site; return(rpt); }
public void crystalrpt(string parametro) { CRvernumparte crystalreport = new CRvernumparte(); 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(); }