By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,411 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

[Report Question]Using Bitmap indicators in report

P: n/a
At the moment I'm using a report which contains an indicator to show
if a Service group of the company isn't working well or is working
perfectly. This indicator is a "*" which looks like a traffic light.

Example:
When a Service groep does hit the target, the indicator will lit up
using the following Control Source:
=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")

But now, I would like the use a real bitmap, trafficlight bitmaps, to
show in stead of the indicators. So when I'm using these bitmaps in
the reports, on green (target made) the green light bitmap must
appear. How do I do this. The "*" indicator just doesn't use the same
code. I've already made a table with the traffic lights: good (Bitmap
object)
not good (Bitmap object)

So how could I use this in a report: something like in de control
source: if good then bitmap green?
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Have all the bitmaps superimposed on top of each other as images, and just
play around with the visible properties of each image

HTH

Phil
"Erwin" <07*****@student.hro.nl> wrote in message
news:98**************************@posting.google.c om...
At the moment I'm using a report which contains an indicator to show
if a Service group of the company isn't working well or is working
perfectly. This indicator is a "*" which looks like a traffic light.

Example:
When a Service groep does hit the target, the indicator will lit up
using the following Control Source:
=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")

But now, I would like the use a real bitmap, trafficlight bitmaps, to
show in stead of the indicators. So when I'm using these bitmaps in
the reports, on green (target made) the green light bitmap must
appear. How do I do this. The "*" indicator just doesn't use the same
code. I've already made a table with the traffic lights: good (Bitmap
object)
not good (Bitmap object)

So how could I use this in a report: something like in de control
source: if good then bitmap green?

Nov 13 '05 #2

P: n/a
But how could I make this visible. For example, I've put the bitmap in
c:/access/test1.bmp, test2.bmp, test3.bmp...How can I import them in
to the
report and make it visible? it's not like
=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")
And "*" is the one which lits up when the
target is reached. But which line tot you have to use if those stars
are
bitmaps?

=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"c:/access/test1.bmp")'-->
isn't the option.

But how do I make these bitmaps visible when a target is reached?


"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message news:<41*********************@mercury.nildram.net> ...
Have all the bitmaps superimposed on top of each other as images, and just
play around with the visible properties of each image

HTH

Phil
"Erwin" <07*****@student.hro.nl> wrote in message
news:98**************************@posting.google.c om...
At the moment I'm using a report which contains an indicator to show
if a Service group of the company isn't working well or is working
perfectly. This indicator is a "*" which looks like a traffic light.

Example:
When a Service groep does hit the target, the indicator will lit up
using the following Control Source:
=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")

But now, I would like the use a real bitmap, trafficlight bitmaps, to
show in stead of the indicators. So when I'm using these bitmaps in
the reports, on green (target made) the green light bitmap must
appear. How do I do this. The "*" indicator just doesn't use the same
code. I've already made a table with the traffic lights: good (Bitmap
object)
not good (Bitmap object)

So how could I use this in a report: something like in de control
source: if good then bitmap green?

Nov 13 '05 #3

P: n/a
Sorry, must give you more detail

Using the toolbox, create 3 images. Access will prompt you for which images
to use, so select the 3 traffic lights. Yoy may need to set the properties
to zoom.
Make all 3 images exactly the same size, and superimpose them over each
other. ( You may want to do this at the end so that you can see what is
happening)

Lets give the images names of "ImageRed", "ImageAmber","ImageGreen"

You now need to use a little code.
On the OnFormat of the Report

type

If [tot-betrouwbaarheid] < 0.8 then
ImageRed.Visible = True
ImageAmber.Visible = False
ImageGreen.visible = false
ElseIf [tot-betrouwbaarheid] >= 0.8 And [tot-betrouwbaarheid] < 1 Then
ImageRed.Visible = False
ImageAmber.Visible = True
ImageGreen.Visible = False
Else
ImageRed.Visible = False
ImageAmber.Visible = False
ImageGreen.Visible = True
End If

Let me know if it works OK

Phil
"Erwin" <07*****@student.hro.nl> wrote in message
news:98**************************@posting.google.c om...
But how could I make this visible. For example, I've put the bitmap in
c:/access/test1.bmp, test2.bmp, test3.bmp...How can I import them in
to the
report and make it visible? it's not like
=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")
And "*" is the one which lits up when the
target is reached. But which line tot you have to use if those stars
are
bitmaps?

