public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CRverproduccionblanking rpt = new CRverproduccionblanking();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        public void crystalrpt(string parametro)
        {
            CRverproduccionblanking crystalreport = new CRverproduccionblanking();

            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();
        }