private void Frm_AreaPowerFeeRep_Load(object sender, EventArgs e)
 {
     string sql = "Select * From TEMP_CAREAPOWER ORDER BY AreaNo";
     DataTable dt = SQLUtl.Query(sql).Tables["dataSet"];
     AreaPowerFeeRep areaPowerFeeRep = new AreaPowerFeeRep();
     areaPowerFeeRep.SetDataSource(dt);
     crystalReportViewer1.ReportSource = areaPowerFeeRep;
     TextObject txtTop = (TextObject)areaPowerFeeRep.ReportDefinition.ReportObjects["txtTop"];
     txtTop.Text = top;
     TextObject txtMonth = (TextObject)areaPowerFeeRep.ReportDefinition.ReportObjects["txtMonth"];
     txtMonth.Text = month;
     TextObject txtPeople = (TextObject)areaPowerFeeRep.ReportDefinition.ReportObjects["txtPeople"];
     txtPeople.Text = Constant.LoginUser.UserName;
     if (Constant.LoginUser.Permission.Trim().Equals("一般操作员"))
     {
         crystalReportViewer1.ShowPrintButton = false;
     }
 }
Esempio n. 2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     AreaPowerFeeRep rpt = new AreaPowerFeeRep();
     rpt.Site = this.Site;
     return rpt;
 }