How to Retrieve the image data from database table and show in SSRS

  • Hi

    1)

    My Table is

    Create Table Image_table (id int,images image ,crdate datetime default getdate())

    Insert into Image_table (id )

    Select 1

    UPDATE dbo.Image_table SET images =(SELECT * FROM OPENROWSET(BULK C:\TestImage.JPG', SINGLE_BLOB) AS x)

    I have inserted a image in this table

    able to query and see that i have image in the table

    Select * from Image_table

    DECLARE @Command NVARCHAR(4000)

    SET @Command = 'bcp "SELECT images FROM Defects.dbo.Image_table" queryout "C:\FromDB.jpg" -T -n'

    EXEC xp_cmdshell @Command

    Able to write from database to my path but i am unable to preview the FromDB.jpg image

    2)Now i need to show the image from database in SSRS

    I dragged the image from tools

    in General tab i am having Name:,ToolTip:,Select Image source:

    in Select Image source---> 3 options are there External , Embedded,Database.

    I am choosing database ,i am getting two extra fields as use this fields: and use this MIME type:

    what i need to give here in order to retrieve the data from database and show in SSRS

    Thanks

  • Display Database Image using MS SQL Server 2008 Reporting Services

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hi,

    Thanks for that link.

    i am getting error as

    [rsMissingDataSetName] The tablix 'Tablix1' is invalid. The value for the DataSetName property is missing.

    what is the problem

    if run this images alone i am able to get the result I'm able to see the image,but where as if have more tables then i am getting this error i.e i am fetching few records from another tables and showing it and after 5 tables below that i am inserting this Image_table but getting error what might be wrong.

    Thanks!

  • You apparently added a Tablix but didn't specify a dataset.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (7/31/2012)


    You apparently added a Tablix but didn't specify a dataset.

    Yes!You are correct i have corrected them.now i have another problem.

    I am able to publish the result in my system.

    how can i view the report from another system

    Say System A is my system where i will publish the report and able to see the report ,but in system B if i specify the ipaddress of system A and SystemAipaddress[XXX.XX.XXX.XX]/Reports/Pages/Folder.aspx i am not able to view why. In system A i have not set it as localhost instead i have kept as

    http://SystemAipaddress[XXX.XX.XXX.XX]/Reportserver

    so eventually i must be able to see this report from System B, but I'm unable to see the report.How to resolve this.

    Thanks

  • Any errors when you try to browse to Report Manager?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • No i am not getting any error while browsing report manager.

  • Perhaps a security issue?

    How is the security configured on the datasource?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (7/31/2012)


    Perhaps a security issue?

    How is the security configured on the datasource?

    I dont see any configuration issue since i web page is not promoting for any userid or password .The web page not displaying it is going for google and saying that there is no such path.

    Thanks

  • Hi,

    Any one has the solutions for it i am not able to open in another system.can any one help on this.

    Thanks!

  • yuvipoy (7/31/2012)


    Hi,

    Any one has the solutions for it i am not able to open in another system.can any one help on this.

    Thanks!

    Can you describe in details what happens when you try to open the report?

    In the SSRS configuration, you can configure the server to give more detailed error messages.

    Enable Remote Errors (SSRS)

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • No i'm not getting any error on system B it is just saying as web page can not be displayed.

    Thanks!

  • Can you edit properties of the report? Maybe try a redeploy from Visual Studio.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply