Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Friday, March 9, 2012

Displaying images that are accessed through URL

Hi,

I have trouble displaying images that are accessed through URLs in my report.
If I call the URL directly in the Browser the Image can be opened without problems.
The images can be accessed with an anonymous access.

When I deploy the report or in the Preview of Visual Studio I get the following message:

[rsWarningFetchingExternalImages] Images with external URL references will not display if the report is published to a report server without an UnattendedExecutionAccount or the target image(s) are not enabled for anonymous access.

In Layout View of Visual Studio the image is showen correctly.

The Images are stored on a Solaris maschine with WebSphere 6.0 as WebServer.

Any ideas?

Thank you.

Frank


You need to configure unattended execution account: http://msdn2.microsoft.com/en-us/library/ms156302.aspx

|||

I configured the unattended execution account, but there I can only use windows user. The images are on a Sun Server with Solaris 9 (Unix) which has different users. Allthough the Images can be accessed without any authorisation, so I think I don't need the unattended execution account.

Any more ideas

Thank you

|||

Have you ever figured this out? I am having the same issue, but the file is on the report server. Actually, it's not an image file, but an ASP.Net web application that creates an image on the fly. Like you, I can get it to come up in the development environment or if I enter the URL directly, but it won't appear in the deployed report.

I have set the unattended execution account, restarted IIS, set permissions to the app's dll everywhere I could think... nothing works.

Interestingly, if you look at the report's source, you can see the images "src" attribute is an empty string, so the report renderer is blocking it.

|||Has anyone found a resolution for this. I have taken the same steps and still only get the RED X in the image space. Account used for unattended execution has admin rights and I can see the image when calling the URL directly from IE.|||

i am also desperately looking for a resolution here

Displaying images that are accessed through URL

Hi,

I have trouble displaying images that are accessed through URLs in my report.
If I call the URL directly in the Browser the Image can be opened without problems.
The images can be accessed with an anonymous access.

When I deploy the report or in the Preview of Visual Studio I get the following message:

[rsWarningFetchingExternalImages] Images with external URL references will not display if the report is published to a report server without an UnattendedExecutionAccount or the target image(s) are not enabled for anonymous access.

In Layout View of Visual Studio the image is showen correctly.

The Images are stored on a Solaris maschine with WebSphere 6.0 as WebServer.

Any ideas?

Thank you.

Frank


You need to configure unattended execution account: http://msdn2.microsoft.com/en-us/library/ms156302.aspx

|||

I configured the unattended execution account, but there I can only use windows user. The images are on a Sun Server with Solaris 9 (Unix) which has different users. Allthough the Images can be accessed without any authorisation, so I think I don't need the unattended execution account.

Any more ideas

Thank you

|||

Have you ever figured this out? I am having the same issue, but the file is on the report server. Actually, it's not an image file, but an ASP.Net web application that creates an image on the fly. Like you, I can get it to come up in the development environment or if I enter the URL directly, but it won't appear in the deployed report.

I have set the unattended execution account, restarted IIS, set permissions to the app's dll everywhere I could think... nothing works.

Interestingly, if you look at the report's source, you can see the images "src" attribute is an empty string, so the report renderer is blocking it.

|||Has anyone found a resolution for this. I have taken the same steps and still only get the RED X in the image space. Account used for unattended execution has admin rights and I can see the image when calling the URL directly from IE.|||

i am also desperately looking for a resolution here|||

I enabled anonymous access and that solved my issue.

|||

I found the solution for my problem. The mime type for the images was not set on the WebSphere Server.

After I set the mime type on the WebSpere Server, the images where shown correctly.

I hope this helps.

Frank

Displaying images that are accessed through URL

Hi,

I have trouble displaying images that are accessed through URLs in my report.
If I call the URL directly in the Browser the Image can be opened without problems.
The images can be accessed with an anonymous access.

When I deploy the report or in the Preview of Visual Studio I get the following message:

[rsWarningFetchingExternalImages] Images with external URL references will not display if the report is published to a report server without an UnattendedExecutionAccount or the target image(s) are not enabled for anonymous access.

In Layout View of Visual Studio the image is showen correctly.

The Images are stored on a Solaris maschine with WebSphere 6.0 as WebServer.

Any ideas?

Thank you.

Frank


You need to configure unattended execution account: http://msdn2.microsoft.com/en-us/library/ms156302.aspx

|||

I configured the unattended execution account, but there I can only use windows user. The images are on a Sun Server with Solaris 9 (Unix) which has different users. Allthough the Images can be accessed without any authorisation, so I think I don't need the unattended execution account.

Any more ideas

Thank you

|||

