Move a Rectangle down the page....

G

Guest

I have a catalog report. I've created color tabs for each product in the
catalog. The color is a Rectange using the backcolor, etc. How can I
position the rectangle down the side of the report for each change in the
product type? See code:


Private Sub Report_Open(Cancel As Integer)
Palette(1) = 2675180
Etc.
End Sub

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

If Me.Table_of_Contents = getname Then

Else

Me.Box76.BackColor = Palette(CurrentColor)
CurrentColor = (CurrentColor + 1)

End If

getname = Me.Table_of_Contents

End Sub
 
M

Marshall Barton

Ben said:
I have a catalog report. I've created color tabs for each product in the
catalog. The color is a Rectange using the backcolor, etc. How can I
position the rectangle down the side of the report for each change in the
product type? See code:


Private Sub Report_Open(Cancel As Integer)
Palette(1) = 2675180
Etc.
End Sub

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

If Me.Table_of_Contents = getname Then

Else

Me.Box76.BackColor = Palette(CurrentColor)
CurrentColor = (CurrentColor + 1)

End If

getname = Me.Table_of_Contents

End Sub


Your getname approach is not reliable because the sections
are not necessarily processed in the order that they appear
in the report. Without knowing more about your report's
deatils and if each product starts on a new page, I suggest
that you use the group header section to do this. Make the
group header as tall as the page so it has room to display
the boxes to near the bottom of the page:

The group footer's Format event would be like:

Me.Box76.Top = Me.Box76.Top + Me.Box76.Height
Me.Box76.BackColor = Palette(CurrentColor)
CurrentColor = (CurrentColor + 1)
Me.MoveLayout = False
 
G

Guest

I have a new page start for every "Pageheader" which is based on my Catalog
Headers, If I move the "Pageheader" to fit the entiere page, How do I get my
other headers and detail to show? Do I have to create a Subreport and embed
it?
Or, can I programaticly move them up?
 
M

Marshall Barton

Don't confuse me by saying Pageheader when it is not the
report's Page Header section. I was talking about using a
Group Header section.

The use of Me.MoveLayout = False means that the section
will not take up any space. I.e. the following sections
will print on top of the group header.
 

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