你好我在c#软件中有报告,但它没有从数据库加载图片,我该如何解决这个错误呢?
代码加载数据是:
String Query = "SELECT Utente.LogoAzienda,Preventivo.DataInserimento,Preventivo.RiferimentoInterno,Preventivo.Testata,Preventivo.Chiusura,Cliente.Titolo,Cliente.RagioneSociale,Cliente.Indirizzo,Cliente.Cap,Cliente.Citta,Cliente.Provincia FROM Preventivo inner join Cliente on Cliente.IdCliente = Preventivo.IdCliente inner join Utente on Preventivo.UtenteCreazione = Utente.Username";
SqlConnection conn = db.apriconnessione();
DataStampaPreventivoCompleto d = new DataStampaPreventivoCompleto();
SqlDataAdapter da = new SqlDataAdapter(Query, conn);
da.Fill(d, d.Tables[0].TableName);
ReportDataSource rds = new ReportDataSource("DataSet1",d.Tables[0]);
this.reportViewer.LocalReport.EnableExternalImages = true;
this.reportViewer.LocalReport.DataSources.Clear();
this.reportViewer.LocalReport.DataSources.Add(rds);
this.reportViewer.LocalReport.Refresh();
this.reportViewer.RefreshReport();
db.chiudiconnessione();
conn.Close();