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

Monday, March 19, 2012

Body BackgroundImage not displayed in browser

I have been trying to set up reports with a background image. The background displays correctly on the preview tab in Visual Studio, but is not visible when deployed to the report server and rendered in Internet Explorer.

However, if the report is printed, or exported to PDF or Excel, the background displays correctly.

It does not seem to make any difference if the image is external or embedded. Also, the problem only seems to affect the Body properties; a background image attached to a table, for example, seems to display correctly.

Has anybody else seen this behavior? I have not done extensive testing, but every report that I have tried seems to have the same problem. Is there a setting someplace that I am missing, or is this perhaps a bug in IE?

This sounds like a known issue in RS 2005 SP1 where the background images does not show up when rendering with the ReportViewer control. This was addressed in a Hotfix and will also be fixed in Visual Studio 2005 SP1.

-Chris

|||

I am running RS 2005 with SP2. When I render a RS report to Internet Explorer the background image still is not displaying, though the image does print. Exactly as described in the origional message. Any ideas?

Thanks!

Body BackgroundImage not displayed in browser

I have been trying to set up reports with a background image. The background displays correctly on the preview tab in Visual Studio, but is not visible when deployed to the report server and rendered in Internet Explorer.

However, if the report is printed, or exported to PDF or Excel, the background displays correctly.

It does not seem to make any difference if the image is external or embedded. Also, the problem only seems to affect the Body properties; a background image attached to a table, for example, seems to display correctly.

Has anybody else seen this behavior? I have not done extensive testing, but every report that I have tried seems to have the same problem. Is there a setting someplace that I am missing, or is this perhaps a bug in IE?

This sounds like a known issue in RS 2005 SP1 where the background images does not show up when rendering with the ReportViewer control. This was addressed in a Hotfix and will also be fixed in Visual Studio 2005 SP1.

-Chris

|||

I am running RS 2005 with SP2. When I render a RS report to Internet Explorer the background image still is not displaying, though the image does print. Exactly as described in the origional message. Any ideas?

Thanks!

Saturday, February 25, 2012

blob info

I put an image as a blob into database.
When I return it and put it into picturebox can I somehow get it's
information: PictureSize, PictureType(jpg,gif...) ?
HrckoSQL Server can return the image length (DATALENGTH function) but has no
other knowledge of the binary contents. If you need that info, create a
separate column for that data.
Hope this helps.
Dan Guzman
SQL Server MVP
"Hrvoje Voda" <hrvoje.voda@.luatech.com> wrote in message
news:e1nv1n$d2d$1@.ss405.t-com.hr...
>I put an image as a blob into database.
> When I return it and put it into picturebox can I somehow get it's
> information: PictureSize, PictureType(jpg,gif...) ?
> Hrcko
>

blob info

I put an image as a blob into database.
When I return it and put it into picturebox can I somehow get it's
information: PictureSize, PictureType(jpg,gif...) ?
HrckoSQL Server can return the image length (DATALENGTH function) but has no
other knowledge of the binary contents. If you need that info, create a
separate column for that data.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Hrvoje Voda" <hrvoje.voda@.luatech.com> wrote in message
news:e1nv1n$d2d$1@.ss405.t-com.hr...
>I put an image as a blob into database.
> When I return it and put it into picturebox can I somehow get it's
> information: PictureSize, PictureType(jpg,gif...) ?
> Hrcko
>

Blob data

Can someone please give me an example in C# on how to retrieve an Image from a Table and store i into a Picture box on a windows form? In addition, how to insert a blob record into a table as well.Reading BLOBs from SQL Server and display it inaWindows FormPictureBox
http://www.akadia.com/services/dotnet_load_blob.html|||Does any one have an example that they have used and written themselves? This example is very confusing.|||Check the code in the following article. It is from the Microsoft Knowledge base article.
http://www.kbalertz.com/Feedback_326502.aspx|||Just in case the above article doesn't suffice your requirement, let me know and I shall post the code written by me.

