Print Page | Close Window

BUG: VirtualMode Tooltip Problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=14057
Printed Date: 14 November 2024 at 11:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: BUG: VirtualMode Tooltip Problem
Posted By: jpbro
Subject: BUG: VirtualMode Tooltip Problem
Date 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 - 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




Replies:
Posted By: jpbro
Date 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



Posted By: jpbro
Date 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



Posted By: Aaron
Date 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....


Posted By: jpbro
Date 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



Posted By: mdoubson
Date Posted: 20 April 2009 at 6:05pm
check the post https://forum.codejock.com/forum_posts.asp?TID=13896 - https://forum.codejock.com/forum_posts.asp?TID=13896  - you can use similar approach in VB

-------------
Mark Doubson, Ph.D.


Posted By: Aaron
Date 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 - 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....


Posted By: jpbro
Date 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



Posted By: mdoubson
Date 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; };



-------------
Mark Doubson, Ph.D.


Posted By: jpbro
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net