Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - report control drog and drop (SOLVED)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

report control drog and drop (SOLVED)

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

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Topic: report control drog and drop (SOLVED)
    Posted: 02 August 2008 at 5:34pm
hi dear

i want to making two report controls for drog and drop records from one to other control .

for examle in report1 we have 10 records and report2 is empty .
report1 is source and  report2 is destination .


when  we drag one record from source to destination then  report1  has 9 records and report2 has 1 record .

but when u pressed "ctrl" and drag any record from any report control to itself , this record duplicate in report !

how i can fix it ?
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: 03 August 2008 at 5:18am
Hi,
 
You allow droprecords by setting:
 
cfRecordsSource = wndReportSource.EnableDragDrop("ReportSample:frmDragDrop", xtpReportAllowDrag Or xtpReportAllowDrop)
 
cfRecordsDestination = wndReportSource.EnableDragDrop("ReportSample:frmDragDrop", xtpReportAllowDrag Or xtpReportAllowDrop)
 
if you set this with both RC's you are able to drag&drop records in both RC's. That's not what you want.
 
 
If you set the source only for dragging and destination for dropping:
 
cfRecordsSource = wndReportSource.EnableDragDrop("ReportSample:frmDragDrop", xtpReportAllowDrag)

cfRecordsDestination = wndReportDestination.EnableDragDrop("ReportSample:frmDragDrop", xtpReportAllowDrop)
 
 
allows you to move or copy the selected records only from source to destination.
 
 
btw If your issue is solved, please add SOLVED in your Topic description and have a look at post http://forum.codejock.com/forum_posts.asp?TID=11225

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
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2008 at 6:04am
tnx sir !

but by limit draging in first RC and limit dropping in another RC user cant move records from RC1 to RC2 and from RC2 to RC1 !

i want to have biderctional drag and droping between RCs .

user must move any record from any report control to another control freely . but must always sum of record in two report control be fix. (copy from one control to itself is invalid . in fact this is my problem !)

tnx

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: 03 August 2008 at 7:25am
Hi,
 
I was testing your issue and found I was doing something wrong myself (I changed my previous reply as well, not to confuse other users)
 
To disable copying records with CTRL down you can use the events:
 
Private Sub wndReportSource_OLEDragOver(ByVal Data As XtremeReportControl.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single, ByVal state As Integer)
    If ((Shift And 2) = 0) Then
        Effect = vbDropEffectMove
    Else
        Effect = vbDropEffectNone
    End If
End Sub
Private Sub wndReportDestination_OLEDragOver(ByVal Data As XtremeReportControl.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single, ByVal state As Integer)
    If ((Shift And 2) = 0) Then
        Effect = vbDropEffectMove
    Else
        Effect = vbDropEffectNone
    End If
End Sub
 
also set:
 
wndReportSource.OLEDropMode = xtpOLEDropManual
wndReportDestination.OLEDropMode = xtpOLEDropManual

 
and cursor will be changed to NODROP when CTRL is down and now you can only move the records.
 
 
 
 
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
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2008 at 7:51am
really tnx dear
;)

i change titel to solved immediately ;)



but 1 smaill question

when we have report control on form and set form.keypreview = true
"ESC" code not detected by form when report control have focus .

can u help me abt this ?


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: 03 August 2008 at 8:34am
Hi,
 
try this:
 
Private Sub wndReportSource_PreviewKeyDown(KeyCode As Integer, ByVal Shift As Integer, Cancel As Boolean)
    Me.Caption = KeyCode
End Sub
 
Please add SOLVED: <your topic description> and enter your info in your signature as well
 
 
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
nenkalo View Drop Down
Groupie
Groupie
Avatar

Joined: 02 August 2008
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote nenkalo Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2008 at 9:03am
Originally posted by Aaron Aaron wrote:

Hi,
 
try this:
 
Private Sub wndReportSource_PreviewKeyDown(KeyCode As Integer, ByVal Shift As Integer, Cancel As Boolean)
    Me.Caption = KeyCode
End Sub


hi . tnx . i know this way . but i want to find one solution to reciving keycode pressed in form . anyway its not important . tnx for everythings ...


Originally posted by Aaron Aaron wrote:


Please add SOLVED: <your topic description> and enter your info in your signature as well


i do it
Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (32bit)
Language: Visual Basic 6.0
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.064 seconds.