Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - adding control - please help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

adding control - please help

 Post Reply Post Reply
Author
Message
rishal01 View Drop Down
Newbie
Newbie


Joined: 16 July 2011
Location: Indonesia
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote rishal01 Quote  Post ReplyReply Direct Link To This Post Topic: adding control - please help
    Posted: 17 July 2011 at 12:21am
Hi everybody,
i'm trying using report control... to add my custom date control within cells. i dont want using date picker. uploads/6904/UserControl1.rar  . but it seem codejock report control would allow it. can any body give some clue ? ... later i'm trying some code that mimics my usercontrol like this :

Private Sub ListEntries_InplaceEditChanging(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, NewValue As String, Cancel As Boolean)
'
If Len(NewValue) = 2 Then SendKeys "{-}"
If Len(NewValue) = 5 Then
    If InStr(6, NewValue, "-", vbTextCompare) = 0 Then SendKeys "{-}"
End If
End Sub

but this code looks ugly when user entered backspace... is there better idea ??

Thanks.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2011 at 3:01pm
Hi,
 
Here's a small demo for positioning DateTimePicker and your own UserControl.
 
First you have to decide what you want to use because you need some 'workaround' to save value to reportItem. Let me know which one you like best and I will see what I can do.
 
 
 
Good luck Wink
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
rishal01 View Drop Down
Newbie
Newbie


Joined: 16 July 2011
Location: Indonesia
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote rishal01 Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2011 at 4:45am
 hi  Aaron,

i dont know what to say ... you help me a lot .... thank you so much ... many ... many thank you Big smile Big smile  Big smileClap Clap

I did not realize was a solution to this problem is very simple. but for those who do not know like me that will make the headache. once again thank you very much

Private Sub wndReportControl_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean)

   Dim l As Long
    Dim t As Long
    Dim b As Long
    Dim r As Long
    
  Me.wndReportControl.Rows(NewRow.Index).GetItemRect NewItem, l, t, r, b
  
  With Me.DateTimePicker1
        .Move l, t, r - l, b - t
        .ZOrder 0
        .Visible = NewColumn.Index = 2 'only use third column for showing datepicker
        .Value = NewItem.Value
    End With
 End Sub

 just add this code then the problem is resolved.

Private Sub DateTimePicker1_Change()
     wndReportControl.FocusedRow.Record(2).Value = DateTimePicker1.Value
     wndReportControl.Populate
End Sub




Back to Top
JamGodz View Drop Down
Groupie
Groupie
Avatar

Joined: 25 February 2010
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamGodz Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2011 at 7:26pm
it take me two days to find this solution thanks to you guys!

But i have a problem... when i scroll down/up the DatePicker did not go with item.

thanks...
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.148 seconds.