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
Preview Control Questions
You can get zoom from Report.Info.Zoom property.I still try to integrate the preview control into my own preview form but I have some problems retrieving neccessary information:
- Current zoom factor
Please check CurrentPageChanged event (available in build from Jan, 22).- "ActivePageChanged" event (to get notified when an other page was selected, e.g. PgDown/PgUp keys)
Please use following code: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...
Code: Select all
StiSettings.Load();
StiSettings.Set("StiPreviewControl", "PageViewMode", PageViewMode);
StiSettings.Save();
Preview Control Questions
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.You can get zoom from Report.Info.Zoom property.
Is there a way to disable the usage of a config file (like DontSaveDesignerConfig property of the designer)?
Thank you,
Markus
Preview Control Questions
Please use the last build from the January, 24.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.
It is impossible in the nearest versions of StimulReport.Net.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)?
Thank you.
Preview Control Questions
Sorry, this also doesn't work in the new build. I used the following test code:Edward wrote:Please use the last build from the January, 24.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.
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);
cu
Markus
Preview Control Questions
Please use instead of stiPreviewControl1.Report properties of the CompiledReport object.
so your lines will be the following:
Thank you.
so your lines will be the following:
Code: Select all
MessageBox.Show(stiPreviewControl1.Report.CompiledReport.Info.Zoom.ToString());
Preview Control Questions
That's it!
Thank you,
Markus
Thank you,
Markus