Have you ever figured this out? I am having the same issue, but the file is on the report server. Actually, it's not an image file, but an ASP.Net web application that creates an image on the fly. Like you, I can get it to come up in the development environment or if I enter the URL directly, but it won't appear in the deployed report.

I have set the unattended execution account, restarted IIS, set permissions to the app's dll everywhere I could think... nothing works.

Interestingly, if you look at the report's source, you can see the images "src" attribute is an empty string, so the report renderer is blocking it.

|||Has anyone found a resolution for this. I have taken the same steps and still only get the RED X in the image space. Account used for unattended execution has admin rights and I can see the image when calling the URL directly from IE.|||

i am also desperately looking for a resolution here

Displaying images that are accessed through URL

Hi,

I have trouble displaying images that are accessed through URLs in my report.
If I call the URL directly in the Browser the Image can be opened without problems.
The images can be accessed with an anonymous access.

When I deploy the report or in the Preview of Visual Studio I get the following message:

[rsWarningFetchingExternalImages] Images with external URL references will not display if the report is published to a report server without an UnattendedExecutionAccount or the target image(s) are not enabled for anonymous access.

In Layout View of Visual Studio the image is showen correctly.

The Images are stored on a Solaris maschine with WebSphere 6.0 as WebServer.

Any ideas?

Thank you.

Frank


You need to configure unattended execution account: http://msdn2.microsoft.com/en-us/library/ms156302.aspx

|||

I configured the unattended execution account, but there I can only use windows user. The images are on a Sun Server with Solaris 9 (Unix) which has different users. Allthough the Images can be accessed without any authorisation, so I think I don't need the unattended execution account.

Any more ideas

Thank you

|||

Have you ever figured this out? I am having the same issue, but the file is on the report server. Actually, it's not an image file, but an ASP.Net web application that creates an image on the fly. Like you, I can get it to come up in the development environment or if I enter the URL directly, but it won't appear in the deployed report.

I have set the unattended execution account, restarted IIS, set permissions to the app's dll everywhere I could think... nothing works.

Interestingly, if you look at the report's source, you can see the images "src" attribute is an empty string, so the report renderer is blocking it.

|||Has anyone found a resolution for this. I have taken the same steps and still only get the RED X in the image space. Account used for unattended execution has admin rights and I can see the image when calling the URL directly from IE.|||

i am also desperately looking for a resolution here

Displaying images that are accessed through URL

Hi,

I have trouble displaying images that are accessed through URLs in my report.
If I call the URL directly in the Browser the Image can be opened without problems.
The images can be accessed with an anonymous access.

When I deploy the report or in the Preview of Visual Studio I get the following message:

[rsWarningFetchingExternalImages] Images with external URL references will not display if the report is published to a report server without an UnattendedExecutionAccount or the target image(s) are not enabled for anonymous access.

In Layout View of Visual Studio the image is showen correctly.

The Images are stored on a Solaris maschine with WebSphere 6.0 as WebServer.

Any ideas?

Thank you.

Frank


You need to configure unattended execution account: http://msdn2.microsoft.com/en-us/library/ms156302.aspx

|||

I configured the unattended execution account, but there I can only use windows user. The images are on a Sun Server with Solaris 9 (Unix) which has different users. Allthough the Images can be accessed without any authorisation, so I think I don't need the unattended execution account.

Any more ideas

Thank you

|||

Have you ever figured this out? I am having the same issue, but the file is on the report server. Actually, it's not an image file, but an ASP.Net web application that creates an image on the fly. Like you, I can get it to come up in the development environment or if I enter the URL directly, but it won't appear in the deployed report.

I have set the unattended execution account, restarted IIS, set permissions to the app's dll everywhere I could think... nothing works.

Interestingly, if you look at the report's source, you can see the images "src" attribute is an empty string, so the report renderer is blocking it.

|||Has anyone found a resolution for this. I have taken the same steps and still only get the RED X in the image space. Account used for unattended execution has admin rights and I can see the image when calling the URL directly from IE.|||i am also desperately looking for a resolution here|||

I enabled anonymous access and that solved my issue.

|||

I found the solution for my problem. The mime type for the images was not set on the WebSphere Server.

After I set the mime type on the WebSpere Server, the images where shown correctly.

I hope this helps.

Frank

displaying images horizontally - not vertically

