Image span on Entire Left side of Page

A

AshishSA

We are using Access 2003 reports.
We would like to be able to print dynamically changing image on the
entire left hand side of the page.

I'm not sure of any way that I can make one control span the different
sections that I have i.e we want image not specific to any secion but
with respect to entire left side of page.

Currently we are creating an image on each page based on the data on
that page.Then we provide the image to report's PictureData property so
that Image can be displayed as background image on left hand side of
the page.

However, it appears to be a refresh issue becuase even though we change
the image using PictureData property, New image only gets displayed in
next page.It seems like by the time we can read the page content,
report has already set the picturedata and if we try changing the
picturedata property then it does not refresh the Report picture until
next page.

Anyone know how to refresh the reports picturedata property to change
the image for the same page or have another way of getting an image to
display/hide from record to record based on the content of the page?

I have spent good few days trying this but could not find the solution
for this problem any help is much appriciated.
Ash
 
D

Duane Hookom

Try creating a new primary sorting and grouping level on a constant like =1.
Display the Group Header section for this grouping and make it about the
height of your page minus the Page Header and Footer. Add you image control
on the left. Set the Repeat Section property to Yes and add this code to the
On Format event:

Me.MoveLayout = False

This should overlay following section on top of the =1 group header section.
 
A

AshishSA

Hi Duane
Thanks for your help.
One question though When I try setting the Repeat Section to Yes, the
report simply hangs.
If I change Repeat Section to No then first page appers as expected but
no image comes in next & subsequent pages.

I read in another forum that other user has also faced the same problem
of report hanging.
Do you have any suggestions that why report hangs when Repeat Section
set to Yes
Ash
 
D

Duane Hookom

Try the same thing only use the Page Header section rather than the =1 group
header. Completely remove the =1 level. Use this code:

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

AshishSA

Hi Duane,
In one of your previous post I saw that you refered to
download link for sample database at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4.
By any chance do you still have that sample somewhere?

Your suggestion of keeping Image control on PageHeader
works well but I am not able to change PageHeader image control to
different image from Footersection or Page event so it seems like that
we can only reset image for PageHeader image control from
PageHeaderSection format event.

Looking forward to your reply.
Regards,
Ash
 
D

Duane Hookom

That link was to a company I had worked for 5 years ago. They removed my
samples several months ago. I don't think I have that particular example.

I'm not sure what you aren't able to do. Apparently you can reset the image
in the On Format of the Page Header section so where else would you want to
do this? You can use the Me.MoveLayout=False for Group Headers also.
 
A

AshishSA

I can reset the image in the On Format of the Page Header
section but our requirements is to set the image based on data found in
detail & page footer section of the report so I would like to be able
to reset the image on Report_Page event when I have gathered enough
information about the content of the page.

Do you think that I should be able to change Image control's
image or even reports background image from Reports_Page event when I
have gathered information about the page?
Regards,
Ash
 
D

Duane Hookom

I am not sure. You need to take the time to try more options.
It seems to me the data found in your detail section could be used but I
don't have a clear idea of your requirements.
 
A

AshishSA

I understand But my question is that
If we have kept image control on Page header section then
Does access report allow to change image control's image from the
Reports Page event.

Conceptually what I have found so far that you can only change
image control's image from Page header section's format event?

Let me know if you think it otherwise because we have already
spent good few days and think that image control's image can only be
changed from Page header section's format not from reports page event.
Regards,
Ashish
 
D

Duane Hookom

What I am saying is that I don't know so you will need to do what I would
have to do... try it. I'm not about to attempt to try understand and model
something that you understand and can play with. You seem fairly sharp and
should be able to play with this more readily than I could. I certainly have
no experience with your exact requirements since they are so unique.
 
M

Marshall Barton

I understand But my question is that
If we have kept image control on Page header section then
Does access report allow to change image control's image from the
Reports Page event.

Conceptually what I have found so far that you can only change
image control's image from Page header section's format event?

Let me know if you think it otherwise because we have already
spent good few days and think that image control's image can only be
changed from Page header section's format not from reports page event.


No can do in Page event because all the sections on the page
have already been processed, i.e. Page event is last thing
done on each page. You really must do that in the page
header's Format event.

The trick is to force the report to process the data twice
by using a control that refers to the Pages property. Since
the number of pages must be calculated by formatting the
report, the report must be formatted a second time to
display the number of pages on the first and subsequent
pages.

You can take advantage of that by using code in the page
footer section's Format event to save the page number and
the data value in an array (or collection) the first time
through (Pages=0) and retrieve the data in the page header
the second time through (Pages>0).
 

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