Problem using ReportPro

This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
Post Reply
User avatar
Intexso
Posts: 84
Joined: Mon Sep 10, 2018 3:19 pm

Problem using ReportPro

Post by Intexso »

Hello,

I have a problem using ReportPro. If I print (or preview) my report, it never ends. It seems to me that the MaxPage is not set well of properly used.

In my application I am using ReportPro to make handcoded report. I am using Rp2Net231XS-VN401. In my application I use the references reportpro2.base.dll and reportpro2.runtime.dll.

My code:
CLASS MyPrinter INHERIT RpPrinter
// defining PrintSetPage, PrintPageBody, PrintStart, PrintEnd

GLOBAL oPrinterDriver AS MyPrinter
....and in a method of a some class:
oPrinterdriver:MinPage := 1
oPrinterdriver:MaxPage := 1
oPrinterdriver:FromPage := 1
oPrinterdriver:ToPage := 1

IF lPreview
oPrinterdriver:PrintPreview(cNaam,cFile,cTitle,cText,TRUE,FALSE,FALSE,SW_SHOWNORMAL,ZOOM_WHOLE_PAGE,#rpPrintPreviewMDI)
ELSE
oPrinterdriver:Print(cNaam,cFile,cTitle,cText,FALSE,FALSE)
ENDIF


If I Print the report it never ends. When debugging I see that the callback method PrintPageBody each time is invoked.
If I PrintPreview the report the first page is shown in the preview-window. But the navigation buttons (for moving right and to the last page) are all enabled. With reportpro 2.17 (which I used in VO) all navigations buttons were disabled. If I press the next-page-button, the pagenumber is increased and PrintSetPage is invoked with a pagenumber which is higher than oPrinterdriver:MaxPage is set to.

Is there some different behaviour in the reportpro version? Or what do I have to set to maximize the pages?

Thanks in advance for help.

Eric
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Problem using ReportPro

Post by Chris »

Hi Eric,

Can you please create a complete (but small please! :)) sample showing the problem and post it here or send it to me to have a look?

TIA,
Chris
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Post Reply