I am trying to display image data stored in a database field using SRS 2005.
The image data is employee photos and I can get them to display in one column
straight down the report using a List control.
Is there a way to get them to display in 3 columns sorting across the page?
This would be like a High School yearbook layout...
Like this...
Pic 1 Pic 2 Pic 3
Pic 4 Pic 5 Pic 6
Instead of like this...
Pic 1
Pic 2
Pic 3
Pic 4Hi,
I'm not sure if this is done differently in SRS 2005 but in SRS 2000, you
can set the Columns property on the Report Page. Just click the page and
then in the Properties window, specify the number of columns needed (3 in
your case).
Hope that helps.
Assad
"jj#10" wrote:
> I am trying to display image data stored in a database field using SRS 2005.
> The image data is employee photos and I can get them to display in one column
> straight down the report using a List control.
> Is there a way to get them to display in 3 columns sorting across the page?
> This would be like a High School yearbook layout...
> Like this...
> Pic 1 Pic 2 Pic 3
> Pic 4 Pic 5 Pic 6
> Instead of like this...
> Pic 1
> Pic 2
> Pic 3
> Pic 4
>

Displaying images from SSAS data source

I'm trying to display the images from the Adventure Works SSAS database in a SSRS report.

I've added an image object to the table, set MIME to image/jpeg (as it is set in the value fiel of the attribute in AW SSAS database) but I'm getting just a 'x' instead of the image and following output:

Preview complete -- 0 errors, 1 warnings

[rsInvalidExpressionDataType] The Value expression used in textbox ‘LargePhoto’ returned a data type that is not valid.

Preview complete -- 0 errors, 1 warnings

[rsInvalidExpressionDataType] The Value expression used in textbox ‘LargePhoto’ returned a data type that is not valid.

Preview complete -- 0 errors, 1 warnings

[rsInvalidExpressionDataType] The Value expression used in image ‘image1’ returned a data type that is not valid.

[rsInvalidDatabaseImage] The Value expression for the image ‘image1’ did not evaluate to an image.

Preview complete -- 0 errors, 2 warnings

But displaying images the same way just using the relational AW DW table DimProduct works well.

