Skip to Content
author's profile photo Former Member
Former Member

Image from Database

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 09, 2011 at 02:16 PM

    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}'



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.