mouse scrolling

Discussion forum about all things Report Builder (all versions).
Peter Grob
Germany
Posts: 39
Joined: 23 Jun 2017, 10:48
Location: Volkach Germany

mouse scrolling

Post by Peter Grob » 29 Mar 2012, 14:45

Hi there,

it's not possible to use mouse scrolling in the report preview in version 4.1. Is there any solution for this?

Regards

Peter Grob

Jeff Luther

mouse scrolling

Post by Jeff Luther » 03 Apr 2012, 00:30

Not for RB v4.1. I see that RB v6.0 has mouse wheel scrolling in Preview mode, so you might consider upgrading to v6.0, for instance.

TerryP
Australia
Posts: 313
Joined: 06 Mar 2017, 22:41
Location: Australia

mouse scrolling

Post by TerryP » 04 Apr 2012, 02:35

Hi Peter,

If you pass your own window template handle as the second parameter in the SalReportView function call, you can then intercept the WM_MouseWheel windows message (0x020A) on that window and prcocess the wParam and lParam values, as follows:

Code: Select all

On WM_MouseWheel
   Set nMWScroll = SalNumberHigh( wParam )
   If nMWScroll > 32768
      Set nMWScroll = nMWScroll - 65536
   If nMWScroll >= 120 or nMWScroll <= -120
      If nMWScroll >= 0
         ! ** Send Page Up (2) **
         Call SalSendMsg ( hWndPreview, WM_VScroll, VisNumberMakeLong ( 2, 0 ), 0 )
      Else
         ! ** Send Page Down (3) **
         Call SalSendMsg ( hWndPreview, WM_VScroll, VisNumberMakeLong ( 3, 0 ), 0 )
      Return FALSE


The trick is to forward the appropriate WM_VScroll message (0x0115) on to the embedded ReportBuilder preview window (hWndPreview) to cause the content to scroll. To get the preview window handle, you need to scan the child windows of your report output window to find the window with the Class Name for RB 4.1, i.e. "Gupta:Report:Preview", using the Windows API functions for GetWindow( ) and GetClassNameA( ).

This isn't a perfect solution, sometimes the report window seems to lose contact with the embedded preview window, and it doesn't scroll when it should. However, if you zoom out and back in, it then works okay again.

Hope this helps you out...

Cheers,
Terry Phythian
Reprise Consulting

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests