Monday, March 12, 2012

Referencing a Control's Value Property

I'm trying to reference a image control value property. I want to show
the contents of the value property in a textbox control. I thought I
saw this before but cannot seem to find it again.
For example, I have an image control called image1. Which has a value
of: C:\images\xxxx.jpg
In a textbox I want to show "C:\images\xxxx.jpg"
I'm trying something like: textbox.value=image1.value
So when I preview the report I get an image, and a textbox that shows
the value used for the text box.
Any ideas?
Thanks,
rwiethornCurrently, the only Value property exposed to expressions is Textbox.Value
(in fact, the only report items visible to expressions at all are
textboxes).
But... You could achieve the desired result by making the value of the image
control an expression that refers to the contents of the textbox:
=ReportItems!Textbox1.Value
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"rwiethorn" <rwiethorn2002@.yahoo.com> wrote in message
news:553a0349.0408230522.2226ad4d@.posting.google.com...
> I'm trying to reference a image control value property. I want to show
> the contents of the value property in a textbox control. I thought I
> saw this before but cannot seem to find it again.
> For example, I have an image control called image1. Which has a value
> of: C:\images\xxxx.jpg
> In a textbox I want to show "C:\images\xxxx.jpg"
> I'm trying something like: textbox.value=image1.value
> So when I preview the report I get an image, and a textbox that shows
> the value used for the text box.
> Any ideas?
> Thanks,
> rwiethorn

No comments:

Post a Comment