Hi, I am having a problem forcing a new page. I need to break whenever a certain field changes. I have tried the break before / break after. But nothing happens. Hopefully someone can help, I am desperate to deliver this!!!! kinda in a bind.. THanks
VB Code:
With rptDemoGraphics_Area.Sections("Details").Controls While Not (RS.EOF) If SaveRadius <> RS(FIELD_RADIUS) Then rptDemoGraphics_Loc.Sections("Title").ForcePageBreak = rptPageBreakBefore SaveRadius = RS(FIELD_RADIUS) End If If RS(FIELD_RADIUS) = 0 Then strRptType = "TRADE AREA" Else strRptType = "RING RADIUS - " & RS(FIELD_RADIUS) & " Mile" End If '--- create heading and new page for each report type change With rptDemoGraphics_Area.Sections("Title").Controls For i = 1 To .Count If .Item(i).Name Like "lblArea" Then .Item(i).Caption = strRptAreaType & ":" ElseIf .Item(i).Name Like "lblAreaArea" Then .Item(i).Caption = strRptArea ElseIf .Item(i).Name Like "lblReportType" Then .Item(i).Caption = strRptType ElseIf .Item(i).Name Like "lblReportYr" Then .Item(i).Caption = strRptYear End If Next End With For i = 1 To .Count If .Item(i).Name Like "txtSTNO" Then .Item(i).DataField = RS(FIELD_STNO).Name ElseIf .Item(i).Name Like "txtAddress" Then .Item(i).DataField = RS(FIELD_INTERSECTION).Name ElseIf .Item(i).Name Like "txtCity" Then .Item(i).DataField = RS(FIELD_CITY).Name ElseIf .Item(i).Name Like "txtSt" Then .Item(i).DataField = RS(FIELD_STATE).Name End If Next RS.MoveNext Wend End With




Reply With Quote