(the only difference I've seen is: in the query generator from SSAS there is a cryptic text value displayed as the value of the LargePhoto attribute, if using relational table there is a '<binary>')

relational query:

select productalternatekey, largephoto from dimproduct

SSAS query:

WITH MEMBER measures.test

AS

[Product].[Large Photo].currentmember.membervalue

SELECT NON EMPTY

{ [Measures].[Internet Sales Amount], measures.test } ON COLUMNS,

NON EMPTY { ([Product].[Product].[Product].ALLMEMBERS * [Product].[Large Photo].[Large Photo].ALLMEMBERS) } ON ROWS

FROM [Adventure Works]

Where is the problem ? How can I display images from SSAS in SSRS ?

Any ideas are appreciated.

Jan.

A binary member value comes from SSAS as Base64-encoded. You need to use the following expression in your textbox Value property in SSRS:

=System.Convert.FromBase64String(Fields!test.Value)

|||

Great help Teo!

That's it, thanks a lot !

Jan.

Displaying image in table

Hi,
I have a table which displays the list of employees in my company. I am
trying to display the picture of the employee alongside with the
information.
Is this possible in Reporting Services? The pictures will be stored in
a folder and the name of the picture correspond to the name of the
employee.
Any help would be greatly appreciated.
Thanks.
--
JordanHi Jordan,
You can place an image in the details section of the table. Place it as a
"web" image, but don't worry about entering the URL. Once it has been placed
in the table, goto the image properties tab and find the "Data" section.
Leave MIMEType blank, and make sure the source is external. Now in the
value, you need to build a string that points to the image on disk, so it
could be something like this:
="\\ServerName\Photos\" & Fields!PhotoName.Value & ".jpg"
Where the name of the photo is stored in the db, else you can build the name
from whetever your photo indexing system is (maybe an ID or something). I
store our images based on an ID field in the db, then just use that field to
get the image.
Hope this gives you a start.
Andre
"Jordan" wrote:
> Hi,
> I have a table which displays the list of employees in my company. I am
> trying to display the picture of the employee alongside with the
> information.
> Is this possible in Reporting Services? The pictures will be stored in
> a folder and the name of the picture correspond to the name of the
> employee.
> Any help would be greatly appreciated.
> Thanks.
> --
> Jordan
>|||Hi Andre,
It works like a charm.
Thanks.
--
Jordan|||I am trying to do the same thing but having trouble, Does the image control
support .tif files' I do not see them as an option. Seems weird that they
would not be supported!'
"Jordan" wrote:
> Hi Andre,
> It works like a charm.
> Thanks.
> --
> Jordan
>|||I am trying to do the same thing but having trouble, Does the image control
support .tif s'
"Jordan" wrote:
> Hi Andre,
> It works like a charm.
> Thanks.
> --
> Jordan
>|||I am trying to do the same thing but having trouble, Does the image control
support .tif files' I do not see them as an option. Seems weird that they
would not be supported!'
"Jordan" wrote:
> Hi Andre,
> It works like a charm.
> Thanks.
> --
> Jordan
>

Displaying image from db in crystal report

hello there

I am using VB.Net 2003 with oracle 9i. My table contains a BLOB field that contains images. I tried to create a report (crystal report that is packed with VB.Net 2003) by including the table and dragging the BLOB field onto the report. But when i try to run the report, it gives me "Failed to open a rowset" error. If i run the report without the BLOB field, the report works fine.

Any idea?!?!

Thanks in advance
AndyHow did you store the images in the table?
Sounds that some images are corrupted
Visist this site and see if you find solution
www.businessobjects.com

Displaying image

I have an image (jpg/bmp) file on the hard drive. I want to be able to point
to the path from the report and display the image. The image stored on the
hard drive can change, hence I want the image displayed on the report also to
change accordingly. The stuff I am trying to do is about the company logo.
Currently I have my company's logo displayed, and when the report goes into
production I would like the customer's logo to be displayed on the report.
Any help is appreciated.Hi,
Yes it can be done. Select 'Web' from image properties and give the URL of
the image. But you need to have the same name for all the images. So if you
want to copy a different image change the name of the new image to the same
name what you had given in your URL.
Amarnath
"KMP" wrote:
> I have an image (jpg/bmp) file on the hard drive. I want to be able to point
> to the path from the report and display the image. The image stored on the
> hard drive can change, hence I want the image displayed on the report also to
> change accordingly. The stuff I am trying to do is about the company logo.
> Currently I have my company's logo displayed, and when the report goes into
> production I would like the customer's logo to be displayed on the report.
> Any help is appreciated.|||Sorry for the delay in replying. I don't understand what you are trying to
say - I want to use the file stored on the hard drive of the server, what is
the URL thing. Can you please explain more clearly?
Thanks.
"Amarnath" wrote:
> Hi,
> Yes it can be done. Select 'Web' from image properties and give the URL of
> the image. But you need to have the same name for all the images. So if you
> want to copy a different image change the name of the new image to the same
> name what you had given in your URL.
> Amarnath
> "KMP" wrote:
> > I have an image (jpg/bmp) file on the hard drive. I want to be able to point
> > to the path from the report and display the image. The image stored on the
> > hard drive can change, hence I want the image displayed on the report also to
> > change accordingly. The stuff I am trying to do is about the company logo.
> > Currently I have my company's logo displayed, and when the report goes into
> > production I would like the customer's logo to be displayed on the report.
> > Any help is appreciated.

Wednesday, March 7, 2012

Displaying Blob Image from db

I'm trying to retrieve an image that I have stored in a SQL Server db, and display it in an .aspx page. It's supposed to retrieve just one image, according to a unique key that's passed. However, when I view the page, nothing appears... just the Internet Explorer missing image placeholder.
I've tried code from several diff tutorials, and can't seem to get it to work.
I'm aware that some people think it's not a good idea to store images in a db, but I have to in this case, since the requirements for this project are that the images are stored in the database. I already know how to store references to file paths of images located in a server folder. I've just never done it this way... storing the whole images in the database. The table has 3 columns, one for the id, "FileType" stores the image type, and the "ImageBinary" is the image itself.
If anyone can shine some light on why my code doesn't display anything, I'd greatly appreciated your help.


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim myConnection As New SqlConnection(ConfigurationSettings.AppSettings("strConn"))
Response.Write("Page Loaded") 'This is just for testing to see if the page loads at all
Dim myCommand As New SqlCommand("Select * from UserImages WHERE id=1234", myConnection)
Try
myConnection.Open()
Dim DR As SqlDataReader
DR = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
If DR.Read() Then
Response.ContentType = DR.Item("FileType")
Response.BinaryWrite(DR("ImageBinary"))
Else
Response.Write("no image found")
End If
myConnection.Close()
Response.Write("<br>Image successfully retrieved!")
Catch SQLexc As SqlException
Response.Write("Read Failed : " & SQLexc.ToString())
End Try
End Sub

Documentation for datareader and blogs goes like this.
<documentation url="ms-help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpconobtainingblobvaluesfromdatabase.htm">

Dim pubsConn As SqlConnection = New SqlConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=pubs;")
Dim logoCMD As SqlCommand = New SqlCommand("SELECT pub_id, logo FROM pub_info", pubsConn)

Dim fs As FileStream ' Writes the BLOB to a file (*.bmp).
Dim bw As BinaryWriter ' Streams the binary data to the FileStream object.

Dim bufferSize As Integer = 100 ' The size of the BLOB buffer.
Dim outbyte(bufferSize - 1) As Byte ' The BLOB byte() buffer to be filled by GetBytes.
Dim retval As Long ' The bytes returned from GetBytes.
Dim startIndex As Long = 0 ' The starting position in the BLOB output.

Dim pub_id As String = "" ' The publisher id to use in the file name.

' Open the connection and read data into the DataReader.
pubsConn.Open()
Dim myReader As SqlDataReader = logoCMD.ExecuteReader(CommandBehavior.SequentialAccess)

Do While myReader.Read()
' Get the publisher id, which must occur before getting the logo.
pub_id = myReader.GetString(0)

' Create a file to hold the output.
fs = New FileStream("logo" & pub_id & ".bmp", FileMode.OpenOrCreate, FileAccess.Write)
bw = New BinaryWriter(fs)

' Reset the starting byte for a new BLOB.
startIndex = 0

' Read bytes into outbyte() and retain the number of bytes returned.
retval = myReader.GetBytes(1, startIndex, outbyte, 0, bufferSize)

' Continue reading and writing while there are bytes beyond the size of the buffer.
Do While retval = bufferSize
bw.Write(outbyte)
bw.Flush()

' Reposition the start index to the end of the last buffer and fill the buffer.
startIndex += bufferSize
retval = myReader.GetBytes(1, startIndex, outbyte, 0, bufferSize)
Loop

' Write the remaining buffer.
bw.Write(outbyte, 0 , retval - 1)
bw.Flush()

' Close the output file.
bw.Close()
fs.Close()
Loop

' Close the reader and the connection.
myReader.Close()
pubsConn.Close()


</documentation>|||Interestingly enough, I actually already looked at that documentation and tried another test page based on that code. That page doesn't display anything either. I figure there must be something really basic that I've messed up along the way.

Here is how I customized the code that you just referenced:


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Response.Write("Loading page...<br>") 'To test that the page has loaded

Dim conn As New SqlConnection(ConfigurationSettings.AppSettings("strConn"))
Dim sql = "Select id, ImageBinary from UserImages WHERE id=1234"
Dim cmd As New SqlCommand(sql, conn)
Dim fs As FileStream
Dim bw As BinaryWriter
Dim bufferSize As Integer = 100 'The size of the BLOB buffer
Dim outbyte(bufferSize - 1) As Byte 'The BLOB byte() buffer to be filled
Dim retval As Long 'The bytes returned from GetBytes
Dim startIndex As Long = 0 'The starting position in the BLOB output
Dim strID As String = 0
conn.Open()
Dim DR As SqlDataReader = cmd.ExecuteReader(CommandBehavior.SequentialAccess)
Do While DR.Read()
'Get the id, which must occur before the image
strID = DR.GetValue(0).ToString()
'Create a file to hold the output
fs = New FileStream("ImageBinary" & strID & ".bmp", FileMode.OpenOrCreate, FileAccess.Write)
bw = New BinaryWriter(fs)
'Reset the starting byte for a new BLOB
startIndex = 0
'Read bytes into outbyte() and retain the number of bytes returned
retval = DR.GetBytes(1, startIndex, outbyte, 0, bufferSize)
'Continue reading and writing while there are bytes beyond the size of the buffer
Do While retval = bufferSize
bw.Write(outbyte)
bw.Flush()
'Reposition the start index to the end of the last buffer and fill the buffer
startIndex += bufferSize
retval = DR.GetBytes(1, startIndex, outbyte, 0, bufferSize)
Loop
'Write the remaining buffer.
bw.Write(outbyte, 0, retval - 1)
bw.Flush()
'Close the output file
bw.Close()
fs.Close()
Loop
DR.Close()
conn.Close()

End Sub

Friday, February 24, 2012

Display SQL server Image fields in reporting services headers or footers

I know you cannot directly place data fields in the headers or footers
with SQL server reporting services. You can trick it by putting a
hidden text field in the body of the report and referencing it in the
header or footer by using ReportItems.
How do you display SQL server Image data fields in headers or footers?
I tried using Report parameters, but that caused unpredictable results
with my text fields. Report parameters don't have an option for Image
fields for the data type which makes sense.
Appreciate your help.You need encode image in the parameter, and decode it later
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"jtabar" <john.tabar@.usa.net> wrote in message
news:b62a5355.0409231320.3b340324@.posting.google.com...
>I know you cannot directly place data fields in the headers or footers
> with SQL server reporting services. You can trick it by putting a
> hidden text field in the body of the report and referencing it in the
> header or footer by using ReportItems.
> How do you display SQL server Image data fields in headers or footers?
> I tried using Report parameters, but that caused unpredictable results
> with my text fields. Report parameters don't have an option for Image
> fields for the data type which makes sense.
> Appreciate your help.|||Lev, tnx for your help. With some help from Microsoft support, I got
it to work by using a textbox in the body of the report and setting
the value to:
=System.Convert.ToBase64String(First(Fields!MyImage.Value, "MyDB"))
Then setup an image field in the footer and set the following:
- MIMEType: image/bmp
- Source: Database
- Value: =System.Convert.FromBase64String(ReportItems!Mytextbox.value)
I couldn't get the parameter to work. Wasn't sure how to do what you
suggested by "You need encode image in the parameter" in your note.
"Lev Semenets [MSFT]" <levs@.microsoft.com> wrote in message news:<usSu5yfoEHA.2948@.TK2MSFTNGP11.phx.gbl>...
> You need encode image in the parameter, and decode it later
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "jtabar" <john.tabar@.usa.net> wrote in message
> news:b62a5355.0409231320.3b340324@.posting.google.com...
> >I know you cannot directly place data fields in the headers or footers
> > with SQL server reporting services. You can trick it by putting a
> > hidden text field in the body of the report and referencing it in the
> > header or footer by using ReportItems.
> >
> > How do you display SQL server Image data fields in headers or footers?
> >
> > I tried using Report parameters, but that caused unpredictable results
> > with my text fields. Report parameters don't have an option for Image
> > fields for the data type which makes sense.
> >
> > Appreciate your help.|||It is similar technique, where parameter is used instead of hidden textbox
to pass encoded image
Create calculated field "MyEncodedImage" and set expression to
=System.Convert.ToBase64String(Fields!MyImage.Value)
Create report parameter "MyEncodedImageParam", set its type to String, erase
Prompt, clear Allow Null and Allow Blank checkboxes, set default value "from
query" and select MyDB as dataset and MyEncodedImage as value field.
Set value for your image in the footer to
=System.Convert.FromBase64String(Parameters!MyEncodedImageParam.value)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"jtabar" <john.tabar@.usa.net> wrote in message
news:b62a5355.0409241237.53141003@.posting.google.com...
> Lev, tnx for your help. With some help from Microsoft support, I got
> it to work by using a textbox in the body of the report and setting
> the value to:
> =System.Convert.ToBase64String(First(Fields!MyImage.Value, "MyDB"))
> Then setup an image field in the footer and set the following:
> - MIMEType: image/bmp
> - Source: Database
> - Value: =System.Convert.FromBase64String(ReportItems!Mytextbox.value)
> I couldn't get the parameter to work. Wasn't sure how to do what you
> suggested by "You need encode image in the parameter" in your note.
>
> "Lev Semenets [MSFT]" <levs@.microsoft.com> wrote in message
> news:<usSu5yfoEHA.2948@.TK2MSFTNGP11.phx.gbl>...
>> You need encode image in the parameter, and decode it later
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "jtabar" <john.tabar@.usa.net> wrote in message
>> news:b62a5355.0409231320.3b340324@.posting.google.com...
>> >I know you cannot directly place data fields in the headers or footers
>> > with SQL server reporting services. You can trick it by putting a
>> > hidden text field in the body of the report and referencing it in the
>> > header or footer by using ReportItems.
>> >
>> > How do you display SQL server Image data fields in headers or footers?
>> >
>> > I tried using Report parameters, but that caused unpredictable results
>> > with my text fields. Report parameters don't have an option for Image
>> > fields for the data type which makes sense.
>> >
>> > Appreciate your help.

Display RTF stored in image data type on SRS Report

In Microsoft Project Server, RTF notes are stored in the field
TASK_NOTES_RTF as a SQL Server image datatype. I am trying to display
the RTF note on a SQL 2000 Reporting Services report.
I need either assembly code or embed code examples.
Thanksunfortinuatly you cant
"SAM" <samb@.sambrooks.com> wrote in message
news:1172779991.405337.35550@.v33g2000cwv.googlegroups.com...
> In Microsoft Project Server, RTF notes are stored in the field
> TASK_NOTES_RTF as a SQL Server image datatype. I am trying to display
> the RTF note on a SQL 2000 Reporting Services report.
> I need either assembly code or embed code examples.
> Thanks
>|||Smokey,
I am currently displaying the ascii content of the TASK_NOTES_RTF field in a
SQL 2000 Reporting Services report, so fortunately, you can.
But, thanks for your input.
"Smokey Grindel" wrote:
> unfortinuatly you cant
> "SAM" <samb@.sambrooks.com> wrote in message
> news:1172779991.405337.35550@.v33g2000cwv.googlegroups.com...
> > In Microsoft Project Server, RTF notes are stored in the field
> > TASK_NOTES_RTF as a SQL Server image datatype. I am trying to display
> > the RTF note on a SQL 2000 Reporting Services report.
> >
> > I need either assembly code or embed code examples.
> >
> > Thanks
> >
>
>|||you cant display it formatted
"SamB" <SamB@.discussions.microsoft.com> wrote in message
news:C0DE0C34-359F-48AE-8127-1623D7D01857@.microsoft.com...
> Smokey,
> I am currently displaying the ascii content of the TASK_NOTES_RTF field in
> a
> SQL 2000 Reporting Services report, so fortunately, you can.
> But, thanks for your input.
> "Smokey Grindel" wrote:
>> unfortinuatly you cant
>> "SAM" <samb@.sambrooks.com> wrote in message
>> news:1172779991.405337.35550@.v33g2000cwv.googlegroups.com...
>> > In Microsoft Project Server, RTF notes are stored in the field
>> > TASK_NOTES_RTF as a SQL Server image datatype. I am trying to display
>> > the RTF note on a SQL 2000 Reporting Services report.
>> >
>> > I need either assembly code or embed code examples.
>> >
>> > Thanks
>> >
>>|||Smokiey,
Learn about instantiation, custom report items, the shift key, and the
apostrophe and you will be surprised at what the difference between "can" and
"can't" is, particlularly "formatted."
Thanks again for your timely reply!
"Smokey Grindel" wrote:
> you cant display it formatted
> "SamB" <SamB@.discussions.microsoft.com> wrote in message
> news:C0DE0C34-359F-48AE-8127-1623D7D01857@.microsoft.com...
> > Smokey,
> >
> > I am currently displaying the ascii content of the TASK_NOTES_RTF field in
> > a
> > SQL 2000 Reporting Services report, so fortunately, you can.
> >
> > But, thanks for your input.
> >
> > "Smokey Grindel" wrote:
> >
> >> unfortinuatly you cant
> >>
> >> "SAM" <samb@.sambrooks.com> wrote in message
> >> news:1172779991.405337.35550@.v33g2000cwv.googlegroups.com...
> >> > In Microsoft Project Server, RTF notes are stored in the field
> >> > TASK_NOTES_RTF as a SQL Server image datatype. I am trying to display
> >> > the RTF note on a SQL 2000 Reporting Services report.
> >> >
> >> > I need either assembly code or embed code examples.
> >> >
> >> > Thanks
> >> >
> >>
> >>
> >>
>
>

Friday, February 17, 2012

Display image to ASP .NET from bynary data MSSQL 2000

Hi I have image in database sql server 2000 and want to display in ASP .net page. I make the memorystream from that data and write directly to page using Response.Write([bynary stream]) but U know it only display one image and other HTML is gone.

Normaly a HTML or ASP.net page will display image using local files like this <img src=..........> but how if I want to display it from memory stream that doesn't have physically in storage ? Or should I save that binary to storage first and then reference it ?

So anyone that have solution for this problem please help me how to this thing .........Smile

Hi, Take a lok at the MSDN articles on images and bitmaps.

http://msdn2.microsoft.com/en-us/library/a343dky2.aspx

regards

smcoxon

|||

You don't understand. I'm not ask about image !

My question is how to display a binary image in memorystream to ASP.NET page via HTTP ?

I try to directly write by HttpResponse.Write( ... ) but U know it display the image only......

What I want is this image can be displayed in ASP.net page ......, I can't use <img src='.......'> ,

because it's on memory stream not in URL format or in local file in your hard drive.

|||

Hi,

smcoxon has given part of the answer but that is related to winforms. The picture box can accept the byte stream that you get from the binary datatype you stored the image in.

For aspx pages.

You have to first create a page which just serves the images.

so your image tag would be

<img src="http://pics.10026.com/?src=YourImageServingPage.aspx?imageID=1" ...

On YourImageServingPage.aspx

You would remove all mark up and then add this to your code behind

Response.Clear();
Response.ContentType="image/jpeg"; or any image type you are serving.

You would create a BitMap class load your bytes from database and write the image to the Response.Write stream.

You would find many articles on this Search Key: dynamic image generation

Happy programming,
Anton

Display image stored in SQL

Hello group
Is there a way to display an image stored in SQL without using a datagrid? I am using vb, the very few examples I do find open the image in a window by its self. Also is there a way find the height and width of an image stored in the database and the ability to change the image size? Example – when an image is uploaded to the database I would like a thumbnail to be created and also stored in the database. Any ideas please help.
Michaelyup. there's a way to do all of the above. Man. Your questions are those with long long long responses. :-\


public Image ResizeImage(ref Image oImage, int ResizedWidth, int ResizedHeight, float Opacity)
{

// resize image.
System.Drawing.Bitmap oReturnVar = new System.Drawing.Bitmap(
ResizedWidth,
ResizedHeight,
System.Drawing.Imaging.PixelFormat.Format24bppRgb);

System.Drawing.Graphics oPhoto = System.Drawing.Graphics.FromImage(oReturnVar);

oPhoto.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
oPhoto.DrawImage(oImage,
new Rectangle(
-1,
-1,
ResizedWidth + 2,
ResizedHeight + 2),
0,
0,
oImage.Width,
oImage.Height,
System.Drawing.GraphicsUnit.Pixel,
CreateImageAttribute(Opacity));

oPhoto.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
oPhoto.Dispose();
oPhoto = null;
oImage.Dispose();
oImage = null;
return oReturnVar;
}

That's c#, but should be easy enough to do in vb.

http://www.dotnetspider.com/Technology/QA/ViewQuestion.aspx?QuestionId=117

the above link has a lot of examples on how to do the rest of what you wanted. Now your best bet is to learn the syntax of c#. Not really so you can write it, but more so you can be flexible in reading all the articles provided.

I like Dino Esposito's sample..


SqlCommand cmd = new SqlCommand(cmdText, cn);

MemoryStream ms = new
MemoryStream();

// 78 is the size of the OLE header
// for Northwind images.
// There's no header in PUBS as PUBS
// just contains the raw image bits.
int offset = 78;

cn.Open();
byte [] img = (byte[])
cmd.ExecuteScalar();
ms.Write(img, offset,
img.Length-offset);
cn.Close();

Bitmap bmp = null;
bmp = new Bitmap(ms);
Response.ContentType = "image/gif";
bmp.Save(Response.OutputStream,
ImageFormat.Gif);
ms.Close();

Display image in Crystal Report 10

I have to generate a report containing data and images in the database, e.g. product information + product image (kept as "image" type in MSSQL database). The information and images are kept in one table named "ProductInfo". The no. of images may vary depending on user input, e.g. on-shelf date. The expected output of the report is similar to below:

<<image1>>
Item: ABC Shampoo
Product No.: 1111

<<image2>>
Item: XXX Toothpaste
Product No.: 2222

<<image3>>
Item: YYY Shaver
Product No.: 3333

User will input the date range in a VB form and a Crystal Report Preview will show the output. I am currently using VB.NET 2003, Crystal Report 10, MSSQL 2000. Would you please help? Thanks very much.

Regards,Store image path in database field, then use picture box in detail section to display pictures.

U can use graphic location property in format editor of picture box...

Display Image Datatype from a table in Reporting Services report..!

I have a table that has an image datatype column and I also have a
contant type column in that same table to define which type of data is
stored in that table.

In this case a screen shot or may be a word document may be stored in
that table...!

I am trying to use that image datatype field in my report and when they
click some button I needed the reporting service report to open a
window based on the content type and display that image.

Has anyone done this? Any help will be much appreciated...

Thanks in advance...This article might help:

http://support.microsoft.com/defaul...kb;en-us;258038

If not, and you're specifically interested in Reporting Services, then
you might want to post in microsoft.public.sqlserver.reportingsvcs.

Simon

Tuesday, February 14, 2012

Display Dynamic Picture Stored in Database

I'm using CR 8.5 with RDC and ADO, and SQL Server 2005. The pictures are .jpg's and are stored in an Image type column in a Picture table. I'm using ADO within VB to pull back a list of pictures from the Picture table and then passing the ADO recordset to Crystal (using a Blob field for the Image). Crystal is correctly adding all 10 records to the report, but the Blob field is blank instead of showing the picture.

How can I get the pictures to display dynamically from the database?

*RESOLVED* - I didn't realize that my code was taking the ADO recordset and stuffing the data into a CDO Rowset and passing the CDO Rowset to Crystal instead of the ADO recordset. CDO Rowset doesn't support Blob fields.I am having the same issue but I am very new to Crystal. I don't understand all that you said. I am using Crystal XI. Can you tell me what a Blob field is and a CDO Rowset. If you could give me any information it would be a big help. Thanks

RESOLVED* - I didn't realize that my code was taking the ADO recordset and stuffing the data into a CDO Rowset and passing the CDO Rowset to Crystal instead of the ADO recordset. CDO Rowset doesn't support Blob fields