From: Paulo Oliveira on
Hi all,

One of my clients ask me if it's possible using the mouse scroll wheel
in reportpro preview like the arrows keys to Scroll down a zoomed
report.
It's possible?

TIA
Paulo Oliveira
From: Amilcar A. Camargo on
Hi Paulo,

On Tue, 13 Apr 2010 10:12:27 -0700 (PDT), Paulo Oliveira <paulo(a)clipinfor.com>
wrote:

>Hi all,
>
>One of my clients ask me if it's possible using the mouse scroll wheel
>in reportpro preview like the arrows keys to Scroll down a zoomed
>report.
>It's possible?

Yes, i've done it for reportPro 2.xx in the following way:

CLASS My_rpPrintPreviewMDI INHERIT rpPrintPreviewMDI

METHOD Dispatch( oEv ) CLASS My_rpPrintPreviewMDI
LOCAL uMsg := oEv:Message AS LONG
LOCAL wParam := oEv:wParam AS DWORD
LOCAL lParam := oEv:lParam AS LONG

LOCAL iDelta AS INT // ** 9-Oct-2008 **

DO CASE
// Mouse wheel
CASE uMsg == WM_MOUSEWHEEL
iDelta := SHORT( _CAST, HiWord( wParam ) )
IF iDelta < 0
keybd_event( VK_DOWN, 0, 0, 0 )
ELSEIF iDelta > 0
keybd_event( VK_UP, 0, 0, 0 )
ENDIF
SELF:EventReturnValue := 0L
RETURN 1L

ENDCASE

RETURN SUPER:Dispatch( oEv )

The, when you start preview:

oRep:PrintPreview( cJob, cFile, cCaption, cMessage, lModal, ;
nShowState, nZoom, ;
#My_rpPrintPreviewMDI )

(this is for 'MDI' previews. I guess that you can do the same with Modal
previews)

HTH,
Amilcar A. Camargo F.
Guatemala, C. A.
From: Amilcar A. Camargo on
For Modal previews you inherit from 'rpPrintPreviewDLG' (i guess as i don't use
them)

Best regards,

Amilcar A. Camargo F.
Guatemala, C. A.
From: Jozo on
Hi all,

All of my clients ask me too if it's possible using the mouse scroll wheel
and keyboard arrows, PageUp, PageDown keys too, but I use ReportPro 3.6.
I have MyWindowChoiceConditions that set various variables like:

oReport:SetLanguageDLL("Rp306Hr.DLL")
oReport:SetReportStringAttribute(RPT_ATTR_DFLT_DATA_PATH, )
oReport:PreviewCaption := "Customers"
oReport:SetReportIntAttribute(RPT_ATTR_PREVIEW_ZOOM_MODE, 1 )
oReport:SetReportStringAttribute(RPT_ATTR_PRINT_CAPTION , "Preparing
report...")
oReport:SetReportStringAttribute(RPT_ATTR_PRINT_MESSAGE1 , "Wait...")
oReport:SetReportStringAttribute(RPT_ATTR_PRINT_MESSAGE2 , "Printing ...")
oReport:SetReportStringAttribute(RPT_ATTR_EXPORT_CAPTION , cName)
oReport:SetReportStringAttribute(RPT_ATTR_EXPORT_TYPE , "RTF")
oReport:SetReportStringAttribute(RPT_ATTR_EXPORT_MESSAGE , "Saving... ")
oReport:SetReportStringAttribute(RPT_ATTR_PROMPT_FOR_PRINTDLG, "N")

Here is not properties that I can to set what I have already specified, but
ReportPro 3.6 has method PreviewReport() and next line:
a := {String2Symbol("PreviewReport"), 600, INVOKE_METHOD, 0, 0, FALSE, NULL,
@pRetDesc}

I don't know, is it possible to apply this code for this or something else.

Any ideas or solution?

Jozo


"Amilcar A. Camargo" <amilcarcamargo(a)gmail.com> wrote in message
news:1i7as51d0edhc1f984sgsq2blk0qbj4hdr(a)4ax.com...
> Hi Paulo,
>
> On Tue, 13 Apr 2010 10:12:27 -0700 (PDT), Paulo Oliveira
> <paulo(a)clipinfor.com>
> wrote:
>
>>Hi all,
>>
>>One of my clients ask me if it's possible using the mouse scroll wheel
>>in reportpro preview like the arrows keys to Scroll down a zoomed
>>report.
>>It's possible?
>
> Yes, i've done it for reportPro 2.xx in the following way:
>
> CLASS My_rpPrintPreviewMDI INHERIT rpPrintPreviewMDI
>
> METHOD Dispatch( oEv ) CLASS My_rpPrintPreviewMDI
> LOCAL uMsg := oEv:Message AS LONG
> LOCAL wParam := oEv:wParam AS DWORD
> LOCAL lParam := oEv:lParam AS LONG
>
> LOCAL iDelta AS INT // ** 9-Oct-2008 **
>
> DO CASE
> // Mouse wheel
> CASE uMsg == WM_MOUSEWHEEL
> iDelta := SHORT( _CAST, HiWord( wParam ) )
> IF iDelta < 0
> keybd_event( VK_DOWN, 0, 0, 0 )
> ELSEIF iDelta > 0
> keybd_event( VK_UP, 0, 0, 0 )
> ENDIF
> SELF:EventReturnValue := 0L
> RETURN 1L
>
> ENDCASE
>
> RETURN SUPER:Dispatch( oEv )
>
> The, when you start preview:
>
> oRep:PrintPreview( cJob, cFile, cCaption, cMessage, lModal, ;
> nShowState, nZoom, ;
> #My_rpPrintPreviewMDI )
>
> (this is for 'MDI' previews. I guess that you can do the same with Modal
> previews)
>
> HTH,
> Amilcar A. Camargo F.
> Guatemala, C. A.


From: Paulo Oliveira on
Hi Amilcar,

Many Thanks, works like a dream.
I only use 'MDI' previews.

Paulo Oliveira

On Apr 14, 2:53 am, Amilcar A. Camargo <amilcarcama...(a)gmail.com>
wrote:
> For Modal previews you inherit from 'rpPrintPreviewDLG' (i guess as i don't use
> them)
>
> Best regards,
>
> Amilcar A. Camargo F.
> Guatemala, C. A.