Never Hide
Registered User.
- Local time
- Today, 07:09
- Joined
- Dec 22, 2011
- Messages
- 96
I have a form which, among other controls, has a multi-line text box, TB_Conditions.
I generate a report based on the data of that form and in that report I have a sub-report, rptConditions, that displays the data of TB_Conditions which is placed in the Page Footer of the main report.
In the same footer I also have a page counter, a Line that goes across the page and a Footer Logo I use.
Using the page footer's Format event, I only display rptConditions on the last page of the report.
rptConditions has a tex tbox with the following ControlSource
What that does is place a "*" in front of every new line.
The attached images show the page footer of the report
FooterReport1-1st page of report
FooterReport2-last page of report
FooterDesign is the page footer in Design View
For the test in the screenshots I used the following in TB_Conditions
In FooterReport2 you can see that the page counter, footer logo and the line have disappeared and also not everything from the data is showing
If I manualy increase the size of the footer, like I did in FooterDesign2, I can get all the data from TB_Conditions, which is of course not an option since the amount of data in TB_Conditions can change. But even with that option I can't get the page counter,line and logo to show in the last page.
P.S. Everything in the report has all the auto sizing options set to yes.
This is my code to display rptConditions only in the last page
I generate a report based on the data of that form and in that report I have a sub-report, rptConditions, that displays the data of TB_Conditions which is placed in the Page Footer of the main report.
In the same footer I also have a page counter, a Line that goes across the page and a Footer Logo I use.
Using the page footer's Format event, I only display rptConditions on the last page of the report.
rptConditions has a tex tbox with the following ControlSource
Code:
=Replace("* " & [_Conditions];Chr(13)+Chr(10);Chr(13)+Chr(10) & "* ")
What that does is place a "*" in front of every new line.
Code:
[U]So This[/U]:
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
[U]Changes to this[/U]:
* Line 1
* Line 2
* Line 3
* Line 4
* Line 5
* Line 6
* Line 7
* Line 8
* Line 9
The attached images show the page footer of the report
FooterReport1-1st page of report
FooterReport2-last page of report
FooterDesign is the page footer in Design View
For the test in the screenshots I used the following in TB_Conditions
Code:
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 0
---------
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 0
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 0
In FooterReport2 you can see that the page counter, footer logo and the line have disappeared and also not everything from the data is showing
If I manualy increase the size of the footer, like I did in FooterDesign2, I can get all the data from TB_Conditions, which is of course not an option since the amount of data in TB_Conditions can change. But even with that option I can't get the page counter,line and logo to show in the last page.
P.S. Everything in the report has all the auto sizing options set to yes.
This is my code to display rptConditions only in the last page
Code:
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.Page = Me.Pages Then
Me.rptConditions.Visible = True
Else
Me.rptConditions.Visible = False
End If
End Sub