Results 1 to 4 of 4

Thread: Can't view the report with Crystal reports

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member Chathura's Avatar
    Join Date
    Nov 2005
    Location
    Sri Lanka
    Posts
    345

    Can't view the report with Crystal reports

    I am using crystal reports 8.5 and I've done several projects using this versions crystal report controller. One of my projects had this problem. When I set the rptcon.action=1
    the report is opening but it is closing automatically and immediately. When I select a printer It gives print outs. Can anybody describe what has happened.

    Thank you.

  2. #2
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Arrow Re: Can't view the report with Crystal reports

    Public Sub ShowReport()

    With CRT
    selectMe = "year({salary.SDate})=" & DTP.Year & "and month({salary.SDate})=" & DTP.Month
    .ReportFileName = App.Path & "\Reports\MonthR.rpt"
    .SelectionFormula = selectMe
    .Action = 1
    End With

    End Sub

    CAN U SEND UR CODE???

  3. #3

    Thread Starter
    Hyperactive Member Chathura's Avatar
    Join Date
    Nov 2005
    Location
    Sri Lanka
    Posts
    345

    Can't view the report with Crystal reports

    Your code is ok. But my problem is still the same. This is my problem
    Report is generated.
    But no time to view.
    Report is closed.

    I'll send my code and the report herewith.
    Private Sub PrintInvoice()

    On Error GoTo ErrorHandler
    With rptPItemSales
    .ReportFileName = App.Path + "\..\Reports\rptSalesByItems.rpt"
    '.DiscardSavedData = True
    .SelectionFormula = "{tblInvoiceHeader.strInvNo} = '" & txtInvNo.Text & "'"
    '.PrinterName = "EPSON LQ-300+ ESC/P 2"
    '.Destination = crptToWindow
    .Action = 1

    End With
    ExitRoutine:
    Exit Sub
    ErrorHandler:
    MsgBox "There is an error while printing " + Err.Description
    Resume ExitRoutine
    End Sub

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

    Re: Can't view the report with Crystal reports

    Moved to reporting section.

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