At 01:18 PM 2/11/2010, Tom Eldred wrote:
I am trying to incorporate an image into a report that changes
based on field values.
I tried setting a variable void1 as varbit but get an error
saying I havent the same scale. Both files are located in
the database folder, but I keep getting errors.
I know the problem is mine, but
.
Here is my statement in its non-working form.
(ifnull(eventone,ev1no.bmp, ev1yes.bmp))
Tom,
Here's how:
01. While in Report Designer, using the Expression Builder,
define a "TEXT" variable as follows:
Name: vImage
Type: TEXT
Expression: (IFEXISTS(EvenTone,'Ev1Yes.bmp','Ev1No.bmp'))
Calculate On: D or appropriate band
-- Assuming that all images are placed in the same folder.
02. Now place a "Variable Image" control on appropriate band
of the report with corresponding Left, Top, Width, and
Height coordinates assigned to "vImage" variable.
Also, make sure to check the following options:
. Center
. Maintain Aspect Ratio
. Stretch
. Visible
03. Save the report
04. Use [Report Preview] option to view and change anything
that needs to be adjusted.
05. Save all changes and close the report designer.
That's all there is to it!
If you are curious as to why a TEXT Variable is assigned to
a Variable Image and how R:BASE Report Engine interprets the
actual image, I will explain, if desired.
If you need a sample application to demonstrate the use of
such technique in Reports, Forms, and Labels, feel free to
send me a private e-mail.
Very Best R:egards,
Razzak.