private void frmAlertaControlPuerperio_Load(object sender, EventArgs e)
        {
            try
            {
                if (Reporte == "")
                {
                    CapaUsuario.Alertas.rptAlertaControlPuerperio rptAlertaControlPeuperio = new rptAlertaControlPuerperio();

                    crParameterDiscreteValue.Value = cVariables.v_idobstetra;
                    crParameterFieldDefinitions    = rptAlertaControlPeuperio.DataDefinition.ParameterFields;
                    crParameterFieldDefinition     = crParameterFieldDefinitions["pidtobstetra"];
                    crParameterValues.Add(crParameterDiscreteValue);
                    crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);

                    crParameterDiscreteValue.Value = cVariables.v_idestablecimientosalud;
                    crParameterFieldDefinitions    = rptAlertaControlPeuperio.DataDefinition.ParameterFields;
                    crParameterFieldDefinition     = crParameterFieldDefinitions["pidtestablecimientosalud"];
                    crParameterValues.Add(crParameterDiscreteValue);
                    crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);

                    crystalReportViewer1.ReportSource = rptAlertaControlPeuperio;
                    crystalReportViewer1.Refresh();
                }
            }
            catch (Exception m)
            {
                MessageBox.Show(m.Message);
            }
        }
Exemplo n.º 2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptAlertaControlPuerperio rpt = new rptAlertaControlPuerperio();

            rpt.Site = this.Site;
            return(rpt);
        }