=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"c:/access/test1.bmp")'-->
isn't the option.

But how do I make these bitmaps visible when a target is reached?


"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
news:<41*********************@mercury.nildram.net> ...
Have all the bitmaps superimposed on top of each other as images, and
just
play around with the visible properties of each image

HTH

Phil
"Erwin" <07*****@student.hro.nl> wrote in message
news:98**************************@posting.google.c om...
> At the moment I'm using a report which contains an indicator to show
> if a Service group of the company isn't working well or is working
> perfectly. This indicator is a "*" which looks like a traffic light.
>
> Example:
> When a Service groep does hit the target, the indicator will lit up
> using the following Control Source:
> =IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")
>
> But now, I would like the use a real bitmap, trafficlight bitmaps, to
> show in stead of the indicators. So when I'm using these bitmaps in
> the reports, on green (target made) the green light bitmap must
> appear. How do I do this. The "*" indicator just doesn't use the same
> code. I've already made a table with the traffic lights: good (Bitmap
> object)
> not good (Bitmap object)
>
> So how could I use this in a report: something like in de control
> source: if good then bitmap green?

Nov 13 '05 #4

P: n/a
I have been looking for more ways to find a solution. Your solution
worked fine, but I used this on, which uses one image control.

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)

If Me![tot-tastbaarheid] < 0.6 * 10 * [weegfactor-tastbaarheid] Then
Me.Image247.Picture = "C:\Rood.bmp"
ElseIf Me![tot-tastbaarheid] <= 0.8 * 10 * [weegfactor-tastbaarheid] >
0.6 * 10 * [weegfactor-tastbaarheid] Then
Me.Image247.Picture = "C:\Oranje.bmp"
Else
Me.Image247.Picture = "Groen.bmp"

End If
End Sub

This also works fine, yours too. But I'm going with this one, because
of the usage of one image control in the same size of al the bitmaps
of the traffic lights.

But thanks, it has helped me to create my own VBA code.

"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message news:<41***********************@mercury.nildram.ne t>...
Sorry, must give you more detail

Using the toolbox, create 3 images. Access will prompt you for which images
to use, so select the 3 traffic lights. Yoy may need to set the properties
to zoom.
Make all 3 images exactly the same size, and superimpose them over each
other. ( You may want to do this at the end so that you can see what is
happening)

Lets give the images names of "ImageRed", "ImageAmber","ImageGreen"

You now need to use a little code.
On the OnFormat of the Report

type

If [tot-betrouwbaarheid] < 0.8 then
ImageRed.Visible = True
ImageAmber.Visible = False
ImageGreen.visible = false
ElseIf [tot-betrouwbaarheid] >= 0.8 And [tot-betrouwbaarheid] < 1 Then
ImageRed.Visible = False
ImageAmber.Visible = True
ImageGreen.Visible = False
Else
ImageRed.Visible = False
ImageAmber.Visible = False
ImageGreen.Visible = True
End If

Let me know if it works OK

Phil
"Erwin" <07*****@student.hro.nl> wrote in message
news:98**************************@posting.google.c om...
But how could I make this visible. For example, I've put the bitmap in
c:/access/test1.bmp, test2.bmp, test3.bmp...How can I import them in
to the
report and make it visible? it's not like
=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")
And "*" is the one which lits up when the
target is reached. But which line tot you have to use if those stars
are
bitmaps?

=IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"c:/access/test1.bmp")'-->
isn't the option.

But how do I make these bitmaps visible when a target is reached?


"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
news:<41*********************@mercury.nildram.net> ...
Have all the bitmaps superimposed on top of each other as images, and
just
play around with the visible properties of each image

HTH

Phil
"Erwin" <07*****@student.hro.nl> wrote in message
news:98**************************@posting.google.c om...
> At the moment I'm using a report which contains an indicator to show
> if a Service group of the company isn't working well or is working
> perfectly. This indicator is a "*" which looks like a traffic light.
>
> Example:
> When a Service groep does hit the target, the indicator will lit up
> using the following Control Source:
> =IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")
>
> But now, I would like the use a real bitmap, trafficlight bitmaps, to
> show in stead of the indicators. So when I'm using these bitmaps in
> the reports, on green (target made) the green light bitmap must
> appear. How do I do this. The "*" indicator just doesn't use the same
> code. I've already made a table with the traffic lights: good (Bitmap
> object)
> not good (Bitmap object)
>
> So how could I use this in a report: something like in de control
> source: if good then bitmap green?

