Page 1 of 1

Own Preview Window

Posted: Thu Jan 18, 2007 4:31 pm
by casic
Hi there,

I'm moving from C1Reports to StimulReport and I would like to reuse my self-made preview window. Rendering to the preview control is no problem (toolbar and statusbar of the preview control are hidden) but I couldn't find an event to get informed of changes to the current page nor to find a working property to get the current (active) page number or the count of available pages (which should be displayed in my own statusbar). Using version 2006.4.

Hope you can help me,

thank you very much in advance,

Markus

Own Preview Window

Posted: Thu Jan 18, 2007 8:38 pm
by Vital
You can get this information from property Report of StiPreviewControl. This property contain StiReport object.
To receive count of pages you can use following code:

Code: Select all

PreviewControl.Report.RenderedPages.Count
To receive current page you can use following code:

Code: Select all

PreviewControl.Report.CurrentPrintPage
Thank you

Own Preview Window

Posted: Fri Jan 19, 2007 6:53 am
by casic
Thank you for your answer.

Is there an Event which is raised when the user moves to an other page (e.g. using cursor keys)? This is needed to sync the content of my statusbar.

Thanx,

Markus

Own Preview Window

Posted: Sun Jan 21, 2007 7:42 pm
by Vital
We have added new event to StiPreviewControl - CurrentPageChanged.

New version will be available in build at Jan, 22.

Thank you.

Own Preview Window

Posted: Tue Jan 23, 2007 2:15 pm
by casic
Vital wrote:We have added new event to StiPreviewControl - CurrentPageChanged.

New version will be available in build at Jan, 22.

Thank you.
Thank you very much - works perfect ! :biggrin:

Markus

---------------------------------------------

One remark:

To retrieve the selected (current) page number of the preview control,

Code: Select all

PreviewControl.Report.CurrentPrintPage
doesn't work, use the following instead:

Code: Select all

PreviewControl.CurrentPage

Own Preview Window

Posted: Tue Jan 23, 2007 3:40 pm
by Vital
One remark:

To retrieve the selected (current) page number of the preview control,

Code: Select all

PreviewControl.Report.CurrentPrintPage
doesn't work, use the following instead:

Code: Select all

PreviewControl.CurrentPage
Yes, we added this property after your post.

Thank you.