设计完report 后,想通过大demo 里边找到入口不好找,那个whatmoduls之类的 藏起来了,不过还是通过控件组合找到了

一个跳窗的方式,自带toolbar 

 ReportA cdr = new ReportA ();
ReportPrintTool tool = new ReportPrintTool(cdr);
tool.ShowPreview();

一个是放到窗体内,非跳窗展示的方式,自己设计toolbar 也可以 使用documentview 绑的窗体工具栏控件,然后report 加载到documentview 内

拖一个documentViewer1 到窗体内

 

  documentViewer1.UseAsyncDocumentCreation = DefaultBoolean.True;
            documentViewer1.DocumentSource = cdr;
         documentViewer1.InitiateDocumentCreation();

 

posted on 2022-06-05 14:54  小石头的一天  阅读(150)  评论(0编辑  收藏  举报