Crystal Report列出数据库中的所有搜索结果

时间:2019-01-07 08:25:31

标签: c# mysql crystal-reports

我想列出所有要报告的药物名称。由于药品名称不止1。任何可以帮助我列出所有药品名称的想法?

    private void CustomerInvoicePrint_Load(object sender, EventArgs e)
    {
        TestingCustomerInvoice ob = new TestingCustomerInvoice();
        con.Open();
        cmd = new MySqlCommand("select * from patientmedicine where ConsultationResultID='" + consultationid + "'", con);
        read = cmd.ExecuteReader();
        while (read.Read())
        {
            ob.SetParameterValue("medicinename", medicinename);
            medicinename = read["MedicineName"].ToString();                
        }

        con.Close();                    
        crystalReportViewer1.ReportSource = ob;
        crystalReportViewer1.Refresh();

    }

0 个答案:

没有答案