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

Question: anyone know a way to get a 'CanGrow' feature to work for images in a report?

P: n/a
Hi all,
I am generating a report that adds one of two images (or no image at
all) depending on query results. I dont want a great big blank space
where the image goes, if NO IMAGE is returned..... Any way I can do
this? I know I cannot use 'can grow' as I do with text boxes.
any help appreciated.
andy
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Andy,
You can define the height of your ImageControl on runtime.
Put code like this is the Reports detail OnFormat event (assuming your ImageControl is in this
section)
So if there is an image present (then you will have a path or so) then
Me!ImageControl.Height=xxx 'specify in twips!
else
Me!ImageControl.Height=0
end if

--
Hope this helps
Arno R
"Andy Warner" <aw*****@worcestershire.gov.uk> schreef in bericht
news:7b**************************@posting.google.c om...
Hi all,
I am generating a report that adds one of two images (or no image at
all) depending on query results. I dont want a great big blank space
where the image goes, if NO IMAGE is returned..... Any way I can do
this? I know I cannot use 'can grow' as I do with text boxes.
any help appreciated.
andy

Nov 12 '05 #2

P: n/a


Thanks for the feedback.

Thats the way I was going, but VBA is new to me, and I don;t really know
how to do checking to see if the image is there bit. The control.height=
bit is ok.

If i try to do the following:

if map_flag = "true" then
Me.MapFrame.height = 3000
else
Me.MapFrame.height = 0
end if

I get an error 'cannot find map_flag'

I think I need to declare it somewhere, but how, and where?
I have text fields in the report that happily check map_flag and it
works, so I am a bit stuck. Any good online resources about this kind of
thing?

thanks for your help, its appreciated

andy


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

P: n/a
Andy,
You told us you were depending on query results to define if images are returned...
Then you must have a field in your query that defines this, right?
Is this a boolean (Yes/No) field or do you look for a stringvalue (the path to your image)?
(Remember: Don't store the images IN your database. Huge bloat will be the penalty for this.)
Anyhow, you will need this field in your report (maybe invisible) and then use the code.
IMHO the error you got means thet you don't have this field in your reportdesign.

I guess your field is called map_flag ?
You will need to 'tell' every page of your Report that map_flag = true or false.
If map-flag is boolean then also your code is wrong
It should read
if map_flag = true then
....

--
Hope this helps
Arno R
"Andy Warner" <aw*****@worcestershire.gov.uk> schreef in bericht
news:3f***********************@news.frii.net...


Thanks for the feedback.

Thats the way I was going, but VBA is new to me, and I don;t really know
how to do checking to see if the image is there bit. The control.height=
bit is ok.

If i try to do the following:

if map_flag = "true" then
Me.MapFrame.height = 3000
else
Me.MapFrame.height = 0
end if

I get an error 'cannot find map_flag'

I think I need to declare it somewhere, but how, and where?
I have text fields in the report that happily check map_flag and it
works, so I am a bit stuck. Any good online resources about this kind of
thing?

thanks for your help, its appreciated

andy


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.