機械室料金システム——日請求書

1310 ワード

レポートの学習については、前のブログを見てください.
ここをクリック:請求書---Grid++Reportレポートデザイナ
 
日請求書:
Private Sub Form_Load()
      Dim txtsql As String
      Dim noda As String
      noda = Now
      
      
      txtsql = "select * from checkday_info where date='" & Format(Date, "yyyy-mm-dd") & "'"
      Set report = New grproLibCtl.GridppReport ' 
      
      ' 
      report.LoadFromFile (App.Path & "\ .grf")
      ' 
      report.DetailGrid.Recordset.ConnectionString = ConnectString()
      ' select , 
      report.DetailGrid.Recordset.QuerySQL = txtsql
      
      ' 
      report.ParameterByName("Parameter12").AsString = noda

      ' 
      report.ParameterByName("Parameter9").AsString = Username
      
      GRDisplayViewer1.report = report     ' GRD report
      GRDisplayViewer1.Start   ' 
      
End Sub

日付請求書の更新:
 
Private Sub cmdRefur_Click()
      ' 
      GRDisplayViewer1.Refresh
      
End Sub

請求書の印刷:
Private Sub cmdReport_Click()

' , print vb 
       report.[Print] (True)
End Sub

請求書参照
Private Sub cmdLook_Click()
      report.PrintPreview (True)      ' 

End Sub