'How can i print directly without using report viewer with report Parameters, it will just print a blank report

It will print the report but wont add the report Parameters

private void button1_Click(object sender, EventArgs e) {

        ReportParameterCollection reportParameters = new ReportParameterCollection();
        reportParameters.Add(new ReportParameter("Pallet_label", lb_pallet_name.Text));
        reportParameters.Add(new ReportParameter("Par_PalNum", LB_Number.Text));
       
        this.rvLabel_pallet.LocalReport.SetParameters(reportParameters);

        this.rvLabel_pallet.RefreshReport();
        
        rvLabel_pallet.Visible = true;

         LocalReport localReport = new LocalReport();
       
       
        localReport.ReportPath = rvLabel_pallet + "//pallet_label.rdlc";
        //localReport.SetParameters(reportParameters);

        this.rvLabel_pallet.RefreshReport();
        localReport.PrintToPrinter();

       
       
        

        rvLabel_pallet.Visible = false;


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source