第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

crystalReportViewer打印預(yù)覽為空白

crystalReportViewer打印預(yù)覽為空白

月關(guān)寶盒 2018-12-07 07:28:24
打印按鈕的代碼如下,但是處理完后crystalReportViewer的對(duì)象打印預(yù)覽只是一片空白,ds.table[0]顯示沒有數(shù)據(jù),不知為何數(shù)據(jù)獲取不了,請(qǐng)問如何解決呢 private void button1_Click_1(object sender, EventArgs e) { Form_ClystylePrint frm_print = new Form_ClystylePrint(); MyData mydata = new MyData(); SqlConnection cn = mydata.getConn(); SqlCommand cmd = new SqlCommand(); cmd.Connection = cn; cn.Open(); cmd.CommandText = "select examiner 考官,car_shool 駕校,car 車牌號(hào),car_type 車型,students_num 預(yù)約人數(shù),table_maker 制表人 from Arrange_Table where exam_date = getdate()"; SqlDataAdapter sda = new SqlDataAdapter(cmd.CommandText, cn); DataSet ds = new DataSet(); sda.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; CrystalReport1 rpt1 = new CrystalReport1(); rpt1.SetDataSource( ds.Tables[0]);//設(shè)置報(bào)表頁面數(shù)據(jù)源 frm_print.crystalReportViewer1.ReportSource = rpt1; cn.Close(); cmd.Dispose(); frm_print.Show(); }
查看完整描述

3 回答

?
湖上湖

TA貢獻(xiàn)2003條經(jīng)驗(yàn) 獲得超2個(gè)贊

是不是你的那個(gè)sql文本來檢索出來就沒有數(shù)據(jù)呢

查看完整回答
反對(duì) 回復(fù) 2019-01-21
?
慕村225694

TA貢獻(xiàn)1880條經(jīng)驗(yàn) 獲得超4個(gè)贊

這個(gè)看了下,但是貌似沒有提及datagridview的轉(zhuǎn)換,能指導(dǎo)下么

查看完整回答
反對(duì) 回復(fù) 2019-01-21
  • 3 回答
  • 0 關(guān)注
  • 405 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)