cancel
Showing results for 
Search instead for 
Did you mean: 

Inserted Image ia not showing

Former Member
0 Kudos
70

I have a bunch of reports that require the company logo to be displayed. This logo can change depending on the branch that runs the report(s). Since each branch will have it's own database, we have a table with a single record containing the logo. I included the table in my database fields and I used drag and drop to place the image on the report. However, when I preview the report the the logo is not displayed. The image 'box' is there (I can select it) , but no image is shown. I used a VB app to display the image to verify it was there.

I spent most of the day looking for an answer with no luck.

Thanks for that help which can be given.

Marshall

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marshall,

Please provide more details about your development environment. Image replacement at runtime changed quite a bit between certain versions of Crystal Reports. What version of Visual Studios are you using? What version of Crystal Reports are you using? What have you tried already?

Thanks,

Dan Kelleher

Former Member
0 Kudos

I'm using VS.NET 2005. I'm using the Crystal Reports for Visual Studio 2005 designer that came with it. The database is SQL 2005 and the field is an image field. I've looked for solutions, but found none. Did not try anything else, not knowing what to try.

Former Member
0 Kudos

Are you able to see the images at design-time (there's an option to preview the report in the report designer embedded in VS.NET), or is it just at runtime (ie. in the CrystalReportViewer control) that the images aren't appearing? What type of connection to the database are you using at runtime, and is that different than the one the report was designed with? Is it a Windows or a Web app?

Former Member
0 Kudos

It does not display in design mode. I have not tried it at runtime. The database is accessed using the .NET Framework Data Provider for SQL Server and is the same one used in production. Windows authentication is used.

Former Member
0 Kudos

Does anyone have any suggestions concerning my problem?

Thanks.

Marshall

former_member183750
Active Contributor
0 Kudos

Try the latest SP for CR 10.2 (the .NET 2005 bundle):

https://smpdl.sap-ag.de/~sapidp/012002523100006007872008E/crvs05sp1.exe

Also,

1) do you have any other versions of Crystal Reports installed on this computer?

2) what is the field type as defined in the database?

3) can you insert and see Any OLE object if you insert it into the report? E.G.; jpg, bmp, etc?

Ludek

Former Member
0 Kudos

Hello, I´m having the same issue.

My environment is: Visual Studio 2008, CR 2008 for Visual Studio, SQL Server 2005, I have a single column (type of byte()) table that will hold the logo of the company. If I add the logo manually it looks fine, the problem is when running the report, the picture box is shown empty.

The rutine to populate the image column is as follows:


 'Company Logo
        Dim logoTable As New DataTable("CompanyLogoDataTable")
        logoTable.Columns.Add(New DataColumn("CompanyLogo", GetType(Byte())))
        Dim logoRow As DataRow = logoTable.NewRow
        logoRow.Item("CompanyLogo") = CType(CompanyInfoBO.GetImageForReport, Byte())
        ' Let´s see if we are getting something
       System.Diagnostics.Debug.Write("Buffer: " & CompanyInfoBO.GetImageForReport.Length)

And the GetCompanyLogo Method


 Public Function GetImageForReport() As Byte()
        Using bo As New CompanyInfoBO
            bo.FillAll()
            Dim buffer As Byte()
            Dim loStream As New MemoryStream(CType(bo.CurrentRow.Item("Logo"), Byte()))
            ' Me.BinaryFormatter.Serialize(loStream, bo.Logo)
            buffer = loStream.ToArray
            Return buffer
        End Using
    End Function

The CompanyInfoBO is a StrataFrame Business Objet that handles the connection string to the database.

I must say that this kind of issue is very frustrating

Answers (0)