Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

AV when scrolling mouse in XE2

edited December 2011 in General
Hi

I'm busy porting my app from Delphi 2009 to XE2. I'm using the following
code to scroll the mouse-wheel in TppViewer:

ReportViewer.ScrollBox.VertScrollBar.Position :=
ReportViewer.ScrollBox.VertScrollBar.Position - (WheelDelta div 5);

The above code worked perfectly with Delphi 2009 but i'm getting an AV in
XE2 as soon as I use the wheel to scroll.

I'm using the latest version of Reportbuilder and Delphi XE2 (Update 3).

Comments

  • edited December 2011
    RB 14 introduces a new scrollable page preview. The vertical scrollbar can
    be used to scroll through the pages, the pages are generated in a background
    thread.

    One option is to modify your code to call Viewer.VerticalScroll like this...

    Viewer.VerticalScroll(WheelDelta div 5);

    Another option is to set Report.PreviewFormSettings.SinglePageOnly to True,
    and then the old single page preview is used. This will preserve your old
    code.



    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.