wenkket sethalam

wenkket sethalam

  • 1.6k
  • 128
  • 5k

How to Print report.rdlc with print document ...?

Dec 27 2017 4:14 AM
Hi...
 
I am trying to Print ''report.rdlc'' using with print document..
 
But it getting Empty page..
 
What i Did.--
 
1). Created One 'report.rdlc' report with dataset
2). And Credted Form2 to print preview
 
and add Print button in form2
 
in the print button code is..
 
private void Form2_Load(object sender, EventArgs e)
{
int InvSl = Convert.ToInt32(Form1.passInvno);
// TODO: This line of code loads data into the 'Bill_sale_dataset.Sale_items' table. You can move, or remove it, as needed.
this.Sale_itemsTableAdapter.Fill(this.Bill_sale_dataset.Sale_items, InvSl);
this.reportViewer1.RefreshReport();
}
private void printDocument1_PrintPage(object sender, PrintPageEventArgs e)
{
int InvSl = Convert.ToInt32(Billing_Sales.passInvno);
this.Sale_itemsTableAdapter.Fill(this.Bill_sale_dataset.Sale_items, InvSl);
}
private void button1_Click(object sender, EventArgs e)
{
printDocument1.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage);
printDocument1. Print();
}
 
Pls. help me..

Answers (1)