FastReport.ReportPage Page1 = new FastReport.ReportPage();
Page1.Name = "Page1";
Page1.PaperWidth = 215.9f;Â Â Â Â // millimeter => 21.59 cm
Page1.PaperHeight = 139.7f;Â Â Â Â // millimeter => 13.97 cm
Page1.LeftMargin = 20f;Â Â Â Â // millimeter => 2 cm
Page1.RightMargin = 20f;Â Â Â Â // millimeter => 2 cm
Page1.FirstPageSource = 15;Â Â Â Â // automatically select
Page1.OtherPagesSource = 15;Â Â Â Â // automatically select
I mean that on UI in View menu there is a Units options and in View->Options->ReportPage.
Is there way to change this option from code? (please see attachment)
using (var report = new FastReport.Report())
{
    using (var designer = new FastReport.Design.StandardDesigner.DesignerForm(false))
    {
        designer.ShowInTaskbar = true;
        designer.Designer.Report = report;
        var ribbon = designer.Controls[2] as FastReport.DevComponents.DotNetBar.RibbonControl;
        var panel = ribbon.Controls[3] as FastReport.DevComponents.DotNetBar.RibbonPanel;
        var bar = panel.Controls[0] as FastReport.DevComponents.DotNetBar.RibbonBar;
        var button = bar.Items[3] as FastReport.DevComponents.DotNetBar.ButtonItem;
        var buttonMilli = button.SubItems[0] as FastReport.DevComponents.DotNetBar.ButtonItem;
        var buttonCenti = button.SubItems[1] as FastReport.DevComponents.DotNetBar.ButtonItem;
        var buttonInch = button.SubItems[2] as FastReport.DevComponents.DotNetBar.ButtonItem;
        var buttonHundredOfInch = button.SubItems[3] as FastReport.DevComponents.DotNetBar.ButtonItem;
        // milli or centi or inch or hundred of inch
        buttonMilli.RaiseClick();
        //buttonCenti.RaiseClick();
        //buttonInch.RaiseClick();
        //buttonHundredOfInch.RaiseClick();
        designer.ShowDialog();
    }
}
Comments
Is there way to change this option from code? (please see attachment)