Follow these steps
create a new form (To view Crystal Report)
add crystalreportviewer tool to that form
add below libraries
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportSource;
then call the below function in main form's button click
public void bill_Printing()
{
try
{
DataSet ds_Bill = invoice.Print_Bill();
ReportDocument rd = new ReportDocument();
rd.Load(Application.StartupPath + "\\Crystal_Report\\crptBill.rpt"); rd.Database.Tables[0].SetDataSource(ds_Bill.Tables[0]);
rd.SetParameterValue("@company", Company);
rd.PrintToPrinter(1, false, 0, 0);
}
catch (Exception)
{ }
}