首页 > 慧问 > 频道

xtrareport 运行时进行报表设计数据源已经绑定,但预览不了是怎么回事儿?

发表于2019-05-10 回复:0 查看:2113  |  
<pre class='brush: csharp'>{{{public Report() { InitializeComponent(); // Create a connection. SqlConnection connection = new SqlConnection(@"User ID=sa;password=Hzh1188;Initial Catalog=FR7_WMS_FY_Test;Data Source=HUANGZH"); // Create a data adapter and a dataset. SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM sb_user", connection); DataSet dataSet1 = new DataSet(); // Specify the data adapter and the data source for the report. // Note that you must fill the datasource with data because it is not bound directly to the specified data adapter. this.DataAdapter = adapter; adapter.Fill(dataSet1, "sb_user"); this.DataSource = dataSet1; this.DataMember = "sb_user"; //this.ShowPreview(); } }}}</pre> 动态绑定数据源,但预览的时候没东西显示
1个回答
  • 1970-01-01 08:00
    你可以在初始化时将图表的尺寸设置成百分比,具体可参考这篇教程:[FusionCharts使用教程:自定义图表——修改图表尺寸和类型](http://www.evget.com/article/2015/11/26/23067.html)
    1
    回复 举报
回复

登录 慧都网发表评论

扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP