Page 1 of 1
Preview Control Questions
Posted: Sat Jan 20, 2007 8:19 am
by casic
Hi there,
I still try to integrate the preview control into my own preview form but I have some problems retrieving neccessary information:
- Current zoom factor
- "ActivePageChanged" event (to get notified when an other page was selected, e.g. PgDown/PgUp keys)
Also, I didn't found a way to stop loading/saving the preview configuration - this is a heavy problem because the PageViewMode-property always use the value of the configuration file instead of the property value (specified in the form designer). Setting the property at runtime, it only works after rendering which results in some flicker effects...
It would be great to have a "Light"-version of the preview control without toolbar, statusbar, loading/saving configuration etc. - only with the neccessary properties, methods and events so it can be used in own preview controls or forms.
Thank you for your support,
Markus
Preview Control Questions
Posted: Sun Jan 21, 2007 8:39 pm
by Vital
I still try to integrate the preview control into my own preview form but I have some problems retrieving neccessary information:
- Current zoom factor
You can get zoom from Report.Info.Zoom property.
- "ActivePageChanged" event (to get notified when an other page was selected, e.g. PgDown/PgUp keys)
Please check CurrentPageChanged event (available in build from Jan, 22).
Also, I didn't found a way to stop loading/saving the preview configuration - this is a heavy problem because the PageViewMode-property always use the value of the configuration file instead of the property value (specified in the form designer). Setting the property at runtime, it only works after rendering which results in some flicker effects...
Please use following code:
Code: Select all
StiSettings.Load();
StiSettings.Set("StiPreviewControl", "PageViewMode", PageViewMode);
StiSettings.Save();
Thank you.
Preview Control Questions
Posted: Tue Jan 23, 2007 3:59 pm
by casic
You can get zoom from Report.Info.Zoom property.
Unfortunately this works only once: Using the methods SetZoomOnePage or SetZoomPageWidth after rendering doesn't update the zoom property. It seems, that after using these methods the configuration file is loaded again and the zoom property is set to the value of the config file.
Is there a way to disable the usage of a config file (like DontSaveDesignerConfig property of the designer)?
Thank you,
Markus
Preview Control Questions
Posted: Wed Jan 24, 2007 7:47 am
by Edward
casic wrote:You can get zoom from Report.Info.Zoom property.
Unfortunately this works only once: Using the methods SetZoomOnePage or SetZoomPageWidth after rendering doesn't update the zoom property.
Please use the last build from the January, 24.
casic wrote:It seems, that after using these methods the configuration file is loaded again and the zoom property is set to the value of the config file.
Is there a way to disable the usage of a config file (like DontSaveDesignerConfig property of the designer)?
It is impossible in the nearest versions of StimulReport.Net.
Thank you.
Preview Control Questions
Posted: Sat Jan 27, 2007 7:11 am
by casic
Edward wrote:casic wrote:You can get zoom from Report.Info.Zoom property.
Unfortunately this works only once: Using the methods SetZoomOnePage or SetZoomPageWidth after rendering doesn't update the zoom property.
Please use the last build from the January, 24.
Sorry, this also doesn't work in the new build. I used the following test code:
Code: Select all
MessageBox.Show(stiPreviewControl1.Report.Info.Zoom.ToString());
stiPreviewControl1.SetZoomPageWidth();
MessageBox.Show(stiPreviewControl1.Report.Info.Zoom.ToString());
stiPreviewControl1.SetZoom(m_report.Info.Zoom*100);
The Zoom property still contains the same value.
cu
Markus
Preview Control Questions
Posted: Wed Jan 31, 2007 8:25 am
by Edward
Please use instead of stiPreviewControl1.Report properties of the
CompiledReport object.
so your lines will be the following:
Code: Select all
MessageBox.Show(stiPreviewControl1.Report.CompiledReport.Info.Zoom.ToString());
Thank you.
Preview Control Questions
Posted: Wed Jan 31, 2007 3:27 pm
by casic
That's it!
Thank you,
Markus