Nov 13 '05 #5

P: n/a
Yes, Much neater.
Problem with either solution if the path to the image gets changed. Might be
best to put them in the same folder as your database so that the path is
".\Red.bmp" etc

Phil

"Erwin" <07*****@student.hro.nl> wrote in message
news:98**************************@posting.google.c om...
I have been looking for more ways to find a solution. Your solution
worked fine, but I used this on, which uses one image control.

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)

If Me![tot-tastbaarheid] < 0.6 * 10 * [weegfactor-tastbaarheid] Then
Me.Image247.Picture = "C:\Rood.bmp"
ElseIf Me![tot-tastbaarheid] <= 0.8 * 10 * [weegfactor-tastbaarheid] >
0.6 * 10 * [weegfactor-tastbaarheid] Then
Me.Image247.Picture = "C:\Oranje.bmp"
Else
Me.Image247.Picture = "Groen.bmp"

End If
End Sub

This also works fine, yours too. But I'm going with this one, because
of the usage of one image control in the same size of al the bitmaps
of the traffic lights.

But thanks, it has helped me to create my own VBA code.

"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
news:<41***********************@mercury.nildram.ne t>...
Sorry, must give you more detail

Using the toolbox, create 3 images. Access will prompt you for which
images
to use, so select the 3 traffic lights. Yoy may need to set the
properties
to zoom.
Make all 3 images exactly the same size, and superimpose them over each
other. ( You may want to do this at the end so that you can see what is
happening)

Lets give the images names of "ImageRed", "ImageAmber","ImageGreen"

You now need to use a little code.
On the OnFormat of the Report

type

If [tot-betrouwbaarheid] < 0.8 then
ImageRed.Visible = True
ImageAmber.Visible = False
ImageGreen.visible = false
ElseIf [tot-betrouwbaarheid] >= 0.8 And [tot-betrouwbaarheid] < 1
Then
ImageRed.Visible = False
ImageAmber.Visible = True
ImageGreen.Visible = False
Else
ImageRed.Visible = False
ImageAmber.Visible = False
ImageGreen.Visible = True
End If

Let me know if it works OK

Phil
"Erwin" <07*****@student.hro.nl> wrote in message
news:98**************************@posting.google.c om...
> But how could I make this visible. For example, I've put the bitmap in
> c:/access/test1.bmp, test2.bmp, test3.bmp...How can I import them in
> to the
> report and make it visible? it's not like
> =IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")
> And "*" is the one which lits up when the
> target is reached. But which line tot you have to use if those stars
> are
> bitmaps?
>
> =IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"c:/access/test1.bmp")'-->
> isn't the option.
>
> But how do I make these bitmaps visible when a target is reached?
>
>
>
>
> "Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
> news:<41*********************@mercury.nildram.net> ...
>> Have all the bitmaps superimposed on top of each other as images, and
>> just
>> play around with the visible properties of each image
>>
>> HTH
>>
>> Phil
>> "Erwin" <07*****@student.hro.nl> wrote in message
>> news:98**************************@posting.google.c om...
>> > At the moment I'm using a report which contains an indicator to show
>> > if a Service group of the company isn't working well or is working
>> > perfectly. This indicator is a "*" which looks like a traffic light.
>> >
>> > Example:
>> > When a Service groep does hit the target, the indicator will lit up
>> > using the following Control Source:
>> > =IIf([tot-betrouwbaarheid]>0,8*10*[weegfactor-betrouwbaarheid];"*")
>> >
>> > But now, I would like the use a real bitmap, trafficlight bitmaps,
>> > to
>> > show in stead of the indicators. So when I'm using these bitmaps in
>> > the reports, on green (target made) the green light bitmap must
>> > appear. How do I do this. The "*" indicator just doesn't use the
>> > same
>> > code. I've already made a table with the traffic lights: good
>> > (Bitmap
>> > object)
>> > not good (Bitmap object)
>> >
>> > So how could I use this in a report: something like in de control
>> > source: if good then bitmap green?

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.