找回密码
 立即注册

QQ登录

只需一步,快速开始

AbbotWang

注册会员

1

主题

5

帖子

12

积分

注册会员

积分
12
最新发帖
AbbotWang
注册会员   /  发表于:2016-1-28 12:37  /   查看:4438  /  回复:5
wpf程序
   
viewer.LoadDocument(@"*****************.rdlx");

这个报表是需要参数的,我不想再展示出来报表之后填写

想法是,
1. 点击button,获取到textbox的值,将改值赋值给报表参数。

2. 如何动态绑定数据源

怎么实现

5 个回复

倒序浏览
AbbotWang
注册会员   /  发表于:2016-1-28 12:42:00
沙发
是viewer.SetParametersValues这个方法吗?具体怎么用?
回复 使用道具 举报
AbbotWang
注册会员   /  发表于:2016-1-28 13:30:00
板凳
结贴, 会了, 已经做出来了!
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-1-28 13:48:00
地板
回复 3楼AbbotWang的帖子

厉害~能把您的示例程序分享出来吗?让更多需要的用户可以参考~
回复 使用道具 举报
AbbotWang
注册会员   /  发表于:2016-1-28 14:19:00
5#
回复 4楼Lenka.Guo的帖子

前台
<Wpf:Viewer HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Name="testv" Grid.Row="1" Grid.ColumnSpan="2" />

后台
GrapeCity.ActiveReports.PageReport report = new GrapeCity.ActiveReports.PageReport();
report.Load(new System.IO.FileInfo(@"***"));
report.Report.DataSources[0].ConnectionProperties.ConnectString = @"****;";
GrapeCity.ActiveReports.Document.PageDocument  p = new   GrapeCity.ActiveReports.Document.PageDocument(report);
p.Parameters["***"].CurrentValue = "****";
            testv.LoadDocument(p);
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-1-28 14:38:00
6#
感谢您的反馈,已将500金币发送到您的账户中。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部