getting one image per group in a report

H

Howard

I have a report that shows a student's name and ID in the name header
(grouped) and then shows about 8 or 9 narrow detail rows, each listing
one of their subjects and the corresponding grade.

Using the ID and a folder of pictures I've put an image box in the
header to show the student's picture next to their name. However this
makes the header rather large with lots of white space and makes the
whole student record rather empty.

Is there a way to move the image into the detail section, alongside the
list of subjects, without getting a duplicate image for every subject
they do?



Howard
 
D

Duane Hookom

One method is to create a second Name header and place the image in it. Make
sure the height of this header is not greater than the combined heights of
the fewest number of student details (you stated 8 or 9). Place the image in
this second name header and position it so it won't print on top of the
details. Add code to the On Format event of this group header:

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
Me.MoveLayout = False
End Sub

The other solution would be to use a subreport to display the details. Make
sure you remove the details from the main report's record source.
 
H

Howard

Duane said:
One method is to create a second Name header and place the image in it. Make
sure the height of this header is not greater than the combined heights of
the fewest number of student details (you stated 8 or 9). Place the image in
this second name header and position it so it won't print on top of the
details. Add code to the On Format event of this group header:

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
Me.MoveLayout = False
End Sub

The other solution would be to use a subreport to display the details. Make
sure you remove the details from the main report's record source.




Thanks Duane, That did it. I didn't know that property existed! very handy

Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top