您好,我在Form窗口上面拖放了一个spread控件,然后在Form的构造函数中进行的如下的设置,
- public ReportForm(Context context, ReportNode reportNode, string reportName)
- {
- this._isGenerating = true;
- InitializeComponent();
- FpSpread.SuspendLayout();
- SetStyle(
- ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
- ReportFileName = reportName;
- ReportNode = reportNode;
- if (string.IsNullOrEmpty(reportName))
- {
- return;
- }
- Text = Path.GetFileName(reportName);
- if (context != null)
- {
- Context = context;
- InitReportView(reportNode);
- }
- FpSpread.Sheets.Clear();
- storeSheet = new SheetView(ReportUtil.StoreSheetName) {Protect = true, Visible = false};
- FpSpread.Sheets.Add(storeSheet);
- FpSpread.TabStripInsertTab = false;
- FpSpread.TabStrip.Editable = false;
- FpSpread.EnableCrossSheetReference = true;
- FpSpread.AllowUserFormulas = true;
- FpSpread.AllowCellOverflow = false;
- FpSpread.AllowEditOverflow = true;
- FpSpread.AllowSheetMove = false;
- FpSpread.AutoClipboard = true;
- FpSpread.AutoLaunchSpreadDesigner = false;
- reportNode.ReportView = FpSpread;
- }
复制代码
该代码是在后台线程中创建的,在创建该窗口的时候
执行到:"FpSpread.AutoLaunchSpreadDesigner = false;
"的时候报了一个如下的错误
System.FormatException: 该字符串未被识别为有效的布尔值。
在 System.Boolean.Parse(String value)
在 FarPoint.Win.Spread.FpSpread.set_AutoLaunchSpreadDesigner(Boolean value)
请问是什么原因,这个问题不是很容易出来,我运行环境为Farpoint7 V4版本 |
|