public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     VCutProductCheckReport rpt = new VCutProductCheckReport();
     rpt.Site = this.Site;
     return rpt;
 }
 private void btnReport_Click(object sender, EventArgs e)
 {
     if (dgvData.Rows.Count - 1 > 0)
     {
         Main.PGB pgb = new Main.PGB();
         pgb.progressBar1.Style = ProgressBarStyle.Marquee;
         pgb.progressBar1.MarqueeAnimationSpeed = 2000;
         pgb.Text = "啟動報表";
         pgb.label1.Text = "報表啟動中.....請稍候";
         pgb.Show();
         Application.DoEvents();
         if (srcData.Columns.Contains("ID"))
         {
             srcData.Columns.Remove("ID");
         }
         DataSet insert = new DataSet();
         insert.Tables.Add(srcData);
         insert.WriteXmlSchema("TEMP.xml");
         try
         {
             Application.DoEvents();
             VCutProductCheckReport report = new VCutProductCheckReport();
             report.SetDataSource(insert);
             rtpVCutProductCheckRefer rvpcr = new rtpVCutProductCheckRefer();
             rvpcr.crystalReportViewer1.ReportSource = report;
             rvpcr.Show();
             insert.Tables.Remove(srcData);
             insert.Dispose();
             pgb.Dispose();
         }
         catch (Exception ex)
         {
             sysMessage.SystemEx(ex.Message);
         }
     }
     else
     {
         sysMessage.NoData();
     }
 }