社区
图表区
帖子详情
XtraRport的问题,在线等!!!
大Y
2011-06-08 03:05:51
我用的是XtraReport单独设计的报表,
但是想从窗体里,来显示报表,而不是通过ShowPreview())等等其它的,
现在放了一个PrintControl控件后,不能把报表付给这个控件让这个窗体显示,请各位大侠帮帮忙。
怎么来配置才可以呀/
...全文
98
6
打赏
收藏
XtraRport的问题,在线等!!!
我用的是XtraReport单独设计的报表, 但是想从窗体里,来显示报表,而不是通过ShowPreview())等等其它的, 现在放了一个PrintControl控件后,不能把报表付给这个控件让这个窗体显示,请各位大侠帮帮忙。 怎么来配置才可以呀/
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
yeyucao123
2011-06-09
打赏
举报
回复
接分 .....
大Y
2011-06-08
打赏
举报
回复
试出来了,哈哈,接分撒
zhenyunyuan
2011-06-08
打赏
举报
回复
var fXtraReport = new XtraReportChaoBian();
fXtraReport.SetDataSource(new DataTable());//配置数据源
//fXtraReport.LoadLayout(@"C:\1.repx");另一种形式
PrintControl printControl1 = new PrintControl();//可以动态生成也可以将PrintControl拖放上去
printControl1.PrintingSystem = fXtraReport.PrintingSystem;
PrintBarManager printBarManager = new PrintBarManager();
printBarManager.Form = printControl1;
printBarManager.Initialize(printControl1);
printBarManager.MainMenu.Visible = false;
printBarManager.AllowCustomization = false;
//操作要显示什么按钮
printControl1.PrintingSystem.SetCommandVisibility(new PrintingSystemCommand[]{
PrintingSystemCommand.Open,
PrintingSystemCommand.Save,
PrintingSystemCommand.ClosePreview,
PrintingSystemCommand.Customize,
PrintingSystemCommand.SendCsv,
PrintingSystemCommand.SendFile,
PrintingSystemCommand.SendGraphic,
PrintingSystemCommand.SendMht,
PrintingSystemCommand.SendPdf,
PrintingSystemCommand.SendRtf,
PrintingSystemCommand.SendTxt,
PrintingSystemCommand.SendXls
}, CommandVisibility.None);
fXtraReport.CreateDocument();
panelControl2.Controls.Add(printControl1);
zhenyunyuan
2011-06-08
打赏
举报
回复
private void FormRpt_Load(object sender, EventArgs e)
{
BzxtBLL.employeRptBLL rptBLL = new BzxtBLL.employeRptBLL();
var fXtraReport = new XtraReportChaoBian();
fXtraReport.SetDataSource(rptBLL.GetChaoBian(false));//配置数据源
//fXtraReport.LoadLayout(@"C:\1.repx");另一种形式
PrintControl printControl1 = new PrintControl();//可以动态生成也可以将PrintControl拖放上去
printControl1.PrintingSystem = fXtraReport.PrintingSystem;
PrintBarManager printBarManager = new PrintBarManager();
printBarManager.Form = printControl1;
printBarManager.Initialize(printControl1);
printBarManager.MainMenu.Visible = false;
printBarManager.AllowCustomization = false;
//操作要显示什么按钮
printControl1.PrintingSystem.SetCommandVisibility(new PrintingSystemCommand[]{
PrintingSystemCommand.Open,
PrintingSystemCommand.Save,
PrintingSystemCommand.ClosePreview,
PrintingSystemCommand.Customize,
PrintingSystemCommand.SendCsv,
PrintingSystemCommand.SendFile,
PrintingSystemCommand.SendGraphic,
PrintingSystemCommand.SendMht,
PrintingSystemCommand.SendPdf,
PrintingSystemCommand.SendRtf,
PrintingSystemCommand.SendTxt,
PrintingSystemCommand.SendXls
}, CommandVisibility.None);
fXtraReport.CreateDocument();
panelControl2.Controls.Add(printControl1);
}
大Y
2011-06-08
打赏
举报
回复
我自己顶
动态传递参数到DevExpress.
Xtr
aRep
ort
s的小结
前两种方法和WinForm一样,可以传递参数、数组、实体对象、DataTable等1. 采用构造函数具体用法:在Rep
ort
中public partial class
Xtr
aRep
ort
1 : DevExpress.
Xtr
aRep
ort
s.UI.
Xtr
aRep
ort
{ private int test1; public Form1(int test1)...
使用Dev
Xtr
aRep
ort
s报表打印的时候调用print打印方法。
一定要引用using DevExpress.
Xtr
aRep
ort
s.UI; 如果不引用,是没有print 及printdialog扩展方法
项目管理培训课件.ppt
项目管理培训课件.ppt
情境一数据库系统概述.ppt
情境一数据库系统概述.ppt
WEKA数据挖掘工具操作实验.ppt
WEKA数据挖掘工具操作实验.ppt
图表区
4,819
社区成员
14,134
社区内容
发帖
与我相关
我的任务
图表区
.NET技术 图表区
复制链接
扫一扫
分享
社区描述
.NET技术 图表区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章