home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 May
/
W2KPRK.iso
/
apps
/
crystal
/
disk18
/
Xvb375._
/
Xvb375.
Wrap
Text File
|
1999-08-23
|
22KB
|
651 lines
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx"
Begin VB.Form frmOptions
BorderStyle = 3 'Fixed Dialog
Caption = "Options"
ClientHeight = 4992
ClientLeft = 2136
ClientTop = 1668
ClientWidth = 6960
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4992
ScaleWidth = 6960
ShowInTaskbar = 0 'False
Tag = "Options"
Begin VB.CommandButton cmdShowSource
Caption = "&Show Source"
Height = 375
Left = 120
TabIndex = 43
Top = 4455
Width = 1320
End
Begin TabDlg.SSTab sstOptions
Height = 4188
Left = 480
TabIndex = 0
Top = 120
Width = 5880
_ExtentX = 10372
_ExtentY = 7387
_Version = 327680
Tabs = 4
Tab = 1
TabsPerRow = 4
TabHeight = 520
TabCaption(0) = "&Special"
TabPicture(0) = "Options.frx":0000
Tab(0).ControlCount= 1
Tab(0).ControlEnabled= 0 'False
Tab(0).Control(0)= "chkSpecial(0)"
Tab(0).Control(0).Enabled= -1 'True
TabCaption(1) = "&Output"
TabPicture(1) = "Options.frx":001C
Tab(1).ControlCount= 1
Tab(1).ControlEnabled= -1 'True
Tab(1).Control(0)= "fraOutput"
Tab(1).Control(0).Enabled= 0 'False
TabCaption(2) = "&Window"
TabPicture(2) = "Options.frx":0038
Tab(2).ControlCount= 14
Tab(2).ControlEnabled= 0 'False
Tab(2).Control(0)= "txtWindowTitle"
Tab(2).Control(0).Enabled= -1 'True
Tab(2).Control(1)= "chkWindowZoom"
Tab(2).Control(1).Enabled= -1 'True
Tab(2).Control(2)= "chkWindowRefresh"
Tab(2).Control(2).Enabled= -1 'True
Tab(2).Control(3)= "chkWindowSetup"
Tab(2).Control(3).Enabled= -1 'True
Tab(2).Control(4)= "chkWindowNavigation"
Tab(2).Control(4).Enabled= -1 'True
Tab(2).Control(5)= "chkWindowExport"
Tab(2).Control(5).Enabled= -1 'True
Tab(2).Control(6)= "chkWindowCancel"
Tab(2).Control(6).Enabled= -1 'True
Tab(2).Control(7)= "chkWindowSearch"
Tab(2).Control(7).Enabled= -1 'True
Tab(2).Control(8)= "chkWindowProgress"
Tab(2).Control(8).Enabled= -1 'True
Tab(2).Control(9)= "chkWindowPrint"
Tab(2).Control(9).Enabled= -1 'True
Tab(2).Control(10)= "chkWindowGroupTree"
Tab(2).Control(10).Enabled= -1 'True
Tab(2).Control(11)= "chkWindowClose"
Tab(2).Control(11).Enabled= -1 'True
Tab(2).Control(12)= "chkWindowDrill"
Tab(2).Control(12).Enabled= -1 'True
Tab(2).Control(13)= "lblWindowTitle"
Tab(2).Control(13).Enabled= 0 'False
TabCaption(3) = "&Tables"
TabPicture(3) = "Options.frx":0054
Tab(3).ControlCount= 21
Tab(3).ControlEnabled= 0 'False
Tab(3).Control(0)= "txtTablesPassword"
Tab(3).Control(0).Enabled= -1 'True
Tab(3).Control(1)= "txtTablesUser"
Tab(3).Control(1).Enabled= -1 'True
Tab(3).Control(2)= "txtTablesDatabase"
Tab(3).Control(2).Enabled= -1 'True
Tab(3).Control(3)= "txtTablesServer"
Tab(3).Control(3).Enabled= -1 'True
Tab(3).Control(4)= "txtTablesDLL"
Tab(3).Control(4).Enabled= -1 'True
Tab(3).Control(5)= "txtTablesType"
Tab(3).Control(5).Enabled= -1 'True
Tab(3).Control(6)= "txtTablesLocation"
Tab(3).Control(6).Enabled= -1 'True
Tab(3).Control(7)= "txtTablesDesc"
Tab(3).Control(7).Enabled= -1 'True
Tab(3).Control(8)= "txtTablesName"
Tab(3).Control(8).Enabled= -1 'True
Tab(3).Control(9)= "cmdTablesLogOn"
Tab(3).Control(9).Enabled= -1 'True
Tab(3).Control(10)= "cmdTablesTest"
Tab(3).Control(10).Enabled= -1 'True
Tab(3).Control(11)= "lstTables"
Tab(3).Control(11).Enabled= -1 'True
Tab(3).Control(12)= "lblTablesPassword"
Tab(3).Control(12).Enabled= 0 'False
Tab(3).Control(13)= "lblTablesUser"
Tab(3).Control(13).Enabled= 0 'False
Tab(3).Control(14)= "lblTablesDatabase"
Tab(3).Control(14).Enabled= 0 'False
Tab(3).Control(15)= "lblTablesServer"
Tab(3).Control(15).Enabled= 0 'False
Tab(3).Control(16)= "lblTablesDLL"
Tab(3).Control(16).Enabled= 0 'False
Tab(3).Control(17)= "lblTablesType"
Tab(3).Control(17).Enabled= 0 'False
Tab(3).Control(18)= "lblTablesLocation"
Tab(3).Control(18).Enabled= 0 'False
Tab(3).Control(19)= "lblTablesDesc"
Tab(3).Control(19).Enabled= 0 'False
Tab(3).Control(20)= "lblTablesName"
Tab(3).Control(20).Enabled= 0 'False
Begin VB.CheckBox chkSpecial
Caption = "Special unique report option #0"
Height = 405
Index = 0
Left = -74805
TabIndex = 1
Top = 720
Width = 5460
End
Begin VB.TextBox txtTablesPassword
Height = 300
Left = -71310
TabIndex = 41
Top = 3705
Width = 2010
End
Begin VB.TextBox txtTablesUser
Height = 300
Left = -71310
TabIndex = 39
Top = 3292
Width = 2010
End
Begin VB.TextBox txtTablesDatabase
Height = 300
Left = -71310
TabIndex = 37
Top = 2886
Width = 2010
End
Begin VB.TextBox txtTablesServer
Height = 300
Left = -71310
TabIndex = 35
Top = 2480
Width = 2010
End
Begin VB.TextBox txtTablesDLL
Height = 300
Left = -71310
TabIndex = 33
Top = 2074
Width = 2010
End
Begin VB.TextBox txtTablesType
Height = 300
Left = -71310
TabIndex = 31
Top = 1668
Width = 2010
End
Begin VB.TextBox txtTablesLocation
Height = 300
Left = -71295
TabIndex = 29
Top = 1262
Width = 2010
End
Begin VB.TextBox txtTablesDesc
Height = 300
Left = -71310
TabIndex = 27
Top = 856
Width = 2010
End
Begin VB.TextBox txtTablesName
Height = 300
Left = -71310
TabIndex = 25
Top = 450
Width = 2010
End
Begin VB.CommandButton cmdTablesLogOn
Caption = "Set &Log On Info"
Height = 390
Left = -74805
TabIndex = 23
Top = 2730
Width = 1965
End
Begin VB.CommandButton cmdTablesTest
Caption = "Test &Connectivity"
Height = 390
Left = -74805
TabIndex = 22
Top = 2130
Width = 1965
End
Begin VB.ListBox lstTables
Height = 1392
Left = -74805
TabIndex = 21
Top = 495
Width = 1965
End
Begin VB.TextBox txtWindowTitle
Height = 345
Left = -73485
TabIndex = 20
Top = 3660
Width = 4080
End
Begin VB.CheckBox chkWindowZoom
Caption = "&Zoom Controls"
Height = 195
Left = -71835
TabIndex = 18
Top = 3135
Width = 2490
End
Begin VB.CheckBox chkWindowRefresh
Caption = "&Refresh Button"
Height = 195
Left = -71835
TabIndex = 16
Top = 2610
Width = 2490
End
Begin VB.CheckBox chkWindowSetup
Caption = "Print &Setup Button"
Height = 195
Left = -71835
TabIndex = 14
Top = 2085
Width = 2490
End
Begin VB.CheckBox chkWindowNavigation
Caption = "&Navigation Controls"
Height = 195
Left = -71835
TabIndex = 12
Top = 1560
Width = 2490
End
Begin VB.CheckBox chkWindowExport
Caption = "&Export Button"
Height = 195
Left = -71835
TabIndex = 10
Top = 1035
Width = 2490
End
Begin VB.CheckBox chkWindowCancel
Caption = "&Cancel Button"
Height = 195
Left = -71805
TabIndex = 8
Top = 510
Width = 2490
End
Begin VB.CheckBox chkWindowSearch
Caption = "&Search Button"
Height = 195
Left = -74655
TabIndex = 17
Top = 3135
Width = 2490
End
Begin VB.CheckBox chkWindowProgress
Caption = "Progress Con&trol"
Height = 195
Left = -74655
TabIndex = 15
Top = 2610
Width = 2490
End
Begin VB.CheckBox chkWindowPrint
Caption = "&Print Button"
Height = 195
Left = -74655
TabIndex = 13
Top = 2085
Width = 2490
End
Begin VB.CheckBox chkWindowGroupTree
Caption = "&Group Tree"
Height = 195
Left = -74655
TabIndex = 11
Top = 1560
Width = 2490
End
Begin VB.CheckBox chkWindowClose
Caption = "C&lose Button"
Height = 195
Left = -74655
TabIndex = 9
Top = 1035
Width = 2490
End
Begin VB.CheckBox chkWindowDrill
Caption = "&Drill Down"
Height = 195
Left = -74655
TabIndex = 7
Top = 510
Width = 2490
End
Begin VB.Frame fraOutput
Height = 3420
Left = 255
TabIndex = 42
Top = 510
Width = 5370
Begin VB.OptionButton optOutputApplication
Caption = "&Application Window"
Height = 375
Left = 315
TabIndex = 3
Top = 933
Width = 4800
End
Begin VB.OptionButton optOutputExportFileExcel
Caption = "Export to &File as Excel Worksheet"
Height = 375
Left = 315
TabIndex = 6
Top = 2835
Width = 4800
End
Begin VB.OptionButton optOutputExportEmailWord
Caption = "Export to &Email as Word Document"
Height = 375
Left = 315
TabIndex = 5
Top = 2199
Width = 4800
End
Begin VB.OptionButton optOutputPrinter
Caption = "&Printer"
Height = 375
Left = 315
TabIndex = 4
Top = 1566
Width = 4800
End
Begin VB.OptionButton optOutputPreview
Caption = "Preview &Window"
Height = 375
Left = 315
TabIndex = 2
Top = 300
Value = -1 'True
Width = 4800
End
End
Begin VB.Label lblTablesPassword
Caption = "Password:"
Height = 270
Left = -72690
TabIndex = 40
Top = 3765
Width = 1305
End
Begin VB.Label lblTablesUser
Caption = "User ID:"
Height = 270
Left = -72690
TabIndex = 38
Top = 3360
Width = 1305
End
Begin VB.Label lblTablesDatabase
Caption = "Database Name:"
Height = 270
Left = -72690
TabIndex = 36
Top = 2955
Width = 1305
End
Begin VB.Label lblTablesServer
Caption = "Server Name:"
Height = 270
Left = -72690
TabIndex = 34
Top = 2550
Width = 1305
End
Begin VB.Label lblTablesDLL
Caption = "DLL Name:"
Height = 270
Left = -72690
TabIndex = 32
Top = 2145
Width = 1305
End
Begin VB.Label lblTablesType
Caption = "Type:"
Height = 270
Left = -72690
TabIndex = 30
Top = 1740
Width = 1305
End
Begin VB.Label lblTablesLocation
Caption = "Location:"
Height = 270
Left = -72690
TabIndex = 28
Top = 1335
Width = 1305
End
Begin VB.Label lblTablesDesc
Caption = "Description:"
Height = 270
Left = -72690
TabIndex = 26
Top = 930
Width = 1305
End
Begin VB.Label lblTablesName
Caption = "Name:"
Height = 270
Left = -72690
TabIndex = 24
Top = 525
Width = 1305
End
Begin VB.Label lblWindowTitle
Caption = "Window Title:"
Height = 180
Left = -74655
TabIndex = 19
Top = 3705
Width = 1350
End
End
Begin VB.CommandButton cmdOK
Caption = "&OK"
Default = -1 'True
Height = 375
Left = 3675
TabIndex = 44
Tag = "OK"
Top = 4455
Width = 1095
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 4920
TabIndex = 45
Tag = "Cancel"
Top = 4455
Width = 1095
End
End
Attribute VB_Name = "frmOptions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Enum OptionsResult
orOk
orCancel
End Enum
Private m_orStatus As OptionsResult
Private m_strSource As String
Private m_colSpecialSources As Collection
Private m_crwReport As Report
Private m_crwTable As DatabaseTable
Public Sub ResetSpecial()
Set m_colSpecialSources = New Collection
Me.chkSpecial(0).Visible = False
End Sub
Public Function SetSpecial(strCaption As String, Optional strSource As String) As Integer
SetSpecial = 0
Me.chkSpecial(SetSpecial).Caption = strCaption
Me.chkSpecial(SetSpecial).Visible = True
m_colSpecialSources.Add strSource, CStr(SetSpecial)
End Function
Public Function GetSpecial(intSpecial As Integer) As Boolean
GetSpecial = Me.chkSpecial(0).Value
End Function
Public Function Display(crwReport As Report) As OptionsResult
If Not crwReport Is Nothing Then
Set m_crwReport = crwReport
Dim intTable As Integer
Me.lstTables.Clear
With m_crwReport.Options
Me.chkWindowGroupTree.Value = Abs(.HasGroupTree)
End With
For intTable = 1 To m_crwReport.Database.Tables.Count
Me.lstTables.AddItem m_crwReport.Database.Tables.Item(intTable).Name
Next intTable
With m_crwReport.PrintWindowOptions
Me.chkWindowCancel.Value = Abs(.HasCancelButton)
Me.chkWindowClose.Value = Abs(.HasCloseButton)
Me.chkWindowDrill.Value = Abs(.CanDrillDown)
Me.chkWindowExport.Value = Abs(.HasExportButton)
Me.chkWindowNavigation.Value = Abs(.HasNavigationControls)
Me.chkWindowPrint.Value = Abs(.HasPrintButton)
Me.chkWindowProgress.Value = Abs(.HasProgressControls)
Me.chkWindowRefresh.Value = Abs(.HasRefreshButton)
Me.chkWindowSearch.Value = Abs(.HasSearchButton)
Me.chkWindowSetup.Value = Abs(.HasPrintSetupButton)
Me.chkWindowZoom.Value = Abs(.HasZoomControl)
End With
Me.Show vbModal, frmMain
Else
m_orStatus = orCancel
End If
If m_orStatus = orOk Then
With m_crwReport.PrintWindowOptions
.HasCancelButton = Me.chkWindowCancel.Value
.HasCloseButton = Me.chkWindowClose.Value
.CanDrillDown = Me.chkWindowDrill.Value
.HasExportButton = Me.chkWindowExport.Value
.HasNavigationControls = Me.chkWindowNavigation.Value
.HasPrintButton = Me.chkWindowPrint.Value
.HasProgressControls = Me.chkWindowProgress.Value
.HasRefreshButton = Me.chkWindowRefresh.Value
.HasSearchButton = Me.chkWindowSearch.Value
.HasPrintSetupButton = Me.chkWindowSetup.Value
.HasZoomControl = Me.chkWindowZoom.Value
End With
With m_crwReport.Options
.HasGroupTree = Me.chkWindowGroupTree.Value
End With
End If
Display = m_orStatus
End Function
Private Sub chkSpecial_GotFocus(Index As Integer)
m_strSource = m_colSpecialSources(CStr(Index))
End Sub
Private Sub cmdCancel_Click()
Me.Hide
m_orStatus = orCancel
End Sub
Private Sub cmdOK_Click()
Me.Hide
m_orStatus = orOk
End Sub
Private Sub cmdShowSource_Click()
Select Case sstOptions.Tab
Case 1
m_strSource = "Output"
Case 2
m_strSource = "Window"
Case 3
m_strSource = "Tables"
End Select
frmSource.Display (m_strSource)
End Sub
Private Sub cmdTablesLogOn_Click()
If Not m_crwTable Is Nothing Then
Select Case m_crwTable.Type
Case 1
m_crwTable.Location = Me.txtTablesLocation.Text
Case 2
m_crwTable.SetLogOnInfo Me.txtTablesServer.Text, Me.txtTablesDatabase.Text, Me.txtTablesUser.Text, Me.txtTablesPassword.Text
End Select
End If
End Sub
Private Sub cmdTablesTest_Click()
If Not m_crwTable Is Nothing Then
If m_crwTable.TestConnectivity Then
MsgBox "Connected!"
Else
MsgBox "Not connected!"
End If
End If
End Sub
Private Sub Form_Load()
Center Me
End Sub
Private Sub lstTables_Click()
Set m_crwTable = m_crwReport.Database.Tables.Item(lstTables.ListIndex + 1)
With m_crwTable
Me.txtTablesDLL.Text = .DllName
Me.txtTablesServer.Text = .LogOnServerName
Me.txtTablesDatabase.Text = .LogOnDatabaseName
Me.txtTablesUser.Text = .LogOnUserID
Me.txtTablesName.Text = .Name
Me.txtTablesDesc.Text = .DescriptiveName
Me.txtTablesLocation.Text = .Location
Me.txtTablesType.Text = .Type
End With
End Sub
Private Sub optOutputApplication_Click()
sstOptions.TabEnabled(2) = True
End Sub
Private Sub optOutputExportEmailWord_Click()
sstOptions.TabEnabled(2) = False
End Sub
Private Sub optOutputExportFileExcel_Click()
sstOptions.TabEnabled(2) = False
End Sub
Private Sub optOutputPreview_Click()
sstOptions.TabEnabled(2) = True
End Sub
Private Sub optOutputPrinter_Click()
sstOptions.TabEnabled(2) = False
End Sub