コード例 #1
0
 private void Frm_DepartmentPowerFeeRep_Load(object sender, EventArgs e)
 {
     string sql = "Select * From TEMP_HINGEPOWER ORDER BY CustomerNo";
     DataTable dt = SQLUtl.Query(sql).Tables["dataSet"];
     DepartmentPowerFeeRep depPowerFeeRep = new DepartmentPowerFeeRep();
     depPowerFeeRep.SetDataSource(dt);
     crystalReportViewer1.ReportSource = depPowerFeeRep;
     TextObject txtMonth = (TextObject)depPowerFeeRep.ReportDefinition.ReportObjects["txtMonth"];
     txtMonth.Text = month;
     TextObject txtPeople = (TextObject)depPowerFeeRep.ReportDefinition.ReportObjects["txtPeople"];
     txtPeople.Text = Constant.LoginUser.UserName;
     if (Constant.LoginUser.Permission.Trim().Equals("一般操作员"))
     {
         crystalReportViewer1.ShowPrintButton = false;
     }
 }
コード例 #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     DepartmentPowerFeeRep rpt = new DepartmentPowerFeeRep();
     rpt.Site = this.Site;
     return rpt;
 }