Showing posts with label saved. Show all posts
Showing posts with label saved. Show all posts

Wednesday, March 28, 2012

Images in Reporting Services from database

I have a data table which contains a bmp image saved as a byte array. I am trying to have this image presented in a report, however, I get a red X after I follow the wizard.

I also tried it with the SQL Northwind database and I have the same issue. I am running SQL Reporting services 2005. Any suggestions on what could be going wrong?

Joe

after placing the image you have select the image source i.e. database in your case and then you have select the field name which contains image and the MIME type as image/bmp or try image/png.

this should work

|||

I have tried with both image/bmp and image/png on northwind DB as recommended. I still get red cross. Any ideal what's wrong?

|||

I have tried with both image/bmp and image/png on northwind DB as recommended. I still get red cross. Any idea what's wrong?

|||Please read this RS BOL topic: http://msdn2.microsoft.com/en-us/library/ms156342(SQL.90).aspx

Particularly read the comment near the top if the images came originally from an Access database, because in that case the actual image data is an OLE image and you have to write an expression to remove the OLE image header from the data. This also applies to the Northwind sample database.

Furthermore, I recommend to install SQL Server 2005 SP1 for Reporting Services.

-- Robert

sql

Images in Reporting Services from database

I have a data table which contains a bmp image saved as a byte array. I am trying to have this image presented in a report, however, I get a red X after I follow the wizard.

I also tried it with the SQL Northwind database and I have the same issue. I am running SQL Reporting services 2005. Any suggestions on what could be going wrong?

Joe

after placing the image you have select the image source i.e. database in your case and then you have select the field name which contains image and the MIME type as image/bmp or try image/png.

this should work

|||

I have tried with both image/bmp and image/png on northwind DB as recommended. I still get red cross. Any ideal what's wrong?

|||

I have tried with both image/bmp and image/png on northwind DB as recommended. I still get red cross. Any idea what's wrong?

|||Please read this RS BOL topic: http://msdn2.microsoft.com/en-us/library/ms156342(SQL.90).aspx

Particularly read the comment near the top if the images came originally from an Access database, because in that case the actual image data is an OLE image and you have to write an expression to remove the OLE image header from the data. This also applies to the Northwind sample database.

Furthermore, I recommend to install SQL Server 2005 SP1 for Reporting Services.

-- Robert

Friday, March 23, 2012

Image save into folder

Dear Professional,
Image saved in the table and I wanna copy that image into any folder let's
say... D:\Image\MineImage.gif
Is it possible ?
Thanks
Hi
You will have to write some VB or c# code to do that. SQL Server has no
native support to write out a BLOB filed to a file.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Roy" <roy@.hotmail.com> wrote in message
news:OnuaCw3cFHA.3932@.TK2MSFTNGP12.phx.gbl...
> Dear Professional,
> Image saved in the table and I wanna copy that image into any folder let's
> say... D:\Image\MineImage.gif
> Is it possible ?
> Thanks
>
>
>
>
|||Okie I am ready to write code in VB... any website is available where I can
find that sort of help.
Thanks
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:O0KTG33cFHA.1036@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Hi
> You will have to write some VB or c# code to do that. SQL Server has no
> native support to write out a BLOB filed to a file.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Roy" <roy@.hotmail.com> wrote in message
> news:OnuaCw3cFHA.3932@.TK2MSFTNGP12.phx.gbl...
let's
>
|||http://support.microsoft.com/default...b;en-us;194975
http://support.microsoft.com/kb/308042/EN-US/
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Roy" <roy@.hotmail.com> wrote in message
news:uj$FjV4cFHA.2124@.TK2MSFTNGP14.phx.gbl...
> Okie I am ready to write code in VB... any website is available where I
> can
> find that sort of help.
> Thanks
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:O0KTG33cFHA.1036@.tk2msftngp13.phx.gbl...
> let's
>
|||Roy wrote:
> Okie I am ready to write code in VB... any website is available where
> I can find that sort of help.
>
I prefer a book for this. For Vb.Net 2003, I'd recommend "Programming
Microsoft Visual Basic.Net 2003," by Francesco Balena (Microsoft Press).
You're about to get into some very large topics: The .Net 1.1 framework,
Windows Forms, and ADO.Net.
Also, check out http://www.devx.com/
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||here is the simple example for saving images into disk
'=================================
Dim rst As New ADODB.Recordset
Dim Image1() As Byte
Dim ms As New ADODB.Stream
Dim cmd As New ADODB.Command
Dim l As Long
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "proc_getImage" '==== poc_code_look_below
cmd.ActiveConnection = CurrentProject.Connection
cmd.Parameters("@.ID") = ID
Set rst = cmd.Execute
ms.Type = adTypeBinary
ms.Open
l = rst(0).ActualSize
Image1() = rst(0).GetChunk(l + 1)
rst.Close
ms.Write (Image1())
deletefile ("c:\img.jpg")
ms.SaveToFile "c:\img.jpg", adSaveCreateOverWrite
ms.Close
Set cmd = Nothing
Set rst = Nothing
Set ms = Nothing
'================================
create PROCEDURE proc_GetImage
(@.ID int)
AS
BEGIN
SELECT photo
FROM tbl_images
WHERE ([ID] = @.ID)
END
'========================
it is just an example, so it is up to you

Image not displayed while doing Subscriptions

Hi,

I have scheduled subscriptions for a report which has an image in it.

The report is subscribed to be saved in a Report Server File Share in HTML format.

When i open the saved report i see a placeholder x instead of the image.

When i change the subscription format to ADOBE pdf it works fine.

Has anyone faced this problem ?

Any help on this is appreciated.

Thanks

Sam

Out-of-the-box file share delivery extension does not support saving all files for HTML (including images) into targeted share. You need to use MHTML format that allows embedding images (as MIME structures) within the report HTML.|||

Hey

Thanks. I changed it to Web Archive format and it renders them fine.

Just another question. Is there any doc on the internet which explains as to why Reporting Services does not support this out of the box.

THanks

Sam

|||I’m afraid this was not explicitly documented (I can't find such a doc) but I guess it was an intentional decision not to support this. Otherwise if delivery consists of more than 1 file than delivery should handle all cases related to file write operations (permissions, overwriting, file size, etc) for all files in a delivery which makes it more complicated and fragile.|||Thank you so much for all your help on this.