Data Report - Single Record Issue
i have an app that i print a single database record to a data report. the database field im using is a access Memo field so it ca be very large and if the user has typed a large amount of text then the problem i get is the data report only prints the first two pages of the report when it could be 3 or more. I have added RptTExtBox control to the Detail Section1 on the datareport with different heights and still can only get two pages. any ideas? this is the code im using
Code:
Set conn = New ADODB.Connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MainForm.strDataPath & "\SecDB.mdb;Jet OLEDB:Database Password= '" & strPassword & "';"
conn.Open
strLoadType = "" ' reset
Set rs = New ADODB.Recordset ' create a recordset
rs.CursorLocation = adUseServer ' connect to the server only
rs.Open "Select * From DailyReports WHERE ID = " & lgRecnum & "", conn, adOpenForwardOnly, adLockReadOnly
DailyReport.Caption = "Domestic Report"
Set DailyReport.DataSource = rs
With DailyReport.Sections("Section1")
.Controls("txtBody").DataField = "DailyReportMemo" 'where quantity is a field in the recordset
DailyReport.Sections("Section4").Controls("RecNum").Caption = rs.Fields("ID").Value & "" 'where quantity is a field in the recordset
DailyReport.Sections("Section4").Controls("StartTime").Caption = rs.Fields("ShiftStart").Value & ""
DailyReport.Sections("Section4").Controls("EndTime").Caption = rs.Fields("ShiftEnd").Value & ""
DailyReport.Sections("Section4").Controls("StartDate").Caption = rs.Fields("ShiftStartDate").Value & ""
DailyReport.Sections("Section4").Controls("EndDate").Caption = rs.Fields("ShiftEndDate").Value & ""
DailyReport.Sections("Section4").Controls("Name").Caption = rs.Fields("OfficersName").Value & ""
DailyReport.Sections("Section4").Controls("Location").Caption = rs.Fields("PostLocation").Value & ""
End With
DailyReport.TopMargin = 500
'DailyReport.Show vbModal
DailyReport.PrintReport
rs.Close
Unload DailyReport
Set rs = Nothing
Set conn = Nothing
Exit Sub