home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / COMMON / TOOLS / VCM / VCM.MDB / VcmComponentContainer / 04_Cabinet / frmshow.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-05-18  |  4.0 KB  |  125 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#2.0#0"; "mscomctl.ocx"
  3. Object = "{6FBA474E-43AC-11CE-9A0E-00AA0062BB4C}#1.0#0"; "SysInfo.Ocx"
  4. Begin VB.Form frmShowReport 
  5.    Caption         =   "Data Report"
  6.    ClientHeight    =   840
  7.    ClientLeft      =   1335
  8.    ClientTop       =   870
  9.    ClientWidth     =   4515
  10.    ControlBox      =   0   'False
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   840
  13.    ScaleWidth      =   4515
  14.    Begin SysInfoLib.SysInfo sysInfo 
  15.       Left            =   3960
  16.       Top             =   720
  17.       _ExtentX        =   1005
  18.       _ExtentY        =   1005
  19.       _Version        =   393216
  20.    End
  21.    Begin ComctlLib.Toolbar tlbReport 
  22.       Align           =   1  'Align Top
  23.       Height          =   630
  24.       Left            =   0
  25.       TabIndex        =   0
  26.       Top             =   0
  27.       Width           =   4515
  28.       _ExtentX        =   7964
  29.       _ExtentY        =   1111
  30.       ButtonWidth     =   1905
  31.       ButtonHeight    =   953
  32.       Appearance      =   1
  33.       _Version        =   393216
  34.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  35.          NumButtons      =   4
  36.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  37.             Caption         =   "Show Report"
  38.             Description     =   "Show the report"
  39.             Object.ToolTipText     =   "Show Report"
  40.          EndProperty
  41.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  42.             Caption         =   "Export Report"
  43.             Description     =   "Exports the report"
  44.             Object.ToolTipText     =   "Export Report"
  45.          EndProperty
  46.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  47.             Caption         =   "Templates"
  48.             Description     =   "Print Templates"
  49.             Object.ToolTipText     =   "Print Templates"
  50.          EndProperty
  51.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  52.             Caption         =   "Exit"
  53.             Description     =   "Exits Program"
  54.             Object.ToolTipText     =   "Exit"
  55.          EndProperty
  56.       EndProperty
  57.    End
  58.    Begin VB.Menu mnuFile 
  59.       Caption         =   "&File"
  60.       Begin VB.Menu mnuShow 
  61.          Caption         =   "&Show Report"
  62.       End
  63.       Begin VB.Menu mnuExport 
  64.          Caption         =   "Export Report"
  65.       End
  66.       Begin VB.Menu mnuPrintReport 
  67.          Caption         =   "&Print Report"
  68.       End
  69.       Begin VB.Menu mnuExit 
  70.          Caption         =   "E&xit"
  71.       End
  72.    End
  73. Attribute VB_Name = "frmShowReport"
  74. Attribute VB_GlobalNameSpace = False
  75. Attribute VB_Creatable = False
  76. Attribute VB_PredeclaredId = True
  77. Attribute VB_Exposed = False
  78. Option Explicit
  79. Private Sub mnuExit_Click()
  80.     While rptNwind.AsyncCount > 0
  81.         DoEvents
  82.     Wend
  83.     Unload rptNwind
  84.     Unload frmShowReport
  85. End Sub
  86. Private Sub mnuExport_Click()
  87.     ' Export a report. The code displays the
  88.     ' Export Report dialog box. The ExportFormat
  89.     ' is created in the Data Report's Initialize
  90.     ' event.
  91.      rptNwind.ExportReport _
  92.      FormatIndexOrKey:="DailyReport", _
  93.      FileName:="C:\Temp\DailyRpt", _
  94.      overwrite:=True, _
  95.      showdialog:=True, _
  96.      range:=rptRangeFromTo, _
  97.      pagefrom:=1, _
  98.      pageto:=3
  99. End Sub
  100. Private Sub mnuPrintReport_Click()
  101.     rptNwind.PrintReport
  102. End Sub
  103. Private Sub mnuShow_Click()
  104.     rptNwind.Show
  105. End Sub
  106. Private Sub tlbReport_ButtonClick(ByVal Button As ComctlLib.Button)
  107.     Select Case Button.Caption
  108.     Case "Show Report"
  109.         rptNwind.Show
  110.     Case "Export Report"
  111.         mnuExport_Click
  112.     Case "Templates"
  113.         ' Print all the templates.
  114.         Dim i As Integer
  115.         For i = 1 To rptNwind.ExportFormats.Count
  116.             Debug.Print "TEMPLATE " & i
  117.             Debug.Print rptNwind.ExportFormats(i).Template
  118.             Debug.Print ' Space
  119.         Next i
  120.         MsgBox "Templates printed to Immediate window."
  121.     Case "Exit"
  122.         mnuExit_Click
  123.     End Select
  124. End Sub
  125.