on 2008 Aug 27 9:07 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
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
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
User | Count |
---|---|
68 | |
8 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.