Results 1 to 19 of 19

Thread: [RESOLVED] Report Designer ForcePageBreak

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    193

    Resolved [RESOLVED] Report Designer ForcePageBreak

    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:
    1. With rptDemoGraphics_Area.Sections("Details").Controls
    2.  
    3. While Not (RS.EOF)
    4.    If SaveRadius <> RS(FIELD_RADIUS) Then
    5.        rptDemoGraphics_Loc.Sections("Title").ForcePageBreak = rptPageBreakBefore
    6.        SaveRadius = RS(FIELD_RADIUS)
    7.    End If
    8.      
    9.       If RS(FIELD_RADIUS) = 0 Then
    10.          strRptType = "TRADE AREA"
    11.       Else
    12.          strRptType = "RING RADIUS - " & RS(FIELD_RADIUS) & " Mile"
    13.       End If
    14.      '---  create heading and new page for each report type change
    15.      With rptDemoGraphics_Area.Sections("Title").Controls
    16.         For i = 1 To .Count
    17.             If .Item(i).Name Like "lblArea" Then
    18.                .Item(i).Caption = strRptAreaType & ":"
    19.             ElseIf .Item(i).Name Like "lblAreaArea" Then
    20.                .Item(i).Caption = strRptArea
    21.             ElseIf .Item(i).Name Like "lblReportType" Then
    22.                .Item(i).Caption = strRptType
    23.             ElseIf .Item(i).Name Like "lblReportYr" Then
    24.                .Item(i).Caption = strRptYear
    25.             End If
    26.         Next
    27.     End With
    28.  
    29.     For i = 1 To .Count
    30.         If .Item(i).Name Like "txtSTNO" Then
    31.            .Item(i).DataField = RS(FIELD_STNO).Name
    32.         ElseIf .Item(i).Name Like "txtAddress" Then
    33.            .Item(i).DataField = RS(FIELD_INTERSECTION).Name
    34.         ElseIf .Item(i).Name Like "txtCity" Then
    35.            .Item(i).DataField = RS(FIELD_CITY).Name
    36.         ElseIf .Item(i).Name Like "txtSt" Then
    37.            .Item(i).DataField = RS(FIELD_STATE).Name
    38.         End If
    39.     Next
    40.   RS.MoveNext
    41. Wend
    42.  
    43. End With
    Last edited by si_the_geek; Aug 13th, 2006 at 09:36 AM. Reason: added vbcode tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width