0
需要關於.rdlc
報告的幫助。Rdlc報告C#.net
我有一個.RDLC
報告等附接一個。
在這裏,我可以打印每次每個學生一個idcard。我可以根據學生獨特的當前會話收集所需的數據,並將其傳遞給rdlc報告以打印該數據。
現在的問題是,如果我想打印/生成身份證面向全體學生,而不是打印一個承認,每次我應該怎麼現在辦卡?我可以獲得所有學生的數據,但我不知道如何在報告中表示他們以實現此目標。
private void btnsearch_Click(object sender, EventArgs e)
{
if (txtcardid.Text == "")
{
txtcardid.Focus();
return;
}
else if (txtcardid.Text != "")
{
string sel = "select * from tbl_student where Card_id='" + txtcardid.Text + "' ";
DataTable datTab = mod.filldatatbl(sel);
if (datTab.Rows.Count.ToString() == "0")
{
label2.ForeColor = Color.Red;
label2.Text = "No Records Found";
SqlDataAdapter sda = new SqlDataAdapter();
BindingSource bds = new BindingSource();
bds.DataSource = datTab;
sda.Update(datTab);
this.tbl_studentBindingSource.DataSource = bds;
this.reportViewer1.RefreshReport();
btnsearch.Text = datTab.Rows.Count.ToString();
}
else if (datTab.Rows.Count.ToString() != "0")
{
//string sel1 = "select distinct Card_id,StudentName,RollNo,class,ContactNo,section,dates,totalhour,status1, min(Intime) as Intime, max(Outtime) as Outtime from tbl_stuAtten where Card_id='" + textBox1.Text + "' and dates between '" + dateTimePicker1.Text + "' and '" + dateTimePicker2.Text + "' group by Card_id,StudentName,RollNo,class,ContactNo,section,dates,totalhour,status1";
//DataTable datTab1 = mod.filldatatbl(sel1);
string cnt;
cnt = datTab.Rows.Count.ToString();
label2.ForeColor = Color.Green;
label2.Text = "" + cnt + " : Records Found ";
SqlDataAdapter sda = new SqlDataAdapter();
BindingSource bds = new BindingSource();
bds.DataSource = datTab;
sda.Update(datTab);
btnsearch.Text = datTab.Rows.Count.ToString();
this.tbl_studentBindingSource.DataSource = bds;
this.reportViewer1.RefreshReport();
}
}
//this.reportViewer1.RefreshReport();
}
任何形式的幫助可以理解的;我花了幾個小時谷歌搜索,但在所有
首先創建一個報告,然後進行多個學生 – tharif
如果你能幫助我演示將是非常支持你, –
什麼現狀?獲取報告中的任何數據? – tharif