Wednesday, March 28, 2012
Images not displaying
I have images that reside in a database table on SQL server. When previewing
a report in Report Designer, the images display just fine. After uploading
the report to Report Manager, the images don't display and a red x displays.
Another issue is that the graph on the report is not displaying as well. A
red x displays instead. Again, the report previews perfectly in Report
Designer. Any suggestions?
Thanks!One more thing I forgot to mention. All drilldowns are not working either.
When you click on a drilldown, it makes the "click" sound and moves a bit to
the left. It doesn't drilldown. Again, it works just fine in Report Designer.
"clutch" wrote:
> Hi,
> I have images that reside in a database table on SQL server. When previewing
> a report in Report Designer, the images display just fine. After uploading
> the report to Report Manager, the images don't display and a red x displays.
> Another issue is that the graph on the report is not displaying as well. A
> red x displays instead. Again, the report previews perfectly in Report
> Designer. Any suggestions?
> Thanks!
Images in SQL Server
image files and display them on the web, with role-based security for the
images. From everything that I understand is that this should be done by
storing the image on the filesystem and links to that data in a database
table instead of storing these images to the database table. Does anyone
here have experience with this, and can give me some advice as to if this is
the correct direction I should go?
Thanks,
Jason WalravenCheck out: http://www.aspfaq.com/2149
Anith|||Thanks
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:%23PaWXNzLFHA.4028@.tk2msftngp13.phx.gbl...
> Check out: http://www.aspfaq.com/2149
> --
> Anith
>|||I don't quite share the same opinion as the author of this article.
Images in database with SQL 2000 and a proper designed file group system are
great. We use it and would never go to the nightmare of reconciling file
system with database.
You backup a database, you have everything your app needs, even if you send
it to China.
Thanks
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:%23PaWXNzLFHA.4028@.tk2msftngp13.phx.gbl...
> Check out: http://www.aspfaq.com/2149
> --
> Anith
>|||>> I don't quite share the same opinion as the author of this article.
Well, the article is pretty reasonable with generic arguments for both sides
with a few pointers to different issues. Performance requirements are often
at odds with ease of maintenance. Readers can always choose implement
solutions depending on their specific business needs.
Anith
Images in a table cell, conditional on a data item value
I have a table, and in one cell I want to display an image. No big deal. However, I then want another image to be substituted for the original one, if a certain field value is false.
So the logic is,if field value is true, display image 1
if the same field value is false, display image no 2.
The expression I have written so far is:
-iif(Fields!Expr9.Value=False,"image1","image2")
where both image1 and image2 are images embedded into the report.
It shows the first image when the field value is false, but It isn't showing image 2 on lines where the field value is true.
Any takers?
What happens if you invert a condition, i.e.
=iif(Fields!Expr9.Value,"image2","image1")
Images do not display in Reporting Sevices on Windows 2003 Server
I have reporting services installed on windows 2003 server.
Embedded Images do display in designer preview, but they do not display in
Report Manager or browser. When I use localhost instead of my machine name in
report url, then images are displayed. I have installed service pack 1 & 2
for RS. After that I installed SP4 for SQL Server. Can some body help in this
regard?
Thanks in anticipation.Hi
Following issue is resolved.
Please look at following link. "_" in the machine name is the
culprit. I used the IP and it worked fine. Also replace machine name in
report server and report manager config files with machine IP address.
http://groups.google.com.pk/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/dc1fcfec0c41ec70/23425c9cbdabb2a1?q=%22reporting+services%22+%2B+%22images%22&rnum=1&hl=en#23425c9cbdabb2a1
"Saeed Ahmad" wrote:
> Hi,
> I have reporting services installed on windows 2003 server.
> Embedded Images do display in designer preview, but they do not display in
> Report Manager or browser. When I use localhost instead of my machine name in
> report url, then images are displayed. I have installed service pack 1 & 2
> for RS. After that I installed SP4 for SQL Server. Can some body help in this
> regard?
> Thanks in anticipation.
>|||I've narrowed this down a bit. It seems to happen only with line art no
matter what file format your using (png, gif etc.) The only way I've found
around it (which isn't acceptable in my opinion) is to use the "fit"
parameter for the image.
From what I've read - RS sends a jscript to resize image in browser. I'm
guessing it fails to work because it is line art.
"Saeed Ahmad" <Saeed Ahmad@.discussions.microsoft.com> wrote in message
news:B47ABB44-24D6-433D-A621-9DCBE48690C1@.microsoft.com...
> Hi,
> I have reporting services installed on windows 2003 server.
> Embedded Images do display in designer preview, but they do not display in
> Report Manager or browser. When I use localhost instead of my machine name
> in
> report url, then images are displayed. I have installed service pack 1 & 2
> for RS. After that I installed SP4 for SQL Server. Can some body help in
> this
> regard?
> Thanks in anticipation.
>sql
Monday, March 26, 2012
Images are not shown
I have an image in a report. (Set to External, Url is set to
http://localhost/JB/images/name.gif).
When I try to display the report in HTML or PDF, the image is not shown.
All my webs are set to intergrated security. In the IIS log I see, that the
report server tries to access the image via Anonymous.
Why?
How I can change that he use integrated security? ( I have tried to set the
'unattended report processing', but no change)
Thanks
EricHello Eric,
Based on my experience, this issue can occur because images folder is not
set up to a virtual directory. You could only use link /images/name.gif
inside the virutal directory JB. For example, when you access
http://localhost/JB/images/name.gif directly in IE, the image cannot be
shown. However, if you copy name.gif to the folder of the virtual directory
JB, you could access the image directly via the URL
http://localhost/JB/name.gif
Therefore, I suggest that you create a new VD to point to the images folder
so that you could access the images directly in IE. After that, you could
use the URL in Report design.
Because the issue is a IIS related issue, if you need further assistance on
the issue, please post the quesiton in the following newsgroup:
microsoft.public.inetserver.iis
Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: "Eric" <jug@.nospam.nospam>
| Subject: Images are not shown
| Date: Mon, 27 Jun 2005 11:18:47 +0200
| Lines: 17
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| Message-ID: <eNd76kveFHA.2420@.TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: c-213-160-47-98.customer.ggaweb.ch 213.160.47.98
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:46745
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| Hi,
|
| I have an image in a report. (Set to External, Url is set to
| http://localhost/JB/images/name.gif).
| When I try to display the report in HTML or PDF, the image is not shown.
|
| All my webs are set to intergrated security. In the IIS log I see, that
the
| report server tries to access the image via Anonymous.
|
| Why?
| How I can change that he use integrated security? ( I have tried to set
the
| 'unattended report processing', but no change)
|
| Thanks
| Eric
|
|
||||Hello Eric,
Sorry for my typo, we shall be able to access the image properly though it
is not directly under JB virtual directory
http://localhost/JB/images/name.gif
Please check if you could access the image directly in IE. If not, IIS
newsgroup is more proper place to submist this issue.
Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| From: petery@.online.microsoft.com (Peter Yang [MSFT])
| Organization: Microsoft
| Date: Tue, 28 Jun 2005 02:23:28 GMT
| Subject: RE: Images are not shown
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
|
| Hello Eric,
|
| Based on my experience, this issue can occur because images folder is not
| set up to a virtual directory. You could only use link /images/name.gif
| inside the virutal directory JB. For example, when you access
| http://localhost/JB/images/name.gif directly in IE, the image cannot be
| shown. However, if you copy name.gif to the folder of the virtual
directory
| JB, you could access the image directly via the URL
| http://localhost/JB/name.gif
|
| Therefore, I suggest that you create a new VD to point to the images
folder
| so that you could access the images directly in IE. After that, you could
| use the URL in Report design.
|
| Because the issue is a IIS related issue, if you need further assistance
on
| the issue, please post the quesiton in the following newsgroup:
|
| microsoft.public.inetserver.iis
|
| Regards,
|
| Peter Yang
| MCSE2000/2003, MCSA, MCDBA
| Microsoft Online Partner Support
|
| When responding to posts, please "Reply to Group" via your newsreader so
| that others may learn and benefit from your issue.
|
| =====================================================|
|
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
|
|
| --
| | From: "Eric" <jug@.nospam.nospam>
| | Subject: Images are not shown
| | Date: Mon, 27 Jun 2005 11:18:47 +0200
| | Lines: 17
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| | x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.2527
| | X-RFC2646: Format=Flowed; Original
| | Message-ID: <eNd76kveFHA.2420@.TK2MSFTNGP12.phx.gbl>
| | Newsgroups: microsoft.public.sqlserver.reportingsvcs
| | NNTP-Posting-Host: c-213-160-47-98.customer.ggaweb.ch 213.160.47.98
| | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.sqlserver.reportingsvcs:46745
| | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
| |
| | Hi,
| |
| | I have an image in a report. (Set to External, Url is set to
| | http://localhost/JB/images/name.gif).
| | When I try to display the report in HTML or PDF, the image is not shown.
| |
| | All my webs are set to intergrated security. In the IIS log I see, that
| the
| | report server tries to access the image via Anonymous.
| |
| | Why?
| | How I can change that he use integrated security? ( I have tried to set
| the
| | 'unattended report processing', but no change)
| |
| | Thanks
| | Eric
| |
| |
| |
||||Hello Peter,
Thanks for answering.
Yes, I can access the image directly in IE.
How I mentioned before, the problem is that the report server doesn't access
the URL with Integrated security.
The report self (HTML Preview) runs under integrated security.
Thanks
Eric
"Peter Yang [MSFT]" <petery@.online.microsoft.com> schrieb im Newsbeitrag
news:RH00wn4eFHA.940@.TK2MSFTNGXA01.phx.gbl...
> Hello Eric,
> Sorry for my typo, we shall be able to access the image properly though it
> is not directly under JB virtual directory
> http://localhost/JB/images/name.gif
> Please check if you could access the image directly in IE. If not, IIS
> newsgroup is more proper place to submist this issue.
> Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> --
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | From: petery@.online.microsoft.com (Peter Yang [MSFT])
> | Organization: Microsoft
> | Date: Tue, 28 Jun 2005 02:23:28 GMT
> | Subject: RE: Images are not shown
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> | MIME-Version: 1.0
> | Content-Type: text/plain
> | Content-Transfer-Encoding: 7bit
> |
> | Hello Eric,
> |
> | Based on my experience, this issue can occur because images folder is
> not
> | set up to a virtual directory. You could only use link /images/name.gif
> | inside the virutal directory JB. For example, when you access
> | http://localhost/JB/images/name.gif directly in IE, the image cannot be
> | shown. However, if you copy name.gif to the folder of the virtual
> directory
> | JB, you could access the image directly via the URL
> | http://localhost/JB/name.gif
> |
> | Therefore, I suggest that you create a new VD to point to the images
> folder
> | so that you could access the images directly in IE. After that, you
> could
> | use the URL in Report design.
> |
> | Because the issue is a IIS related issue, if you need further assistance
> on
> | the issue, please post the quesiton in the following newsgroup:
> |
> | microsoft.public.inetserver.iis
> |
> | Regards,
> |
> | Peter Yang
> | MCSE2000/2003, MCSA, MCDBA
> | Microsoft Online Partner Support
> |
> | When responding to posts, please "Reply to Group" via your newsreader so
> | that others may learn and benefit from your issue.
> |
> | =====================================================> |
> |
> | This posting is provided "AS IS" with no warranties, and confers no
> rights.
> |
> |
> |
> |
> | --
> | | From: "Eric" <jug@.nospam.nospam>
> | | Subject: Images are not shown
> | | Date: Mon, 27 Jun 2005 11:18:47 +0200
> | | Lines: 17
> | | X-Priority: 3
> | | X-MSMail-Priority: Normal
> | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
> | | x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.2527
> | | X-RFC2646: Format=Flowed; Original
> | | Message-ID: <eNd76kveFHA.2420@.TK2MSFTNGP12.phx.gbl>
> | | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | | NNTP-Posting-Host: c-213-160-47-98.customer.ggaweb.ch 213.160.47.98
> | | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
> | | Xref: TK2MSFTNGXA01.phx.gbl
> microsoft.public.sqlserver.reportingsvcs:46745
> | | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> | |
> | | Hi,
> | |
> | | I have an image in a report. (Set to External, Url is set to
> | | http://localhost/JB/images/name.gif).
> | | When I try to display the report in HTML or PDF, the image is not
> shown.
> | |
> | | All my webs are set to intergrated security. In the IIS log I see,
> that
> | the
> | | report server tries to access the image via Anonymous.
> | |
> | | Why?
> | | How I can change that he use integrated security? ( I have tried to
> set
> | the
> | | 'unattended report processing', but no change)
> | |
> | | Thanks
> | | Eric
> | |
> | |
> | |
> |
>|||Peter,
I have the same problem as Eric. I followed your instructions and can view
the logo.jpg in IE, and also in my report designer.
My problem is after deploying the report to the report server and running
the report, the report will not show the image.
The SP1 Read Me said that external images in image controls are now
supported, and that I must configure an account for unattended report
execution. I did this, but still cannot view the image when the deployed
report runs on the report server.
-- Mike J|||Hello Eric,
Based on my test, this behavior seems to be as designed. I think this is
because the referenced images are usually on public sites which only
requires anonymous authentication. Usually reporting service shall re-try
with the impersonated credential of the client. Apparently it does not do
so in getting image from other web sites/VDs.
We have to enable "anonymouse authentication" on the image folder of other
VD so that the report can work properly.
Please rest assured your feedback and concerns on this issue is routed to
the proper channel. Also, you may want to submit your feedback by following
method:
Visit the following Microsoft Product Feedback Web site
http://register.microsoft.com/mswish/suggestion.asp
and then complete and submit the form.
E-mail - To send comments or suggestions via e-mail, use the following
Microsoft Wish Program e-mail address, mswish@.microsoft.com.
Have a great day!
Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
| From: "Eric" <jug@.nospam.nospam>
| References: <eNd76kveFHA.2420@.TK2MSFTNGP12.phx.gbl>
<fPG2gh4eFHA.2656@.TK2MSFTNGXA01.phx.gbl>
<RH00wn4eFHA.940@.TK2MSFTNGXA01.phx.gbl>
| Subject: Re: Images are not shown
| Date: Tue, 28 Jun 2005 09:30:33 +0200
| Lines: 142
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| Message-ID: <u27iIN7eFHA.1400@.TK2MSFTNGP15.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: c-213-160-47-98.customer.ggaweb.ch 213.160.47.98
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:46852
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| Hello Peter,
|
| Thanks for answering.
| Yes, I can access the image directly in IE.
|
| How I mentioned before, the problem is that the report server doesn't
access
| the URL with Integrated security.
|
| The report self (HTML Preview) runs under integrated security.
|
| Thanks
| Eric
|
| "Peter Yang [MSFT]" <petery@.online.microsoft.com> schrieb im Newsbeitrag
| news:RH00wn4eFHA.940@.TK2MSFTNGXA01.phx.gbl...
| > Hello Eric,
| >
| > Sorry for my typo, we shall be able to access the image properly though
it
| > is not directly under JB virtual directory
| >
| > http://localhost/JB/images/name.gif
| >
| > Please check if you could access the image directly in IE. If not, IIS
| > newsgroup is more proper place to submist this issue.
| >
| > Regards,
| >
| > Peter Yang
| > MCSE2000/2003, MCSA, MCDBA
| > Microsoft Online Partner Support
| >
| > When responding to posts, please "Reply to Group" via your newsreader so
| > that others may learn and benefit from your issue.
| >
| > =====================================================| >
| >
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| > rights.
| >
| >
| >
| >
| > --
| > | Newsgroups: microsoft.public.sqlserver.reportingsvcs
| > | From: petery@.online.microsoft.com (Peter Yang [MSFT])
| > | Organization: Microsoft
| > | Date: Tue, 28 Jun 2005 02:23:28 GMT
| > | Subject: RE: Images are not shown
| > | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
| > | MIME-Version: 1.0
| > | Content-Type: text/plain
| > | Content-Transfer-Encoding: 7bit
| > |
| > | Hello Eric,
| > |
| > | Based on my experience, this issue can occur because images folder is
| > not
| > | set up to a virtual directory. You could only use link
/images/name.gif
| > | inside the virutal directory JB. For example, when you access
| > | http://localhost/JB/images/name.gif directly in IE, the image cannot
be
| > | shown. However, if you copy name.gif to the folder of the virtual
| > directory
| > | JB, you could access the image directly via the URL
| > | http://localhost/JB/name.gif
| > |
| > | Therefore, I suggest that you create a new VD to point to the images
| > folder
| > | so that you could access the images directly in IE. After that, you
| > could
| > | use the URL in Report design.
| > |
| > | Because the issue is a IIS related issue, if you need further
assistance
| > on
| > | the issue, please post the quesiton in the following newsgroup:
| > |
| > | microsoft.public.inetserver.iis
| > |
| > | Regards,
| > |
| > | Peter Yang
| > | MCSE2000/2003, MCSA, MCDBA
| > | Microsoft Online Partner Support
| > |
| > | When responding to posts, please "Reply to Group" via your newsreader
so
| > | that others may learn and benefit from your issue.
| > |
| > | =====================================================| > |
| > |
| > | This posting is provided "AS IS" with no warranties, and confers no
| > rights.
| > |
| > |
| > |
| > |
| > | --
| > | | From: "Eric" <jug@.nospam.nospam>
| > | | Subject: Images are not shown
| > | | Date: Mon, 27 Jun 2005 11:18:47 +0200
| > | | Lines: 17
| > | | X-Priority: 3
| > | | X-MSMail-Priority: Normal
| > | | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| > | | x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.2527
| > | | X-RFC2646: Format=Flowed; Original
| > | | Message-ID: <eNd76kveFHA.2420@.TK2MSFTNGP12.phx.gbl>
| > | | Newsgroups: microsoft.public.sqlserver.reportingsvcs
| > | | NNTP-Posting-Host: c-213-160-47-98.customer.ggaweb.ch 213.160.47.98
| > | | Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| > | | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.sqlserver.reportingsvcs:46745
| > | | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
| > | |
| > | | Hi,
| > | |
| > | | I have an image in a report. (Set to External, Url is set to
| > | | http://localhost/JB/images/name.gif).
| > | | When I try to display the report in HTML or PDF, the image is not
| > shown.
| > | |
| > | | All my webs are set to intergrated security. In the IIS log I see,
| > that
| > | the
| > | | report server tries to access the image via Anonymous.
| > | |
| > | | Why?
| > | | How I can change that he use integrated security? ( I have tried to
| > set
| > | the
| > | | 'unattended report processing', but no change)
| > | |
| > | | Thanks
| > | | Eric
| > | |
| > | |
| > | |
| > |
| >
|
|
|sql
Images and PDF Export POST SP2
View, Excel View and TIFF View, but when exported to PDF they are not
displaying properly (they appear garbled, much like a scrambled TV signal).
Any ideas or thoughts?On Follow Up.. this appears to be images other than JPEG's, which according
to documentation are all rendered as PNG's.
"Rob Johnson" wrote:
> After installing RS SP2, images included in my reports display fine in HTML
> View, Excel View and TIFF View, but when exported to PDF they are not
> displaying properly (they appear garbled, much like a scrambled TV signal).
> Any ideas or thoughts?
Friday, March 23, 2012
Image Retrieving from database
I have a SQL database that has Images stored. I am able to read the image from the database and display it. But i am not able to control the size and the position where it is displayed. I want to develop something like a photo album. the images should be displayed in a smaller size. but when the user clicks on the image, it should blow up to its original size.
I am struggling with this for some time. Any suggestions as how to develop it??.
Any help in this regard would be highly appreciated.
thanks,
-sriramCreate thumbnails of the images when they're uploaded.|||Or when they are retrieved.|||You could try streaming the file and resizing it on the fly with GDI+
or using HTTP Handlers:
a good article is at
http://www.c-sharpcorner.com/Code/2003/June/HTTPHandlersForImages.asp
alternatively:
the following code allows an .aspx file to receive parameters (file name and width of picture) and return a .jpg so that in you HTML code you can use access an image like this:
src="SmartPicture.aspx?f=yourpic.jpg&w=50"
and the file yourpic.jpg will be displayed with a width of 50 pixels and a calculated proportional height. The file size will also be reduced - ie: if your original picture was 4Mb, it would be scaled down to around 15kb.
code as follows:
save it as SmartPicture.aspx
|||This works fine.
<%@. Page Language="C#" %>
<%@. Import Namespace="System.Drawing" %>
<%@. Import Namespace="System.Drawing.Imaging" %>
<script runat="server"
void Page_Load(Object s, EventArgs e) {double photoWidth,photoHeight;
double percentageDifference = 0;
bool heHasAccess = false;
System.Drawing.Image inputImage;//get information being sent
heHasAccess = true;//get file name
string pictureFileName = Request.QueryString["f"];
if(pictureFileName == null || pictureFileName == "") {
heHasAccess = false;
}//get width
try {
if (Request.QueryString["w"] == null) {
photoWidth = 0;
} else {
photoWidth = Int32.Parse(Request.QueryString["w"]);
}
}
catch {
photoWidth = 0;
}//if anything went wrong, show error picture
if(!heHasAccess) {
inputImage = System.Drawing.Image.FromFile(Server.MapPath("images/pictureNoAccess.jpg"));
} else {
inputImage = System.Drawing.Image.FromFile(Server.MapPath("images/" + pictureFileName));
}//if no width was given, assume the default now
if(photoWidth==0) {
if(!heHasAccess) {
photoWidth = 100;
} else {
photoWidth = inputImage.Width;
}
}//define size for new image
percentageDifference = inputImage.Width / photoWidth;
photoHeight = inputImage.Height / percentageDifference;//output new image with different size
Bitmap outputBitMap = new Bitmap(inputImage,Convert.ToInt32(photoWidth),Convert.ToInt32(photoHeight));
Response.ContentType = "image/jpeg";
outputBitMap.Save(Response.OutputStream, ImageFormat.Jpeg);}
</script>
But i have the image in a SQL database. I have image in a binary format.
So i am using the Response.BinaryWrite method.
But i have some other infromation also to be dispalyed with the image. For example some descrption and other deatils. But the image gets displayed at the top left corner hiding all other literals and labeles.
Any suggestions please.
thanks,
-sriram|||Could you post the code you are using?|||On button click: I am retreiving an image name :Test1 from my Sql Server database.
I am posting the code:
Dim imgid As String = Request.QueryString("Test1")
Dim conn As String = "data source=ERB112SERV;initial catalog=TEST;persist security info=False;user id=artak;password=po4d8dor1ju;workstation id=ERB112SERV;packet size=4096"
Dim myConnection As New SqlConnection("data source=ERB112SERV;initial catalog=TEST;persist security info=False;user id=artak;password=po4d8dor1ju;workstation id=ERB112SERV;packet size=4096")
Dim sql As String = "SELECT imgdata, imgtype FROM ImageStore WHERE imgtitle = 'Test1'"
Dim command As SqlCommand = New SqlCommand(sql, myConnection)
myConnection.Open()
Dim dr As SqlDataReader = Command.ExecuteReader()
If (dr.Read()) Then
Response.ContentType = dr("imgtype").ToString()
Response.BinaryWrite(dr.Item("imgdata"))
End If
myConnection.Close()
Thanks for mailing.
-sriram|||But the image gets displayed at the top left corner hiding all other literals and labeles.
Sounds like you're mixing absolute, and relative positioning, no?
If thatis the case, then you're going to have to either specify the positioning for the image, or go to all relative positioning (flow layout) for the controls involved.|||You have to assing the image to img tag, then you could display it where ever you want!
Below example might helps you to understand it!
Live example
http://www.w3coder.com/contest/examples/showipinimage.aspx
and code for it at
http://www.w3coder.com/contest/examples/ImageIPonaspxpage.zip
Hope these helps!|||hi,
Sorry. I didnt quiet get it. I am not even able to assign the image from a database.
So i am not able to write the output from a database to an Image.
I am not able to get the idea of assigning relative positioning.
can you help me with a sample codr or so so that i can understand it well.
thanks,
-sriram|||Would you have code for saving an image to a database?|||I don't understand your question.|||
can anyone pls enlighten my on to retrieve the image file from MS Access?
what is the syntax and the way of approving and maybe a sample code.. im a noob... thanks
sqlimage resource returned in code
I'm trying to display an image that has been returned from an external assembly, but am having no luck at all.
Essentially, I have a utility class that goes to a resource file and pulls out a JPG and returns it. I have set the value property of the image control on the report to hit this assembly, like so :
= Code.getLogo()
where the function Code.getLogo() actually interfaces with the utility class.
I have tried several variations of this code. I have returned the image as an Image object, a JPG, a TIFF and a BMP. I've also been adventurous and tried converting it to a base64 string before it gets to the report and then having the report convert it back to bytes before shoving it into the image value. Consistently I get this error :
The value expression used in image ‘logo’ returned a data type that is not valid.
A reply to a similar post on the www.sqlreportingservices.net site suggested that it's a Code Access Security issue, but I'm sure it's not, because when I dump my base64 string into a text field, it fills half the page.
What is this control expecting? Any thoughts?
Have you tried setting Image.Source to Database? If you specify Embedded, the value of Value is the resource's name embedded in the report, not the image's binary data. If you specify External, it is expecting a URL path to the image. Specifying Database indicates that the image contents is coming from a database field and Value is then the image's binary data. It's not actually coming from the database in your case, but Image should interpret the Value properly all the same.|||Yes, I did indeed have it set to Embedded.
When I set to Database, I have a whole new set of errors, but they seem more straightforward. I'll fiddle with it for a while and see what I can come up with.
Got me over a big hurdle. Thanks.
|||Next you'll want to make sure your MIMEType is set correctly. If you're returning JPEG data, you want to set your MIMEType to image/jpeg. If you have a mismatch, it will try to interpret your JPEG as a BMP (i.e. MIMEType = image/bmp) rather than the JPEG that it actually is.|||Your function has to return the image as byte array (i.e. byte[]). In addition, the image type has to be set to "Database", otherwise the Value property is not interpreted as the actual image data.
--Robert
|||Awesome, it worked. When I changed my Source property to Database, I also took out my conversion statements so that it would return just an image file. Once I put the conversion-to-byte-array logic back in, it worked.Thank ye very much for your help.
Image rendering in IE
I cannot get any of my images to display in reports. I have tried all type
of image storage..embedded, external and database and they preview ok but
when i display the report through report manager or URL, the images will not
show. Any ideas?
regardsIt wouldn't be security settings preventing the display of images would it?
"ACC365" <ACC365@.discussions.microsoft.com> wrote in message
news:A865D853-BA28-4FAE-8EC9-14B305F02A3B@.microsoft.com...
> Hi All,
> I cannot get any of my images to display in reports. I have tried all type
> of image storage..embedded, external and database and they preview ok but
> when i display the report through report manager or URL, the images will
not
> show. Any ideas?
> regards|||Well I have found the solution. It is to do with the name of the
server...there is an underscore in it. IE doesn't view an underscore as a
valid charecter so it cannot resolve the pictures. The solution was to either
rename the server or change the "UseSessioncookies" flag in the reporting
services db. In the table configurationInfo I changes the flag to false and
lo and behold it worked.
much happier.
Andy
Image not displaying webform reportviewer
Hi ,
I am using SQL server reports thru web services to display that in web form . Charts are not dispalying coming with [x] image.
I am using VS .NET 2003 . Text is coming properly only problem with the image.
Can anyone suggest me the possible solution for that.
thanx in advance
I'm having this issue as well. Did you ever get it resovled?
Anyone?
Wednesday, March 21, 2012
image files
the image in RS/RM, it does not display. Only a red X displays.
I'm using RS 2000 with Form based authentication.
Please Help!!!!On Mar 13, 2:56 pm, Nikki <N...@.discussions.microsoft.com> wrote:
> I've uploaded a gif file to RS using Reports Manager, but when I go to view
> the image in RS/RM, it does not display. Only a red X displays.
> I'm using RS 2000 with Form based authentication.
> Please Help!!!!
I would suggest embedding the image in the report itself. Hope this
helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||how do I embed an image?
"EMartinez" wrote:
> On Mar 13, 2:56 pm, Nikki <N...@.discussions.microsoft.com> wrote:
> > I've uploaded a gif file to RS using Reports Manager, but when I go to view
> > the image in RS/RM, it does not display. Only a red X displays.
> >
> > I'm using RS 2000 with Form based authentication.
> >
> > Please Help!!!!
> I would suggest embedding the image in the report itself. Hope this
> helps.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>
Image does not display on report
I have a simple report that has nothing but an image. The image is part of the project. The image displays in the VS 2005 dev environment when report is previewed. But when deployed and run on the report server website, it does not display. If the report is print previewed or exported to Excel, the image displays. I've set my browser to have the least security as possible but still to no avail (made the website trusted as well). The server is running SQL Server 2005 SP2. My browser is IE7. Can anyone please help? Thanks.
Found the problem. The report didn't like that the 5.25" x 1.5" image was being fit into a 1.5" x 0.5" area. When I made the image smaller, it was displaying fine. Sorry for the trouble.Image does not display
I have created a simple report using VS.net with an embeded image.
when I open the report from my PC the image displays well not a problem.Also
for any users this works fine.
My PC name is "Personal1"
Report server exists on Server: "Server1"
url used to access this Report is http://Server1.gar.abc.com/Reports
BUT the problem is
When I access this report from other servers(Personal2,Personal3 etc)
it does not display image(Or it display missing image icon).
Can someone suggest the cause and problem.
thanks
-aslamSolved this problem from the link
http://www.codeproject.com/useritems/RenderStreamImages.asp
-aslam
"replyaslam" wrote:
> Hi post,
> I have created a simple report using VS.net with an embeded image.
> when I open the report from my PC the image displays well not a problem.Also
> for any users this works fine.
> My PC name is "Personal1"
> Report server exists on Server: "Server1"
> url used to access this Report is http://Server1.gar.abc.com/Reports
> BUT the problem is
> When I access this report from other servers(Personal2,Personal3 etc)
> it does not display image(Or it display missing image icon).
> Can someone suggest the cause and problem.
> thanks
> -aslamsql
Monday, March 19, 2012
Image and text values not displayed in header or footer
coming from Database or sometimes an alternative text in place of the image.
Both ways I couldn't do it.
Case Text: I have tried several ways such as using ReportItem Parameters,
but the problem is the text is displayed in the first page of a group. If the
group region needs morethan one page when the report is rendered then the
next pages will not have the header or footer text.
Case Image: No means at all!!!!!
Is there any way of achieving this? Please help ...
--
GoitThere is an option on the Grouping and Sorting Properties dialog to repeat
group headers/footers. If you select the checkbox, the group header will be
repeated and hence the referenced reportitem value will show up in page
header/footer.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Goitom" <Goitom@.discussions.microsoft.com> wrote in message
news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
>I have a report in which I need to display an Image in the header, that is
> coming from Database or sometimes an alternative text in place of the
> image.
> Both ways I couldn't do it.
> Case Text: I have tried several ways such as using ReportItem Parameters,
> but the problem is the text is displayed in the first page of a group. If
> the
> group region needs morethan one page when the report is rendered then the
> next pages will not have the header or footer text.
> Case Image: No means at all!!!!!
> Is there any way of achieving this? Please help ...
> --
> Goit|||Thanks Robert,
You are right, I will check this out but how about the image? Your solution
could be used only for the case of text field. But still I am not able to
display an image logo in the header of the report that needs to be repeated
in all the pages and its source is database
Goit
"Robert Bruckner [MSFT]" wrote:
> There is an option on the Grouping and Sorting Properties dialog to repeat
> group headers/footers. If you select the checkbox, the group header will be
> repeated and hence the referenced reportitem value will show up in page
> header/footer.
>
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
> news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
> >I have a report in which I need to display an Image in the header, that is
> > coming from Database or sometimes an alternative text in place of the
> > image.
> > Both ways I couldn't do it.
> > Case Text: I have tried several ways such as using ReportItem Parameters,
> > but the problem is the text is displayed in the first page of a group. If
> > the
> > group region needs morethan one page when the report is rendered then the
> > next pages will not have the header or footer text.
> >
> > Case Image: No means at all!!!!!
> >
> > Is there any way of achieving this? Please help ...
> > --
> > Goit
>
>|||It sounds like you want the same image to show up in the header of every
page. There are several options to achieve this:
* use an "embedded" image in the report. This works well if the image is
e.g. a company logo.
* use a "project" image which is part of the report solution. The image will
get published as resource to the report server
* use a "web" image (aka external image) - which requires at least RS 2000
SP1.
If you really need the image to come from the database, you can do the
following:
* add a dataset DImage to the report which retrieves the image data - e.g.
as ImageData column.
* add a new report parameter PImage of type String. Make the parameter
hidden (non-prompted). Set the parameter default as query-based and choose
ImageData as column.
* add a new Image report item in the page header/footer. Set the image type
to "Database". For the image value expression use =Parameters!PImage.Value.
Don't forget the set the mimetype correctly.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Goitom" <Goitom@.discussions.microsoft.com> wrote in message
news:F071F4C7-08AD-4654-911C-32DA43EA3441@.microsoft.com...
> Thanks Robert,
> You are right, I will check this out but how about the image? Your
> solution
> could be used only for the case of text field. But still I am not able to
> display an image logo in the header of the report that needs to be
> repeated
> in all the pages and its source is database
>
> --
> Goit
>
> "Robert Bruckner [MSFT]" wrote:
>> There is an option on the Grouping and Sorting Properties dialog to
>> repeat
>> group headers/footers. If you select the checkbox, the group header will
>> be
>> repeated and hence the referenced reportitem value will show up in page
>> header/footer.
>>
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
>> news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
>> >I have a report in which I need to display an Image in the header, that
>> >is
>> > coming from Database or sometimes an alternative text in place of the
>> > image.
>> > Both ways I couldn't do it.
>> > Case Text: I have tried several ways such as using ReportItem
>> > Parameters,
>> > but the problem is the text is displayed in the first page of a group.
>> > If
>> > the
>> > group region needs morethan one page when the report is rendered then
>> > the
>> > next pages will not have the header or footer text.
>> >
>> > Case Image: No means at all!!!!!
>> >
>> > Is there any way of achieving this? Please help ...
>> > --
>> > Goit
>>|||Thanks a lot, I have tried this approach several times with different
techiniques but the end result is that the image box control shows the no
image icon.
--
Goit
"Robert Bruckner [MSFT]" wrote:
> It sounds like you want the same image to show up in the header of every
> page. There are several options to achieve this:
> * use an "embedded" image in the report. This works well if the image is
> e.g. a company logo.
> * use a "project" image which is part of the report solution. The image will
> get published as resource to the report server
> * use a "web" image (aka external image) - which requires at least RS 2000
> SP1.
> If you really need the image to come from the database, you can do the
> following:
> * add a dataset DImage to the report which retrieves the image data - e.g.
> as ImageData column.
> * add a new report parameter PImage of type String. Make the parameter
> hidden (non-prompted). Set the parameter default as query-based and choose
> ImageData as column.
> * add a new Image report item in the page header/footer. Set the image type
> to "Database". For the image value expression use =Parameters!PImage.Value.
> Don't forget the set the mimetype correctly.
>
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
> news:F071F4C7-08AD-4654-911C-32DA43EA3441@.microsoft.com...
> > Thanks Robert,
> >
> > You are right, I will check this out but how about the image? Your
> > solution
> > could be used only for the case of text field. But still I am not able to
> > display an image logo in the header of the report that needs to be
> > repeated
> > in all the pages and its source is database
> >
> >
> > --
> > Goit
> >
> >
> > "Robert Bruckner [MSFT]" wrote:
> >
> >> There is an option on the Grouping and Sorting Properties dialog to
> >> repeat
> >> group headers/footers. If you select the checkbox, the group header will
> >> be
> >> repeated and hence the referenced reportitem value will show up in page
> >> header/footer.
> >>
> >>
> >> -- Robert
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
> >> news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
> >> >I have a report in which I need to display an Image in the header, that
> >> >is
> >> > coming from Database or sometimes an alternative text in place of the
> >> > image.
> >> > Both ways I couldn't do it.
> >> > Case Text: I have tried several ways such as using ReportItem
> >> > Parameters,
> >> > but the problem is the text is displayed in the first page of a group.
> >> > If
> >> > the
> >> > group region needs morethan one page when the report is rendered then
> >> > the
> >> > next pages will not have the header or footer text.
> >> >
> >> > Case Image: No means at all!!!!!
> >> >
> >> > Is there any way of achieving this? Please help ...
> >> > --
> >> > Goit
> >>
> >>
> >>
>
>|||Are you sure the image is really stored as image in the database (rather
than being stored as OLE image, which for instance Access would do)?
If it is stored as OLE image, you have to get rid of the OLE header. If the
bitmap was created on an English system, the OLE header is 78 bytes (e.g. on
Spanish it would be 88 bytes). Use the following image value expression to
make the image show up (79 == header length + 1):
=System.Text.Encoding.Default.GetBytes(Mid(System.Text.Encoding.Default.GetString(Fields!Picture.Value),79))
Alternatively, you can use the following expression (which only works for
images created on an en-US system!):
=System.Convert.FromBase64String(Mid(System.Convert.ToBase64String(Fields!Picture.Value),105))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Goitom" <Goitom@.discussions.microsoft.com> wrote in message
news:ED81ACCF-9D9E-4E4A-9A58-2A6485E338D9@.microsoft.com...
> Thanks a lot, I have tried this approach several times with different
> techiniques but the end result is that the image box control shows the no
> image icon.
> --
> Goit
>
> "Robert Bruckner [MSFT]" wrote:
>> It sounds like you want the same image to show up in the header of every
>> page. There are several options to achieve this:
>> * use an "embedded" image in the report. This works well if the image is
>> e.g. a company logo.
>> * use a "project" image which is part of the report solution. The image
>> will
>> get published as resource to the report server
>> * use a "web" image (aka external image) - which requires at least RS
>> 2000
>> SP1.
>> If you really need the image to come from the database, you can do the
>> following:
>> * add a dataset DImage to the report which retrieves the image data -
>> e.g.
>> as ImageData column.
>> * add a new report parameter PImage of type String. Make the parameter
>> hidden (non-prompted). Set the parameter default as query-based and
>> choose
>> ImageData as column.
>> * add a new Image report item in the page header/footer. Set the image
>> type
>> to "Database". For the image value expression use
>> =Parameters!PImage.Value.
>> Don't forget the set the mimetype correctly.
>>
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
>> news:F071F4C7-08AD-4654-911C-32DA43EA3441@.microsoft.com...
>> > Thanks Robert,
>> >
>> > You are right, I will check this out but how about the image? Your
>> > solution
>> > could be used only for the case of text field. But still I am not able
>> > to
>> > display an image logo in the header of the report that needs to be
>> > repeated
>> > in all the pages and its source is database
>> >
>> >
>> > --
>> > Goit
>> >
>> >
>> > "Robert Bruckner [MSFT]" wrote:
>> >
>> >> There is an option on the Grouping and Sorting Properties dialog to
>> >> repeat
>> >> group headers/footers. If you select the checkbox, the group header
>> >> will
>> >> be
>> >> repeated and hence the referenced reportitem value will show up in
>> >> page
>> >> header/footer.
>> >>
>> >>
>> >> -- Robert
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >>
>> >>
>> >> "Goitom" <Goitom@.discussions.microsoft.com> wrote in message
>> >> news:D4AB0430-7F67-4CC1-BDE2-4B29E7254F48@.microsoft.com...
>> >> >I have a report in which I need to display an Image in the header,
>> >> >that
>> >> >is
>> >> > coming from Database or sometimes an alternative text in place of
>> >> > the
>> >> > image.
>> >> > Both ways I couldn't do it.
>> >> > Case Text: I have tried several ways such as using ReportItem
>> >> > Parameters,
>> >> > but the problem is the text is displayed in the first page of a
>> >> > group.
>> >> > If
>> >> > the
>> >> > group region needs morethan one page when the report is rendered
>> >> > then
>> >> > the
>> >> > next pages will not have the header or footer text.
>> >> >
>> >> > Case Image: No means at all!!!!!
>> >> >
>> >> > Is there any way of achieving this? Please help ...
>> >> > --
>> >> > Goit
>> >>
>> >>
>> >>
>>
Image And Expression
i using an expression at the data value with the IIF statement to call the
image which i have embeded 2 images and wanna to display them on the table
textbox when they they satify the IIF statement. and i encounter this error;
The value expression for the image â'image6â' contains an error: [BC30451] Name
'check' is not declared.
how can i resolve this problem or is there any other alternative for mi to
this issue.because wat i want is that within the IIF statement i wan to
display the different image.
thanks in advance
Angelacan you post the expression
"Angela" wrote:
> hi there,
> i using an expression at the data value with the IIF statement to call the
> image which i have embeded 2 images and wanna to display them on the table
> textbox when they they satify the IIF statement. and i encounter this error;
> The value expression for the image â'image6â' contains an error: [BC30451] Name
> 'check' is not declared.
> how can i resolve this problem or is there any other alternative for mi to
> this issue.because wat i want is that within the IIF statement i wan to
> display the different image.
> thanks in advance
> Angela
>|||=iif( First(Fields!allergyRoute_CODE.Value, "DataSet1") = Fields!Code.Value ,
check , checked )
(the image name is check and checked)
"Antoon" wrote:
> can you post the expression
> "Angela" wrote:
> > hi there,
> > i using an expression at the data value with the IIF statement to call the
> > image which i have embeded 2 images and wanna to display them on the table
> > textbox when they they satify the IIF statement. and i encounter this error;
> > The value expression for the image â'image6â' contains an error: [BC30451] Name
> > 'check' is not declared.
> > how can i resolve this problem or is there any other alternative for mi to
> > this issue.because wat i want is that within the IIF statement i wan to
> > display the different image.
> >
> > thanks in advance
> > Angela
> >|||ok,
- The name of the image has to be between quotes.
- You can not put this in a textbox, you can put the expression in an
image-box. So first put an image-box on you report (or in a table cell) and
than change the value of the image to the expression.
- In the expression you've given the Code-value of each row of the table is
compared to the "First" allergyRout_Code-value. This migth be correct, but if
you want to check against every value of allergyRout_Code, you should ommit
the "First"- function (if they are in the same dataset)
=iif( Fields!allergyRoute_CODE.Value = Fields!Code.Value ,
"check" , "checked" )
"Angela" wrote:
> =iif( First(Fields!allergyRoute_CODE.Value, "DataSet1") = Fields!Code.Value ,
> check , checked )
> (the image name is check and checked)
> "Antoon" wrote:
> > can you post the expression
> >
> > "Angela" wrote:
> >
> > > hi there,
> > > i using an expression at the data value with the IIF statement to call the
> > > image which i have embeded 2 images and wanna to display them on the table
> > > textbox when they they satify the IIF statement. and i encounter this error;
> > > The value expression for the image â'image6â' contains an error: [BC30451] Name
> > > 'check' is not declared.
> > > how can i resolve this problem or is there any other alternative for mi to
> > > this issue.because wat i want is that within the IIF statement i wan to
> > > display the different image.
> > >
> > > thanks in advance
> > > Angela
> > >|||hi Antoon,
for the value to compare, they are from 2 different dataset. bcause i want
to compare the actual value with the master values. so if the answer matches
then i will display the correct image. And is there another other way apart
from making them to be the same dataset?
ur regards
Angela
"Antoon" wrote:
> ok,
> - The name of the image has to be between quotes.
> - You can not put this in a textbox, you can put the expression in an
> image-box. So first put an image-box on you report (or in a table cell) and
> than change the value of the image to the expression.
> - In the expression you've given the Code-value of each row of the table is
> compared to the "First" allergyRout_Code-value. This migth be correct, but if
> you want to check against every value of allergyRout_Code, you should ommit
> the "First"- function (if they are in the same dataset)
> =iif( Fields!allergyRoute_CODE.Value = Fields!Code.Value ,
> "check" , "checked" )
>
> "Angela" wrote:
> > =iif( First(Fields!allergyRoute_CODE.Value, "DataSet1") = Fields!Code.Value ,
> > check , checked )
> >
> > (the image name is check and checked)
> >
> > "Antoon" wrote:
> >
> > > can you post the expression
> > >
> > > "Angela" wrote:
> > >
> > > > hi there,
> > > > i using an expression at the data value with the IIF statement to call the
> > > > image which i have embeded 2 images and wanna to display them on the table
> > > > textbox when they they satify the IIF statement. and i encounter this error;
> > > > The value expression for the image â'image6â' contains an error: [BC30451] Name
> > > > 'check' is not declared.
> > > > how can i resolve this problem or is there any other alternative for mi to
> > > > this issue.because wat i want is that within the IIF statement i wan to
> > > > display the different image.
> > > >
> > > > thanks in advance
> > > > Angela
> > > >|||Yes there are, but if you really wan't to compare
First(Fields!allergyRoute_CODE.Value, "DataSet1") = Fields!Code.Value
then
=iif( First(Fields!allergyRoute_CODE.Value, "DataSet1") = Fields!Code.Value ,
"check" , "checked" )
should work fine (in an image-box-in-a-table-field)
"Angela" wrote:
> hi Antoon,
> for the value to compare, they are from 2 different dataset. bcause i want
> to compare the actual value with the master values. so if the answer matches
> then i will display the correct image. And is there another other way apart
> from making them to be the same dataset?
> ur regards
> Angela
> "Antoon" wrote:
> > ok,
> > - The name of the image has to be between quotes.
> > - You can not put this in a textbox, you can put the expression in an
> > image-box. So first put an image-box on you report (or in a table cell) and
> > than change the value of the image to the expression.
> > - In the expression you've given the Code-value of each row of the table is
> > compared to the "First" allergyRout_Code-value. This migth be correct, but if
> > you want to check against every value of allergyRout_Code, you should ommit
> > the "First"- function (if they are in the same dataset)
> > =iif( Fields!allergyRoute_CODE.Value = Fields!Code.Value ,
> > "check" , "checked" )
> >
> >
> > "Angela" wrote:
> >
> > > =iif( First(Fields!allergyRoute_CODE.Value, "DataSet1") = Fields!Code.Value ,
> > > check , checked )
> > >
> > > (the image name is check and checked)
> > >
> > > "Antoon" wrote:
> > >
> > > > can you post the expression
> > > >
> > > > "Angela" wrote:
> > > >
> > > > > hi there,
> > > > > i using an expression at the data value with the IIF statement to call the
> > > > > image which i have embeded 2 images and wanna to display them on the table
> > > > > textbox when they they satify the IIF statement. and i encounter this error;
> > > > > The value expression for the image â'image6â' contains an error: [BC30451] Name
> > > > > 'check' is not declared.
> > > > > how can i resolve this problem or is there any other alternative for mi to
> > > > > this issue.because wat i want is that within the IIF statement i wan to
> > > > > display the different image.
> > > > >
> > > > > thanks in advance
> > > > > Angela
> > > > >
Friday, February 24, 2012
Iif Statment, IsNumeric, FormatCurrency
Formatcurrency still fires. If I remove the FormatCurrency, and just
display the data, no problem. With the FormatCurrency in place, I get
an #error in the field if it is Alpha, but the proper information if it
is Numeric.
Example:
Iif(IsNumeric(Fields!item1.Value),FormatCurrency(Fields!item1.Value),"")
Has anyone else seen this before? If so, is there a workaround or is
there a problem with my logic?Howdy,
Both branches of the IIF function are evaluated without regard to the
logical expression. IIF just picks one of the evaluations to return.
(search this group for 'divide by zero error with iif' for more details
on the practicalities of this function)
Try something along the lines of
FormatCurrency(Iif(IsNumeric(Fields!item1.Value),Fields!item1.Value,-1))
HTH,
Sean G.|||Sean G.,
Thanks, I appreciate the assistance.
-Mal