我保存报告模板加载:Stimul报告:的BusinessObjects不被显示报告
report.Save("C:\\kk.mrt");
然后我打开保存的报告,并指定其为BusinessObjects
Dictionaries
StiReport rptLoad = new StiReport();
rptLoad.RegBusinessObject("Company", repository.GetAll<Company>());
rptLoad.Load("C:\\kk.mrt");
rptLoad.BusinessObjectsStore
包含注册BusinessObjects
刚刚注册(Watched
在RunTime
),但:
rptLoad.Show();
如果有
Bindings
(像:Components.Add(new StiText{Text="{Company.Name}"}
)包含在保存的报告:THEN打动了我:
error CS0103: The name 'Company' does not exist in the current context
否则,如果我没有
Bindings
在保存的报告:THENrptLoad.Show();
将显示报告,但没有注册Dictionaries
(当我在显示报告后进入设计模式时,我看不到BusinessObjects
字典)。,如果我叫
rptLoad.Design();
前rptLoad.Show();
:THEN
报告显示和Bindings
都OK,我可以在所示报告(在设计和预览模式)看到BusinessObjects
。