Inserting subreport every x rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to insert a sub report or a text box every x rows?

I want to add a fixed text to a report every 20 (p.e.) rows and I want that
text printed on a new page. After that text the rows of the first report
have to continue and so on ...

But I don't know if this is really possible.

Can somebody help me??
 
have you played with putting that text into a footer?....and then setting the
parameters of the report to page every 20 rows?

this might work....
 
I'm all ready using the pagefooter. Now I tried to put the text at the end
of the footer. But I want the text to appear on a new page and I can't force
the report to pagebreak in the footer. On part of the footer has to appear
on the first page, the last part has to be on the second, ...
 
Carl,

If you are talking about printing a certain phrase at the top of every page
except page one,
Put a label in the Header of your report, add a text box with the page number
in it (=[Page]) and hide it, Then in VB use the following code

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If PageNo.Value = 1 Then
Label#.Visible = False
Else
Label#.Visible = True
End If
End Sub

if this is not what you were looking for I do apologize.

K Board
 
Carl said:
Is it possible to insert a sub report or a text box every x rows?

I want to add a fixed text to a report every 20 (p.e.) rows and I want that
text printed on a new page. After that text the rows of the first report
have to continue and so on ...

To start a new page every 20 records, add a text box name
txtLineNum to the detail section. Set its ControlSource to
=1 and RunningSum to Over All or Over Group as appropriate.

Add a PageBreak control named pgEject at the bottom of the
detail section.

Then use code like this in the detail section's Format event
procedure:

Me.pgEject.Visible = (Me.txtLineNum Mod 20) = 0

If you really need a text box to display at the top of the
page after the break, then place it immediately after the
page break control.

OTOH, maybe you can use the page header section instead of
the text box. In some cases it's better to use a group
header with its RepeatSection property set to Yes.
 
Back
Top