Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - BUG: VirtualMode Tooltip Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BUG: VirtualMode Tooltip Problem

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

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: BUG: VirtualMode Tooltip Problem
    Posted: 17 April 2009 at 6:48pm
When setting the Tooltip property of an item with a ReportControl in Virtual Mode, the tooltip for all visible items becomes the tooltip of the last item that you set. This problem doesn't exist in non-VirtualMode.

Sample:
uploads/20090417_184804_ReportControlTo.zip

Also, is there a way to turn off VirtualMode once it has been activated with SetVirtualMode?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 9:09pm
Similarly, when you add Hyperlinks to a cell in VirtualMode, only the Hyperlink for the bottom-most visible item is clickable.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 April 2009 at 12:15pm
Same problem when trying to retrieve a cell value using:


Dim lo_Row As ReportRow

With UserControl.ReportControl1
    For Each lo_Row In .SelectedRows
         Debug.Print lo_Row.Record.Item(0).Value
    Next lo_Row
End With


The printed Values will all be the same (the bottom-most visible value on the ReportControl).
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 20 April 2009 at 1:50pm
Hi Jason,
 
  1. In fact you have only ONE record in RC and it looks like THIS item is returned in BeforeDrawRow event and DrawItem event??? Maybe SupportTeam can answer this one.
  2. You can set:
    • wndReportControl.SetVirtualMode 0
    • wndReportControl.Populate
 
 
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
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2009 at 5:10pm
Hi Aaron,

I'm confused by response #2...If I set the virtual mode to 0 rows, how do I add rows to the report in virtual mode? As far as I can tell I need to set the desired number of columns in order for the BeforeDrawRow event to fire...or am I using virtual mode incorrectly?

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2009 at 6:05pm
check the post https://forum.codejock.com/forum_posts.asp?TID=13896 - you can use similar approach in VB
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: 21 April 2009 at 9:31am
Originally posted by jpbro jpbro wrote:

Hi Aaron,

I'm confused by response #2...If I set the virtual mode to 0 rows, how do I add rows to the report in virtual mode? As far as I can tell I need to set the desired number of columns in order for the BeforeDrawRow event to fire...or am I using virtual mode incorrectly?

 
Hi Jason,
 
Rows will be added in BeforeDrawRow event for the number you set for .SetVirtualMode
 
If you set for example: wndReportControl.SetVirtualMode 100
 
you basiccaly are telling the ReportControl to have events in BeforeDrawRow event for 100 rows (you don't will have an event with Row.Index = 100 (first row will have index = 0) You have to add at least one record to have the RC working and have events fired at all. The fired events are only of the visible part of RC (you can test this, size RC and only have one row showing, you will get only 1 event: one of the visible row) With every single click, size, scroll etc etc (whenever RC needs to be redrawn, the event will fire for all visible rows in RC) 
 
With VirtualMode you need to assign values of ReportItems yourself in BeforeDrawRow event using Row.Index and Item.index) You can see a workimg sample in Sample forum https://forum.codejock.com/forum_posts.asp?TID=11178 You can also use an array to fill RC with data.
 
I haven't spent time on using VirtualMode with DataBinding but it should be possible... I hope this will help you a bit  
  
 
 
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
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2009 at 9:43am
Mark,

What are the values of the following:

XTP_NM_REPORT_GETTOOLTIPINFO
XTP_ID_REPORT_CONTROL

What is the definition of the following (preferably in VB6 vartypes):

XTP_NM_REPORTTOOLTIPINFO

I assume I need to subclass the WM_NOTIFY event on the ReportControl hWnd (or is it on the parent of the ReportControl hWnd)?

This seems very complex for something that should be simple. How about exposing NeedTooltip as a standard VB6 event?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2009 at 10:53am

XTP_NM_REPORT_GETTOOLTIPINFO = NM_FIRST-74

XTP_ID_REPORT_CONTROL - set by APP - not by ActiveX or Core

struct XTP_NM_REPORTTOOLTIPINFO : public XTP_NM_REPORTRECORDITEM { CString* pstrText; };

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2009 at 12:28pm
Hi Aaron, thanks for the info. My mistake was trying to extract cell data from the ReportControl properties in virtual mode. I now directly query the database (based on the Row and Column indexes), and everything seems to be working.

Also to Mark and anyone else who may be interested...the tooltip notification is already exposed in the ActiveX version, I just didn't see it. The event is named GetToolTipInfo, and it can be used as follows:


Private Sub ReportControl1_GetToolTipInfo(ByVal toolTipInfo As XtremeReportControl.IReportToolTipInfo)
   With toolTipInfo
      .Text = "Row: " & .Row.Index & " Col: " & .Item.Index
   End With
End Sub


Thanks again for all your help.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

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.281 seconds.