Attribute VB_Name = "ModRpt"
Option Explicit
Private cSQL As String

Public Sub PrintReport(pcReportTitle As String, _
    poReport As Object, poRS As ADODB.Recordset, Optional pcTag As String = "", _
    Optional pbEnablePrintButton As Boolean = True, _
    Optional pbShowCustomPrintButtion As Boolean = False, _
    Optional pbShowForm As Boolean = True)
  Screen.MousePointer = vbHourglass
  Dim oNewForm As frmViewReport
  Set oNewForm = New frmViewReport
  On Error Resume Next
  With oNewForm
    .Caption = pcReportTitle
    .Hide
    ShowReport oNewForm.crv, poReport, poRS
    .Tag = pcReportTitle
    .crv.Tag = pcTag
    If pbShowForm Then .Show
  End With

  Screen.MousePointer = vbDefault
End Sub

Public Sub Print2Paper(pcReportTitle As String, pcSQL As String)
'  Dim rsSQL As ADODB.Recordset
'  Select Case pcReportTitle
'  Case "Preview Faktur Cetak Foto"
'    Screen.MousePointer = vbHourglass
'    Dim rptFaktur As crFakturCetakContent
'    Set rptFaktur = New crFakturCetakContent
'    With crFakturCetakContent
'      If goConn.OpenRSFO(rsSQL, pcSQL) Then
'        Call PrintReport(pcReportTitle, crFakturCetakContent, rsSQL, , , , False)
'        crFakturCetakContent.PrintOut
'      Else
'        MsgBox "Tidak ada data untuk dicetak!", vbInformation, "Tidak ada data"
'      End If
'    End With
'    Set rptFaktur = Nothing
'  End Select
End Sub
