Stimulsoft.Report 如此奇怪的问题

Eric_qiang 2013-10-24 04:45:24
初次测试Stimulsoft.Report,出现一相奇怪的问题。
从数据库执行 select GoodsCode, GoodsName, GoodsModel, Remarks, IsInclude, GoodsUp, GoodsDown, IsSignGoodsSN, CreateMan, ModifyMan, CreateDate, ModifyDate from goodsinfo where goodscode<'SP00009' 可查询出7条记录。
但用下面的代码,会形成很多页,而且每页的内容也是7条记录,不知问题出在何处。
代码如下:
stiViewerControl1.Report = null;
Stimulsoft.Report.StiReport sr = new Stimulsoft.Report.StiReport();

sr.Load(@"F:\download\Stimulsoft_Reports.Ultimate_2013.1-Bin\Bin\Reports\Report.mrt");
sr.Render(false);
sr.Dictionary.Databases.Clear();
sr.Dictionary.DataSources.Clear();
sr.DataSources.Clear();
sr.Dictionary.Databases.Clear();
sr.Dictionary.Databases.Add(new StiSqlDatabase("Connection", "server=.;database=minierp;user id=sa;password=88859150;"));
StiSqlSource myDataSource = new StiSqlSource("Connection", "GoodsInfo", "GoodsInfo", "select GoodsCode, GoodsName, GoodsModel, Remarks, IsInclude, GoodsUp, GoodsDown, IsSignGoodsSN, CreateMan, ModifyMan, CreateDate, ModifyDate from goodsinfo where goodscode<'SP00009'", true, false);
StiDataColumn[] sdc = new StiDataColumn[] { new StiDataColumn("GoodsCode"), new StiDataColumn("GoodsName"), new StiDataColumn("GoodsModel"), new StiDataColumn("Remarks"), new StiDataColumn("CreateMan"), new StiDataColumn("ModifyMan"), new StiDataColumn("CreateDate"), new StiDataColumn("ModifyDate") };
myDataSource.Columns.AddRange(sdc);
sr.Dictionary.DataSources.Clear();
sr.Dictionary.DataSources.Add(myDataSource);
sr.Show();
stiViewerControl1.Report = sr;

...全文
144 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