简体   繁体   中英

Datagridview data printing error in crystal reports

I am printing datagridview data (sales invoice). When I click the print button, no data is shown in the crystal reports

Code is Here for Report View:

private void crystalReportViewer1_Load(object sender, EventArgs e)
{
    frmPrint obj = new frmPrint();

    CrystalReport1 rpt = new CrystalReport1();

    frmNewSale sale = new frmNewSale();
    DataSet ds = new DataSet();
    rpt.SetDataSource(ds.Tables["GridInovice"]);
    this.crystalReportViewer1.ReportSource = rpt;
    crystalReportViewer1.Refresh();
}

Using datatable but click the print button view report is blank.

Read my post here : I dont see in your code, where you pass data to report

https://stackoverflow.com/a/53775808/10785732

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM