Accurate position for a textbox

  • Thread starter Thread starter Roger Frans
  • Start date Start date
R

Roger Frans

Hello,

I want to make a report. For each record I start another page. No problem.
I have a subreport in de Details section. The property CanGrow is Yes.

I want a text box at the bottom of the page (but in the Details section, not
in Page Footer).
I made a procedure to place the text box on a particular place.

Private Sub Details_Format(Cancel As Integer, FormatCount As Integer)
txtTest.Top = 6000
End Sub

But... the location of the text box is not the same on each page. The
location depends on the size of the subreport (which is not the same for
each record).

How can I solve this?

Thanks a lot.

Roger
 
Hello,

I can't use the Page Footer because I want the bottom side of text box on
the same height as the bottom of a subreport in the Details Section.

Roger
 
Roger,

Ah, sorry, I misunderstood your original question.

I don't think there is an easy answer here. The first thing I would
look at is trying to incorporate the textbox into the design of the
subreport itself. Does the subreport have a report footer section active?

Otherwise, what is it that causes the variation in the height of the
subreport? The number of subreport records? If so, depending on the
subreport design, you could possibly use code to determine the height of
the subreport on the main report, based on a calculation on the number
of subreport records, and then use this to programmatically adjust the
position of the textbox.
 
Steve,

Your second hint gives me a solution for my problem. I can calculate the
number of records in the subreports and I can adjust the position of the
textbox, e.q.

txtTest.Top = intPosition - 291 * intNumber

I still wonder that there is no easier way to do that... It seems so simple
to place a control on a specific place.

Thanks a lot for the tip...

Roger
 
Back
Top