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
Own Preview Window
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:
To receive current page you can use following code:
Thank you
To receive count of pages you can use following code:
Code: Select all
PreviewControl.Report.RenderedPages.Count
Code: Select all
PreviewControl.Report.CurrentPrintPage
Own Preview Window
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
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
We have added new event to StiPreviewControl - CurrentPageChanged.
New version will be available in build at Jan, 22.
Thank you.
New version will be available in build at Jan, 22.
Thank you.
Own Preview Window
Thank you very much - works perfect ! :biggrin:Vital wrote:We have added new event to StiPreviewControl - CurrentPageChanged.
New version will be available in build at Jan, 22.
Thank you.
Markus
---------------------------------------------
One remark:
To retrieve the selected (current) page number of the preview control,
Code: Select all
PreviewControl.Report.CurrentPrintPage
Code: Select all
PreviewControl.CurrentPage
Own Preview Window
Yes, we added this property after your post.One remark:
To retrieve the selected (current) page number of the preview control,
doesn't work, use the following instead:Code: Select all
PreviewControl.Report.CurrentPrintPage
Code: Select all
PreviewControl.CurrentPage
Thank you.