Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - SOLVED: UnrestrictedDragDrop & RecordsDropped
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: UnrestrictedDragDrop & RecordsDropped

 Post Reply Post Reply
Author
Message
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: UnrestrictedDragDrop & RecordsDropped
    Posted: 02 March 2010 at 2:49am
If the RC is UnrestrictedDragDrop = True and you drop a record not among a sibling child records, it comes to an error message if you want to read TargetRecord properties. So how I can find out, if a user dops  among a sibling child records or not?
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 02 March 2010 at 9:25am
It seems to be a Bug in 13.3.0 the UnrestrictedDragDrop takes no different if it is True or False. It is alwas True!
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
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: 02 March 2010 at 2:13pm
UnrestrictedDragDrop is set by you to True or False.  Default is False.

After looking through the source:

ReportControl.UnrestrictedDragDrop = False
If the Target Record is a child record the parent record will be reported as the target. 

ReportControl.UnrestrictedDragDrop = True
If the Target Record is a child record the child record will be reported as the target.  Since it is a child record you will need to support in your app the specific actions to take with the child record.
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2010 at 1:30am
Originally posted by SuperMario SuperMario wrote:

UnrestrictedDragDrop is set by you to True or False.  Default is False.
ReportControl.UnrestrictedDragDrop = False
If the Target Record is a child record the parent record will be reported as the target.  
 
If ReportControl.UnrestrictedDragDrop = False there is an error message if I try to read the read TargetRecord properties !!!
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
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: 03 March 2010 at 9:50am
Do you use OLEDragDrop?
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2010 at 10:31am

Yes, the RC has also OLEDragDrop set to true!

Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
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: 03 March 2010 at 12:45pm
Can I see code you use to check to check it?
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2010 at 12:31am
Originally posted by SuperMario SuperMario wrote:

Can I see code you use to check to check it?
 
 
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
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: 04 March 2010 at 12:04pm
I think maybe you don't understand what this property is used for.  In your sample UnrestrictedDragDrop will do nothing as the records don't have any child records.  In the sample the Group Rows have child rows, but the records attached to these rows do not have children.

And of course TargetRecord will be Nothing if you don't drop over a row.  You just have to test for it.

Here is one way to see if the record you dropped was dropped in the group it will appear.

Hope this helps

Private Sub repCont5_DropRecordsEx(ByVal TargetRecord As XtremeReportControl.IReportRecord, ByVal Records As XtremeReportControl.IReportRecords, ByVal Above As Boolean)
    If Not TargetRecord Is Nothing Then
    Dim tRecord As XtremeReportControl.ReportRecord
        Debug.Print TargetRecord(2).Value
       
        For Each tRecord In Records
            If TargetRecord(4).GroupCaption = "" Then
                If TargetRecord(4).Caption = tRecord(4).Caption Then
                    Debug.Print "5 - Sibling! : " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption
                    MsgBox "5 - Sibling! : " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption
                    Exit Sub
                End If
            Else
                If TargetRecord(4).GroupCaption = tRecord(4).GroupCaption Then
                    Debug.Print "5 - Sibling! : " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption
                    Debug.Print "5 - Sibling! : " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption
                    Exit Sub
                End If
            End If
        Next
       
        MsgBox "5- NO SIBLINGS! " + TargetRecord(2).Value + " - " + TargetRecord(4).Caption
    Else
        MsgBox "repCont5_DropRecordsEx NOT DROPPED AMONG ROWS!"
    End If
End Sub
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: 09 March 2010 at 10:34am
Did that help?
Back to Top
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2010 at 11:11am
Yes, it's solved! Thanks.
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
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.172 seconds.