Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - DTPicker in ReportControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DTPicker in ReportControl

 Post Reply Post Reply
Author
Message
cybeh View Drop Down
Groupie
Groupie
Avatar

Joined: 27 December 2005
Location: Malaysia
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote cybeh Quote  Post ReplyReply Direct Link To This Post Topic: DTPicker in ReportControl
    Posted: 15 July 2006 at 2:11am
Hi,

In my reporting control, I do have a drop down button which should let the user click and show the dt picker.

        nResult = Show_XTPDatePicker(nX, nY, dTDate)

Private Function Show_XTPDatePicker(nX, nY, dTDate) As Long
    Show_XTPDatePicker = -1
   
    On Error GoTo err1
   
    Dim pDatePicker
    Dim dtDate0
    Set pDatePicker = CreateObject("Codejock.DatePicker.9.81")
   
    If pDatePicker Is Nothing Then
        Exit Function
    End If
   
    pDatePicker.MaxSelectionCount = 1
   
    Dim nWidth As Long, nHeight As Long
    pDatePicker.GetMinReqRect nWidth, nHeight, 1, 1
       
    pDatePicker.SelectRange dTDate, dTDate
    pDatePicker.EnsureVisible dTDate
                   
    Dim bResult As Boolean
    bResult = pDatePicker.ShowModalEx(nX, nY, nWidth + 4, nHeight + 4, wndReportControl.hwnd)
   
   
    Show_XTPDatePicker = 0
       
    If bResult And pDatePicker.Selection.BlocksCount > 0 Then
       
        dtDate0 = pDatePicker.Selection.Blocks(0).DateBegin()
        If IsDate(dtDate0) Then
            dTDate = CDate(dtDate0)
            Show_XTPDatePicker = 1
        End If
    Else
        If bResult And pDatePicker.Selection.BlocksCount = 0 Then
            dtDate0 = "1601-01-01"
            dTDate = CDate(dtDate0)
            Show_XTPDatePicker = 1
        End If
    End If
err1:
End Function


The code works fine at my machine, but not my client machine. I think there is some OCX missing.

But, I do include all this in my InnoSetup Script

Source: "D:\Coding\ProjectManagement\Package\Support\Codejock.TaskPanel.v9.81.ocx"; DestDir: "{sys}"; Flags: sharedfile regserver
Source: "D:\Coding\ProjectManagement\Package\Support\Codejock.SuiteCtrls.v9.81.ocx"; DestDir: "{sys}"; Flags: sharedfile regserver
Source: "D:\Coding\ProjectManagement\Package\Support\Codejock.Calendar.v9.81.ocx"; DestDir: "{sys}"; Flags: sharedfile regserver
Source: "D:\Coding\ProjectManagement\Package\Support\Codejock.ShortcutBar.v9.81.ocx"; DestDir: "{sys}"; Flags: sharedfile regserver
Source: "D:\Coding\ProjectManagement\Package\Support\Codejock.CommandBars.v9.81.ocx"; DestDir: "{sys}"; Flags: sharedfile regserver
Source: "D:\Coding\ProjectManagement\Package\Support\Codejock.ReportControl.v9.81.ocx"; DestDir: "{sys}"; Flags: sharedfile regserver


Can anyone tell me wut's missing? Please advice. Thanks in advance.



Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2006 at 9:19am
You need the license to use CreateObject:

Dim pDatePicker
    XtremeCalendarControl.License = "Calendar Control Copyright (c) 2003-2006 Codejock Software" & vbCrLf & "PRODUCT-ID: Codejock.Calendar.ActiveX.v10.2" & vbCrLf & "VALIDATE-CODE: XXX-XXX-XXX-XXX"
    Set pDatePicker = CreateObject("Codejock.DatePicker." + XtremeCalendarControl.Version)

Also note if you are still using 9.81 then you will need to change the version number and copyright years
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.