Own Preview Window

Stimulsoft Reports.NET discussion
Post Reply
casic
Posts: 68
Joined: Thu Jan 18, 2007 4:25 pm
Location: Germany

Own Preview Window

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Own Preview Window

Post 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
casic
Posts: 68
Joined: Thu Jan 18, 2007 4:25 pm
Location: Germany

Own Preview Window

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Own Preview Window

Post by Vital »

We have added new event to StiPreviewControl - CurrentPageChanged.

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

Thank you.
casic
Posts: 68
Joined: Thu Jan 18, 2007 4:25 pm
Location: Germany

Own Preview Window

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Own Preview Window

Post 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.
Post Reply