Hi i am trying to display records in access database that have pictures saves binary data i have created typed dataset that populate the crystal report but the problem is the images do not display

code is as below i have attached sample report

Imports System.Data
Imports System.Configuration
Imports System.Data.OleDb
Imports CrystalDecisions.CrystalReports.Engine
Public Class frmprojectreport

Private Function GetData(query As String) As Projectdataset
    '  Dim connstring As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Dams.mdb;Persist Security Info=False;"
    Dim connect As New OleDbConnection
    Dim conString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Dams.mdb;Persist Security Info=False;"
    Dim cmd As New OleDbCommand(query)
    Using con As New OleDbConnection(conString)
        Using sda As New OleDbDataAdapter()
            cmd.Connection = con

            sda.SelectCommand = cmd
            Using dsEmployees As New Projectdataset()
                sda.Fill(dsEmployees, "Projects")
                Return dsEmployees
            End Using
        End Using
    End Using
End Function

Private Sub frmprojectreport_Load(sender As Object, e As EventArgs) Handles Me.Load
    ' If Not IsPostBack Then
    Dim crystalReport As New ReportDocument()
    crystalReport.Load(Application.StartupPath + ("\Projectsrpt.rpt"))
    Dim dsprojects As Projectdataset = GetData("select * from Projects")
    CrystalReportViewer1.ReportSource = crystalReport
    'End If
End Sub

End Class

Edited by Dani: Formatting fixed

Attachments report.fw_.png 76.4 KB
2 Years
Discussion Span
Last Post by OtepTheThird
This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.