cancel
Showing results for 
Search instead for 
Did you mean: 

Image from Database

Former Member
0 Kudos

I have a Table with ReportElements. Every Element have a ID (ReportElementID) and a String (reportElementValue) or a Image (ReportElementBLOB).

To show the String in my report I use a SQL-Formular: "sqlCompanyName" - "(SELECT ReportElements.ReportElementValue FROM ReportElements WHERE ReportElementID='CompanyName')". That works fine.

If a want to show a logo on my report (ReportElementID='CompanyLogo') I try to use "sqlCompanyLogo" - "(SELECT ReportElements.ReportElementBLOB FROM ReportElements WHERE ReportElementID='CompanyLogo')"

I can put the field to my report. On the report I can see the logo. But if I change to the preview of the report, that CR2008 crashes.

My Database is a MS-SQL 2008 Express - ReportElementBLOB is from Type "Image" - I using CR2008

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you're used to using SSRS for reporting, then your approach will work just fine. SSRS has no problem working with multiple data sets on the same report.

CR isn't quite so flexible. Using two, unlinked, commands in CR will lead to a Cartesian product if the 2nd command returns more than 1 row of data.

Try incorporating both into the same command...


SELECT ReportElementValue, ReportElementBLOB 
FROM ReportElements 
WHERE ReportElementID = '{?CompanyID}'

HTH,

Jason

Answers (0)