sraj muneer

sraj muneer

  • NA
  • 22
  • 8.9k

how to view image in crystal report from column image type?

May 14 2017 3:38 AM

how to view image from datagridview to crystal report from column image type in sql server ?

I want view picture in report with data ( name , address , image) I'm use this code : 

  1. Dim dt As New DataTable  
  2.      With dt  
  3.          .Columns.Add("names")  
  4.          .Columns.Add("address")  
  5.          .Columns.Add("image", System.Type.GetType("System.Byte[]"))  
  6.      End With  
  7.      For Each dr As DataGridViewRow In Me.DataGridView1.Rows  
  8.          dt.Rows.Add(dr.Cells("names").Value, dr.Cells("address").Value, dr.Cells("image").Value)  
  9.      Next  
  10.   
  11.   
  12.      Dim rptdoc As CrystalDecisions.CrystalReports.Engine.ReportDocument  
  13.      rptdoc = New CrystalReportCount  
  14.      rptdoc.SetDataSource(dt)  
  15.   
  16.      CRCountTotal.CrystalReportViewer1.ReportSource = rptdoc  
  17.      CRCountTotal.ShowDialog()  
  18.      CRCountTotal.Dispose()  

with my code don't show image but show data only with any rows in report

please help solve in my code


 


Answers (2)