Agora vamos ver como criar methodos abstratos em C#:

public abstract ReportDocument criarRelatorio(); //na super classe

Para reescrever esse metodo nas subclasses:

public override ReportDocument criarRelatorio()//tem q por o override senao da erro
        {

               this.carregaRelatorio();
               MyReport.SetDataSource(Ds);
               MyReport.SetParameterValue("total_rows", this.Cont.ToString());
               MyReport.SetParameterValue("total", this.Total);
               MyReport.SetParameterValue("dataini", this.Dt1);
               MyReport.SetParameterValue("datafim", this.Dt2);

               return MyReport;

        }

Pronto =D!

Nenhum post foi relacionado a este