Results 1 to 4 of 4

Thread: Printing Issues - Why is this double spacing?

  1. #1

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Printing Issues - Why is this double spacing?

    The following code works but it prints the records double-spaced. I can't figure out why.

    VB Code:
    1. rsCancel.Open strSQL, Oracon, adOpenForwardOnly, adLockReadOnly
    2.  
    3.  With rsCancel
    4.     If .BOF <> True And .EOF <> True Then
    5.  
    6.        
    7.        'Print the headings for the report
    8.         PrintHeadings
    9.        .MoveFirst
    10.        intCount = 0
    11.        intLineCount = 0
    12.        
    13.        Do Until .EOF
    14.                    
    15.              'Print Doctor Name
    16.               Printer.Print .Fields!Location;
    17.          
    18.              'Set the CurrentX property to print in the date column, then write the date
    19.               Printer.CurrentX = 2180
    20.                  
    21.               If IsNull(.Fields!DOC_NAME) Then
    22.                  Printer.Print .Fields!NONDOC_CLINIC_NAME;
    23.               Else
    24.                  Printer.Print .Fields!DOC_NAME
    25.               End If
    26.                          
    27.              'Set the CurrentX property to print in the location column, then write the location
    28.               Printer.CurrentX = 5452
    29.               Printer.Print .Fields!Clinic_Date;
    30.          
    31.              'Set the CurrentX property to print in the reasons column, then write the cancellation reason
    32.               Printer.CurrentX = 7954
    33.               Printer.Print .Fields!Cancel_Reason
    34.            
    35.               intLineCount = intLineCount + 1
    36.                  
    37.              'Once 50 lines have been printed, start a new page
    38.               If intLineCount = 50 Then
    39.                  PrintFooter
    40.                  Printer.NewPage
    41.                  PrintHeadings
    42.                  intLineCount = 0
    43.               End If
    44.        
    45.              
    46.                .MoveNext
    47.      
    48.    Loop
    49.   End If
    50.     PrintFooter
    51.     Printer.EndDoc
    52. End With

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Printing Issues - Why is this double spacing?

    I would guess that the Cancel field is too long for the width of the page, causing it to wrap.

  3. #3

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Printing Issues - Why is this double spacing?

    The problem was that I forgot the ";" after printing the doc_name field so after taking a closer look I could see it was printing each docname on a new line.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Printing Issues - Why is this double spacing?

    Quote Originally Posted by The_Grudge
    The problem was that I forgot the ";" after printing the doc_name field so after taking a closer look I could see it was printing each docname on a new line.
    So, is this resolved?

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