我想列出所有要报告的药物名称。由于药品名称不止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();
}