Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2003

    Unanswered: One of my reports is not printing

    I have several reports that I open in print preview view. All of them are printing fine except for one. Any suggestions?

    I see the message flash on my screen stating that it is being sent to the printer. I have my printer window open and I see the item in there for a second and then it disappears but no print out!

  2. #2
    Join Date
    Nov 2002
    how about posting the code u r using to print the report. Im sure some on this form can help.

  3. #3
    Join Date
    Sep 2003
    there's not much to it...
    pretty basic stuff.

    I'll post it tomorow.

  4. #4
    Join Date
    Nov 2002
    Does your look somethings like this.

    DoCmd.OpenReport "rptworddoct", acViewPreview, , "[DIMAID] = " & Me.DIMAID

  5. #5
    Join Date
    Oct 2003
    Provided Answers: 1


    If your are using

    DoCmd.OpenReport "", acViewNormal

    to send the report directly to the printer, and you don't have any print out, then use

    DoCmd.OpenReport "", acViewPreview

    and see whether you got your form opend on the screen or not.

  6. #6
    Join Date
    Oct 2003

    Thumbs up

    Hi all

    Check if your're using on error statment. in case of bugs in your code you will have a flash screen and will not print i had the same.


    Firas arramli
    SEI Systems Analyst

  7. #7
    Join Date
    Sep 2003
    Here is my code to launch the preview of the report:

    Call Generate_AssignedTo_Table(Who)

    'On Error Resume Next
    DoCmd.OpenReport "Report of PCADs Assigned To", acViewPreview
    DoCmd.Close acForm, "Get Report of PCADs Assigned to", acSaveNo
    DoCmd.SelectObject acReport, "Report of PCADs Assigned To"

    Here are the events I have for the report itself:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim TodaysDate As Date
    Dim DatePlusWeek As Date

    'todays date is actually todays date -1 so we catch today also
    TodaysDate = DateAdd("d", -1, Now())
    TodaysDate = Format(TodaysDate, "Short Date")
    'DatePlus week is actually a week and a day so we get the full week
    DatePlusWeek = DateAdd("d", 8, Now())
    DatePlusWeek = Format(DatePlusWeek, "Short Date")

    If Me.Current_Status Like "*Closed*" Then
    Me.txtOverdueStatus = "Closed"
    ElseIf Me.Due_Date < TodaysDate Then
    Me.txtOverdueStatus = "Overdue"
    ElseIf Me.Due_Date < DatePlusWeek Then
    Me.txtOverdueStatus = "Coming Due"
    Me.txtOverdueStatus = "Due"
    End If
    End Sub

    Private Sub Report_NoData(Cancel As Integer)
    MsgBox "This report has no data"
    Cancel = True
    End Sub

    Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
    Dim strRealName As String
    Dim intComma As Integer
    Dim intLeft As Integer
    Dim intRight As Integer
    Dim intLen As Integer
    Dim strFirstName As String
    Dim strLastName As String

    strRealName = Forms![Get Report of PCADs Assigned to].lstAssignedTo
    intComma = InStr(strRealName, ",")
    intLen = Len(strRealName)
    intLeft = (intComma - 1)
    intRight = (intLen - intComma)

    strLastName = Left(strRealName, intLeft)
    strFirstName = Right(strRealName, intRight)
    Trim (strLastName)
    Trim (strFirstName)
    Me.txtTitle = "Report of All PCADs assigned to " & strFirstName & " " & strLastName
    End Sub

    I am stumped...
    I have my printer status open when I click the print button and sometimes it spools and then disappears from the window and sometimes it doesn't even spool. It is not the printer's problem b/c I have other reports withing the application that work in the same manner and they print fine.

  8. #8
    Join Date
    Sep 2003
    I was closing some "input" forms once the print preview loaded. When the report printed, some needed info was suddenly gone.

Posting Permissions

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