Well, I would simply note that it was Razzak that had the ['correct']
answer.

Emmitt Dove
Manager, Converting Applications Development
Evergreen Packaging, Inc.
[email protected]
(203) 214-5683 m
(203) 643-8022 o
(203) 643-8086 f
[email protected]


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Thomas
Eldred
Sent: Thursday, February 11, 2010 15:37
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Variable images

Razzak and Emmitt you both ROCK!

Have a great weekend.

Tom

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak
Memon
Sent: Thursday, February 11, 2010 2:57 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Variable images

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 haven't 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.


Reply via email to