コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ReportDocument reportDocumentObj = new ReportDocument();

        reportDocumentObj.Load(Server.MapPath("~/eForms/eFormTempletes/DrillReport.rpt"));

        DataSet ds = BLL_FRM_LIB_DrillReport.Get_DRILL_REPORT_Log(Convert.ToInt32(Request.QueryString["Vessel_ID"]), Convert.ToInt32(Request.QueryString["Schedule_Id"]), Convert.ToInt32(Request.QueryString["Office_Id"]));



        reportDocumentObj.SetDataSource(ds);
        reportDocumentObj.Subreports["DrillReportDtl"].SetDataSource(ds.Tables[1]);
        reportDocumentObj.Subreports["DrillReportAns"].SetDataSource(ds.Tables[2]);
        reportDocumentObj.Database.Tables[0].SetDataSource(ds.Tables[0]);
        reportDocumentObj.Subreports["DrillReportDtl"].Database.Tables[0].SetDataSource(ds.Tables[1]);
        reportDocumentObj.Subreports["DrillReportAns"].Database.Tables[0].SetDataSource(ds.Tables[2]);
        CrystalReportViewer1.ReportSource     = reportDocumentObj;
        CrystalReportViewer1.DisplayToolbar   = true;
        CrystalReportViewer1.DisplayGroupTree = false;
    }
コード例 #2
0
ファイル: DrillReport.aspx.cs プロジェクト: 15831944/JIBE-ERP
 private void Load_Drill_Report_Details(int Vessel_ID, int Schedule_Id, int?Office_Id)
 {
     try
     {
         DataSet ds = BLL_FRM_LIB_DrillReport.Get_DRILL_REPORT_Log(Vessel_ID, Schedule_Id, Office_Id);
         if (ds.Tables[0].Rows.Count > 0)
         {
             lblReportDate.Text = ds.Tables[0].Rows[0]["ReportDate"].ToString();
             lblVesselName.Text = ds.Tables[0].Rows[0]["Vessel_Name"].ToString();
             lblDrillName.Text  = ds.Tables[0].Rows[0]["PROGRAM_NAME"].ToString();
             lblLocation.Text   = ds.Tables[0].Rows[0]["Location"].ToString();
         }
         grd_Drill_Description.DataSource = ds.Tables[1];
         grd_Drill_Description.DataBind();
         grd_Details_Answer.DataSource = ds.Tables[2];
         grd_Details_Answer.DataBind();
         gvTrainingItems.DataSource = ds.Tables[3];
         gvTrainingItems.DataBind();
     }
     catch
     {
     }
 }