Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            RP_DiemCaNamSV rpt = new RP_DiemCaNamSV();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void crpv_DiemCaNamSV_Load(object sender, EventArgs e)
        {
            RP_DiemCaNamSV            rp = new RP_DiemCaNamSV();
            ParameterValues           a  = new ParameterValues();
            ParameterDiscreteValue    b  = new ParameterDiscreteValue();
            ParameterFieldDefinitions c;
            ParameterFieldDefinition  d;

            b.Value = paratext_maK.ToString();
            c       = rp.DataDefinition.ParameterFields;
            d       = c["@maK"];
            a       = d.CurrentValues;

            a.Clear();
            a.Add(b);
            d.ApplyCurrentValues(a);
            //Ma nghanh
            ParameterValues           a1 = new ParameterValues();
            ParameterDiscreteValue    b1 = new ParameterDiscreteValue();
            ParameterFieldDefinitions c1;
            ParameterFieldDefinition  d1;

            b1.Value = paratext_maN.ToString();
            c1       = rp.DataDefinition.ParameterFields;
            d1       = c1["@maN"];
            a1       = d1.CurrentValues;

            a1.Clear();
            a1.Add(b1);
            d1.ApplyCurrentValues(a1);
            // Ma lop
            ParameterValues           a2 = new ParameterValues();
            ParameterDiscreteValue    b2 = new ParameterDiscreteValue();
            ParameterFieldDefinitions c2;
            ParameterFieldDefinition  d2;

            b2.Value = paratext_maL.ToString();
            c2       = rp.DataDefinition.ParameterFields;
            d2       = c2["@maL"];
            a2       = d2.CurrentValues;

            a2.Clear();
            a2.Add(b2);
            d2.ApplyCurrentValues(a2);
            //Ma SV
            ParameterValues           a4 = new ParameterValues();
            ParameterDiscreteValue    b4 = new ParameterDiscreteValue();
            ParameterFieldDefinitions c4;
            ParameterFieldDefinition  d4;

            b4.Value = paratext_maSV.ToString();
            c4       = rp.DataDefinition.ParameterFields;
            d4       = c4["@maSV"];
            a4       = d4.CurrentValues;

            a4.Clear();
            a4.Add(b4);
            d4.ApplyCurrentValues(a4);


            crpv_DiemCaNamSV.ReportSource = rp;
            crpv_DiemCaNamSV.Refresh();
        }