Friday, February 24, 2012

Blob and MFC

I'm using MFC(Visual C++ 6.0), SQL Server 2000 and ODBC to connect to SQL Se
rver. I have a table that has a blob(image) column in it. The structure of t
he table is:
CREATE TABLE [dbo].[lbx_blob_1096] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Date] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Refno] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[imgData] [image] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
I have a Stored Procedure thru which I would like to insert data and image i
nto the table. The Stored Procedure is defined as follows:
CREATE proc dbo.CMS_sp_inserttoblobtable
@.blobtablename varchar(50),
@.valuesstr varchar(100),
@.resultparam int output
as
BEGIN TRAN INSERT_BLOBTABLE
DECLARE @.retval int
EXEC('INSERT INTO ' + @.blobtablename + ' (busdate,refno,imgData) VALUES ( '
+ @.valuesstr + ' )')
IF @.@.ERROR <> '0'
BEGIN
ROLLBACK TRAN INSERT_BLOBTABLE
END
ELSE
BEGIN
COMMIT TRAN INSERT_BLOBTABLE
SET @.resultparam = @.@.IDENTITY
END
SET @.retval = @.@.ERROR
RETURN @.retval
GO
I would like to know of a easy way to pass the image data from my MFC applic
ation to the Stored Procedure. Rightnow, I'm trying to use the SQLBindParame
ter as :
retValue = SQLBindParameter(hstmt, 5, SQL_PARAM_INPUT, SQL_C_BINARY, SQL_BIN
ARY,0, 0, (SQLPOINTER)s_ImgData, 0, &cbBinary);
But, I keep getting a datatype mismatch error. Can anybody please help me on
this?
Thanks,I don't think you can update BLOB fields from MFC using a SP. I think you'll
need to look into using the either the ADO GetChunk and AppendChunk methods
or the ADO Stream object. Here's a couple pieces of information that might
help:
http://support.microsoft.com/defaul...kb;en-us;189415
http://support.microsoft.com/defaul...kb;en-us;258038
Mike O.
"Mohan K" <anonymous@.discussions.microsoft.com> wrote in message
news:C8B747B6-7E2B-48A0-9219-DFF0500180AA@.microsoft.com...
> I'm using MFC(Visual C++ 6.0), SQL Server 2000 and ODBC to connect to SQL
Server. I have a table that has a blob(image) column in it. The structure of
the table is:
> CREATE TABLE [dbo].[lbx_blob_1096] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [Date] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NU
LL ,
> [Refno] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NU
LL ,
> [imgData] [image] NOT NULL
> ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
> GO
> I have a Stored Procedure thru which I would like to insert data and image
into the table. The Stored Procedure is defined as follows:
> CREATE proc dbo.CMS_sp_inserttoblobtable
> @.blobtablename varchar(50),
> @.valuesstr varchar(100),
> @.resultparam int output
> as
> BEGIN TRAN INSERT_BLOBTABLE
> DECLARE @.retval int
> EXEC('INSERT INTO ' + @.blobtablename + ' (busdate,refno,imgData)
VALUES ( ' + @.valuesstr + ' )')
> IF @.@.ERROR <> '0'
> BEGIN
> ROLLBACK TRAN INSERT_BLOBTABLE
> END
> ELSE
> BEGIN
> COMMIT TRAN INSERT_BLOBTABLE
> SET @.resultparam = @.@.IDENTITY
> END
> SET @.retval = @.@.ERROR
> RETURN @.retval
> GO
> I would like to know of a easy way to pass the image data from my MFC
application to the Stored Procedure. Rightnow, I'm trying to use the
SQLBindParameter as :
> retValue = SQLBindParameter(hstmt, 5, SQL_PARAM_INPUT, SQL_C_BINARY,
SQL_BINARY,0, 0, (SQLPOINTER)s_ImgData, 0, &cbBinary);
> But, I keep getting a datatype mismatch error. Can anybody please help me
on this?
> Thanks,