.net FastReportd的说明

这个东东是用做报表的

然后是,可以快速方便的设计自己报表的格式

支持任意水印和背景图片

三个dll,去网上找,FastReport.Bars.dll,FastReport.dll,FastReport.Editor.dll或者去所谓官网下

分两部:

  1部.对报表的设计           

 2.部,在工程项目里面引用报表,为报表添加数据,然后打印报表。

 FastReport.Report report = new FastReport.Report(); 

 report.Load(path);

  report.RegisterData(dataTb, this.Name);//
            report.PrintSettings.Printer =  prName;

          report.PrintPrepared();//准备打印

           report.PrintSettings.ShowDialog = false;//=不显示打印设置框,直接选择默认打印机 打印
            report.PrintSettings.Copies = 1;//打印份数设置
            EnvironmentSettings a = new EnvironmentSettings();
            a.ReportSettings.ShowProgress = false;
            report.Print();//打印  

3.背景水印可以直接在打印的时候写上去

           ReportPage page = report.Pages[0] as ReportPage;
                Watermark watermark = new Watermark();
                watermark.Enabled = true;
                watermark.Font = new Font(watermark.Font.FontFamily, (float)40, FontStyle.Bold);
                watermark.Text = yymc;
                watermark.Font = new Font(watermark.Font.FontFamily, (float)40, FontStyle.Bold);
                page.Watermark = watermark;

4.在填充数据的时候,注意名称要对应,不然会报错找不到字段数据

   xxx.frx文件的ReferenceName="prName"

大概就是这样,具体设计报表样式可以参考.netFastReport里面的Demo.exe,基本上需要的格式都有


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值